{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "a9683468",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Defaulting to user installation because normal site-packages is not writeable\n",
      "Requirement already satisfied: flask in /home/student/.local/lib/python3.10/site-packages (2.3.2)\n",
      "Requirement already satisfied: Jinja2>=3.1.2 in /home/student/.local/lib/python3.10/site-packages (from flask) (3.1.4)\n",
      "Requirement already satisfied: itsdangerous>=2.1.2 in /home/student/.local/lib/python3.10/site-packages (from flask) (2.2.0)\n",
      "Requirement already satisfied: Werkzeug>=2.3.3 in /home/student/.local/lib/python3.10/site-packages (from flask) (3.0.3)\n",
      "Requirement already satisfied: click>=8.1.3 in /home/student/.local/lib/python3.10/site-packages (from flask) (8.1.7)\n",
      "Requirement already satisfied: blinker>=1.6.2 in /home/student/.local/lib/python3.10/site-packages (from flask) (1.8.2)\n",
      "Requirement already satisfied: MarkupSafe>=2.0 in /home/student/.local/lib/python3.10/site-packages (from Jinja2>=3.1.2->flask) (2.1.5)\n"
     ]
    }
   ],
   "source": [
    "!pip install flask"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "aeee415d",
   "metadata": {},
   "outputs": [],
   "source": [
    "import logging\n",
    "import os\n",
    "import typing\n",
    "import flask\n",
    "\n",
    "from flask import Flask\n",
    "from flask import request\n",
    "\n",
    "def run_server(handlers: typing.Dict):\n",
    "    app = Flask(__name__)\n",
    "\n",
    "    @app.get(\"/\")\n",
    "    def on_info():\n",
    "        return handlers[\"info\"]()\n",
    "\n",
    "    @app.post(\"/start\")\n",
    "    def on_start():\n",
    "        print(\"go!\")\n",
    "        game_state = request.get_json()\n",
    "        handlers[\"start\"](game_state)\n",
    "        return \"ok\"\n",
    "\n",
    "    @app.post(\"/move\")\n",
    "    def on_move():\n",
    "        game_state = request.get_json()\n",
    "        return handlers[\"move\"](game_state)\n",
    "\n",
    "    @app.post(\"/end\")\n",
    "    def on_end():\n",
    "# This isn't being called by the CLI atm\n",
    "#        print(request.get_json())\n",
    "#        end_game = request.get_json()\n",
    "#        print(end_game[\"death\"])\n",
    "        handlers[\"end\"](end_game)\n",
    "        return \"ok\"\n",
    "\n",
    "    @app.after_request\n",
    "    def identify_server(response):\n",
    "        response.headers.set(\n",
    "            \"server\", \"battlesnake/github/starter-snake-python\"\n",
    "        )\n",
    "        return response\n",
    "\n",
    "\n",
    "    host = \"::\"\n",
    "    port = int(os.environ.get(\"PORT\", \"8000\"))\n",
    "\n",
    "    logging.getLogger(\"werkzeug\").setLevel(logging.ERROR)\n",
    "\n",
    "    print(f\"\\nRunning Battlesnake at http://{host}:{port}\")\n",
    "    app.run(host=host, port=port)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "11a8ff03",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Running Battlesnake at http://0.0.0.0:8000\n",
      " * Serving Flask app '__main__'\n",
      " * Debug mode: off\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:21:43,894] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:21:43,906] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:21:43,919] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:21:43,929] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:21:43,938] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:21:43,948] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:21:43,958] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:21:43,967] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:21:43,976] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:21:43,985] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:21:45,941] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:21:45,953] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:21:45,962] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:21:45,971] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:21:45,979] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:21:45,988] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:21:45,998] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:21:46,007] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:21:46,016] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:21:46,023] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:35:59,071] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:35:59,100] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:35:59,122] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:35:59,143] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:35:59,157] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:35:59,165] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:02,031] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:02,042] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:29,698] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,708] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,710] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:29,728] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,738] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,747] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,756] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,765] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,774] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:29,783] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,792] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,802] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,809] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,811] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:29,827] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,837] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,846] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:29,855] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,865] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,871] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,873] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:29,890] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,900] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,908] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,917] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,926] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:29,935] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,944] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,953] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,962] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,969] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,971] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:29,988] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,996] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:29,997] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:30,015] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,024] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,033] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,042] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,051] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,060] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,069] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:30,079] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,088] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,095] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,097] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:30,115] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,124] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,134] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,143] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,152] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:30,161] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,170] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,180] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,189] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,196] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,198] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:30,214] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,224] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,232] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:30,242] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,251] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,258] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,260] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:30,278] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,288] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,297] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:30,307] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,316] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,326] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,335] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,345] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,355] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,362] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,364] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:30,383] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:30,391] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,392] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:30,411] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,419] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,421] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:30,440] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,451] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,462] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,473] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:30,483] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,490] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,493] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:30,511] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,521] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,530] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,538] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,547] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,556] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:30,567] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:30,576] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,586] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,594] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,596] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:30,615] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,622] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,624] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:30,642] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,652] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:30,663] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,673] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,683] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,690] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,692] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:30,712] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,719] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,721] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:30,742] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:30,750] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,752] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:30,773] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,782] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,791] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,801] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:30,810] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,819] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,829] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,838] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,848] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,855] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,857] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:30,874] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,883] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:30,892] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,902] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,914] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,923] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,925] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:30,952] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,967] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,979] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:30,990] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:31,001] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,009] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,012] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:31,032] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,043] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,052] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,062] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:31,071] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,081] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,090] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,100] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,111] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,118] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,120] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:31,140] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,148] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:31,150] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:31,192] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,201] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,203] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:31,224] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,232] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,234] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:31,253] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,261] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:31,263] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:31,281] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,292] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,302] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,313] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,324] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:31,331] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,333] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:31,353] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,360] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,362] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:31,380] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,387] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,389] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:31,406] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:31,415] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,424] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,434] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,444] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,451] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,453] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:31,470] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,479] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,490] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:31,500] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,510] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,516] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,518] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:31,536] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:31,544] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,546] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:31,564] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,571] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,573] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:31,590] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,600] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,608] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,617] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:31,625] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,634] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,642] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,651] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,660] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,667] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,669] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:31,687] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,694] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:31,696] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:31,714] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,721] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,723] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:31,740] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,747] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,749] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:31,767] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,776] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,786] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,796] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,806] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,813] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,815] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:31,833] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,843] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:31,853] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,863] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,873] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,880] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,882] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:31,899] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,909] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,918] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,927] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:31,936] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,945] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,954] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:31,964] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,973] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,980] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:31,982] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:32,000] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,012] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,022] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,031] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,040] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:32,050] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,059] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,069] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,079] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,086] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,088] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:32,106] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,117] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,127] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:32,137] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,146] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,154] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,155] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:32,175] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,184] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,186] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:32,204] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,215] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,224] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,234] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,244] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,251] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,253] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:32,272] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,282] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:32,291] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,301] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,310] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,320] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,330] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,340] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,351] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,358] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,361] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:32,381] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,388] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,390] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:32,411] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,419] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,421] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:32,441] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,450] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,452] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:32,471] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,479] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,481] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:32,501] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,509] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,511] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:32,530] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,540] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,550] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,559] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,569] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,578] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:32,588] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:32,598] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,608] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,615] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,617] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:32,636] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,646] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,649] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:32,673] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,685] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:32,697] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,707] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,718] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,727] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,738] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,748] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,759] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,766] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,768] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:32,787] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,799] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,808] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,818] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:32,830] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,840] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,850] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,860] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,870] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,878] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,880] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:32,902] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,910] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:32,912] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:32,934] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,942] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,944] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:32,964] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,971] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:32,973] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:32,991] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,001] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:33,011] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,021] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,032] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,039] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,041] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:33,062] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,070] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,072] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:33,090] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,102] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,111] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,120] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,129] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,138] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,147] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,156] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,166] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:33,173] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,175] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:33,195] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,202] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,204] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:33,224] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,233] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,235] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:33,254] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:33,264] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,274] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,284] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,294] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,302] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,304] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:33,323] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,332] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,334] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:33,352] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,359] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,362] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:33,381] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,391] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,401] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,410] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,419] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,429] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,438] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,447] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,457] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:33,464] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,466] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:33,483] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,494] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,504] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,514] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,523] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,530] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,532] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:33,550] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,558] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,560] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:33,578] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,588] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,597] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,606] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,615] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,624] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:33,634] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,644] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,654] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,661] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,663] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:33,682] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,692] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,702] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,712] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,721] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,731] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,740] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,750] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,759] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:33,766] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,768] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:33,787] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,798] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,807] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,818] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,827] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,835] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,837] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:33,856] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,866] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,868] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:33,887] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,898] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,908] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,918] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,927] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,937] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:33,947] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,957] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,966] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:33,975] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:33,977] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:33,997] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,005] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,006] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:34,025] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,036] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,047] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,057] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:34,067] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,074] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,076] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:34,097] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,104] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,106] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:34,126] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,136] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,145] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:34,154] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,163] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,172] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,184] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:34,193] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,203] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,210] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,212] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:34,230] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,237] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,239] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:34,262] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,272] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:34,274] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:34,295] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,305] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,315] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,323] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,332] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,341] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,351] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,360] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:34,370] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,378] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,380] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:34,398] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,407] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,417] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:34,427] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,437] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,444] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,446] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:34,467] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,475] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,477] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:34,497] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,507] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:34,517] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,526] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,536] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,546] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,555] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,565] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,575] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,583] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,584] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:34,603] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,611] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,613] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:34,634] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,641] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,643] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:34,663] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,674] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,684] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,694] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,704] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,711] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,713] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:34,731] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,741] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:34,751] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,760] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,770] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,779] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,789] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,801] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,811] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,819] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,821] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:34,839] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,849] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,859] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,869] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,879] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,886] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,887] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:34,905] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,915] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:34,925] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,935] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,945] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,952] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,954] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:34,973] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,984] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:34,995] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,005] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:35,015] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,025] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,035] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,045] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,054] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,062] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,064] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:35,082] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,090] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:35,092] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:35,111] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,121] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,131] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,140] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,150] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,159] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:35,169] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,179] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,188] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,196] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,198] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:35,215] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,224] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,234] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,243] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:35,256] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,264] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,267] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:35,287] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,299] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,308] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,319] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,330] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,339] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:35,348] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,357] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,367] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,374] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,376] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:35,394] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:35,404] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,414] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,423] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,433] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,440] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,442] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:35,461] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,470] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,481] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:35,489] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,498] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,506] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,515] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,524] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,535] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,542] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,544] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:35,562] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:35,572] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,581] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,591] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,601] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,608] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,609] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:35,628] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,636] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,638] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:35,656] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,666] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,675] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,684] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,692] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,701] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,710] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,719] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,728] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:35,735] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,737] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:35,754] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,763] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,771] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,780] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,788] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,797] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,806] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:35,815] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,824] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,831] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,833] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:35,850] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,860] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,870] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,879] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,888] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:35,897] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,907] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,916] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,926] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,933] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,935] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:35,952] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,961] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,969] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,978] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,986] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:35,994] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,003] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,012] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,021] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:36,028] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,030] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:36,047] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,054] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,056] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:36,073] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,083] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,092] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,101] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:36,111] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,120] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,130] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,139] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,149] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,156] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,158] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:36,175] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,185] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:36,194] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,203] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,213] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,220] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,222] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:36,240] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,250] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,259] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,268] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,277] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,287] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,296] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,305] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,315] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:36,322] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,324] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:36,343] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,351] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,353] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:36,370] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,379] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,388] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,397] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:36,406] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,414] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,423] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,432] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,442] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,449] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,450] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:36,468] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,477] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:36,486] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,495] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,504] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,513] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,522] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:36,532] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,542] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,549] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,551] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:36,567] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,577] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,587] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,597] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,606] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:36,613] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,615] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:36,632] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,641] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,650] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,660] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,669] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,676] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,678] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:36,695] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,705] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,714] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,723] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,732] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,741] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,751] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:36,760] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,770] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,777] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,779] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:36,797] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,806] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,816] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,825] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,835] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:36,842] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,843] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:36,861] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,870] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,880] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,889] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,898] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,908] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,917] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:36,927] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,937] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,944] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,946] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:36,963] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,973] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:36,982] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:36,991] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,000] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,009] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,018] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,028] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,037] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,044] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,046] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:37,063] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:37,070] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,072] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:37,088] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,097] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,106] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,115] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,124] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,131] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,133] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:37,150] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,157] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,159] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:37,176] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,183] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,185] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:37,202] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,211] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,219] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:37,228] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,236] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,244] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:37,253] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,263] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,272] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,278] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,280] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:37,297] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,307] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,315] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,324] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:37,333] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,342] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,351] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,360] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,370] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,377] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,378] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:37,396] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,404] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:37,406] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:37,423] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,433] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,442] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,452] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,461] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,468] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,470] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:37,487] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,496] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,504] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,513] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,521] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,530] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,539] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,547] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,556] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:37,563] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,565] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:37,582] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,591] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,600] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,609] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,619] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,626] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,628] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:37,644] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,653] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,662] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,671] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,681] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,687] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,689] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:37,707] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,717] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:37,726] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,735] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,744] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,753] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,762] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:37,772] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,781] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,788] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,790] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:37,807] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,817] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,826] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,836] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,845] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:37,852] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,854] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:37,870] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,879] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,887] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,896] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,904] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,912] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,921] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:37,930] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,940] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,946] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,948] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:37,965] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,972] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:37,974] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:37,991] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:38,000] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,010] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,019] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,028] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,036] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,046] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,055] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,064] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,071] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:38,073] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:38,089] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,097] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,099] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:38,116] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,125] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,133] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,142] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,151] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:38,160] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,168] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,177] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,187] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,194] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,195] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:38,213] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,223] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,232] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:38,242] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,251] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,260] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,270] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:38,279] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,289] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,296] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,298] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:38,315] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,322] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,324] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:38,341] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,350] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:38,359] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,367] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,376] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,384] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,393] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,402] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,410] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,417] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,419] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:38,436] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,445] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,454] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,463] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,472] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,481] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,490] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,499] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:38,508] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,515] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,516] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:38,533] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,543] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,551] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,560] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,571] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,581] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:38,590] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,600] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,610] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,617] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,619] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:38,635] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,644] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,654] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,663] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:38,673] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,679] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,681] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:38,699] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,708] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,717] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:38,726] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,735] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,744] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,754] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,764] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,773] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,780] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,782] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:38,799] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:38,808] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,817] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,826] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,835] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,842] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,843] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:38,860] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,869] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,878] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:38,887] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,896] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,902] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,904] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:38,921] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,928] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,929] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:38,946] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,953] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:38,955] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:38,972] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,979] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:38,980] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:38,997] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,007] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,015] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,025] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,034] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,041] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,043] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:39,061] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,068] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:39,070] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:39,087] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,096] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,106] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,115] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,125] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,132] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,133] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:39,151] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:39,158] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,160] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:39,180] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,188] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,189] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:39,210] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,218] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,220] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:39,239] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:39,249] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,259] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,270] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,281] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,288] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,290] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:39,309] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,320] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,329] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:39,338] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,349] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,358] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,369] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,381] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,390] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,397] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,399] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:39,417] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:39,424] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,426] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:39,445] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,454] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,463] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,473] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,481] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,491] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:39,500] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,510] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,520] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,527] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,529] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:39,546] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,556] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,565] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,574] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:39,584] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,593] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,602] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,612] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,621] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,628] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,630] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:39,647] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,654] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:39,656] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:39,673] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,682] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,691] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,700] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,709] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,717] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,727] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:39,737] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,746] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,753] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,755] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:39,771] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,781] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,790] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,800] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,809] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:39,816] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,817] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:39,834] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,841] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,843] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:39,860] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,869] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,878] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,886] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:39,894] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,902] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,911] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,919] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,928] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,935] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,937] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:39,955] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:39,962] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,964] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:39,982] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,991] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:39,999] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,008] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,016] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,024] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,033] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:40,042] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,051] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,058] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,060] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:40,077] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,086] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,094] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,103] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,111] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:40,119] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,128] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,137] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,146] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,153] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,155] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:40,172] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,181] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,190] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,199] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,208] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,216] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,225] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,234] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,243] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:40,250] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,252] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:40,270] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,277] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,278] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:40,295] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,304] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,312] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,321] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:40,329] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,337] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,346] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,355] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,365] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,371] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,373] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:40,390] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,397] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:40,399] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:40,416] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,424] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,426] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:40,442] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,449] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,451] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:40,468] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,475] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,477] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:40,494] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,503] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,512] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,521] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,530] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,538] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:40,547] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,556] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,565] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,572] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,574] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:40,590] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,600] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,609] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,618] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:40,628] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,635] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,636] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:40,654] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,661] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,663] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:40,679] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:40,687] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,689] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:40,705] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,715] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,723] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,732] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,741] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,749] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,758] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:40,767] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,776] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,783] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,784] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:40,801] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,811] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,820] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,829] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,839] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:40,845] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,847] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:40,864] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,871] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,873] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:40,890] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:40,898] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,907] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,915] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,924] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,932] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,940] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,949] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,958] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,964] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:40,966] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:40,982] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:40,991] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,000] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,010] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,020] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,027] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,028] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:41,046] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:41,055] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,064] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,073] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,082] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,090] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,100] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,108] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,118] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,124] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:41,126] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:41,143] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,153] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,165] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:41,174] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,184] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,191] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,193] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:41,212] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,219] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,221] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:41,239] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,249] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:41,258] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,268] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,278] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,285] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,286] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:41,303] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,313] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,322] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,333] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:41,342] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,349] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,350] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:41,367] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,376] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,386] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,395] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:41,405] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,411] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,413] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:41,431] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,440] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,450] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,459] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,469] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,476] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:41,477] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:41,494] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,503] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,511] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,520] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,528] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,536] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,545] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,554] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:41,563] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,570] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,571] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:41,588] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,595] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,597] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:41,614] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:41,623] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,632] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,641] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,651] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,657] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,659] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:41,678] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,685] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,687] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:41,706] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,716] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,726] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,736] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,746] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,753] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,755] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:41,773] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,781] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:41,783] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:41,800] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,809] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,819] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,827] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,836] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,845] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,854] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:41,864] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,874] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,881] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,883] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:41,900] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,909] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,917] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,926] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,935] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:41,943] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,953] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,962] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,971] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,978] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:41,980] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:41,999] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,006] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,008] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:42,026] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,037] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,047] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,056] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,066] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,075] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,085] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:42,095] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,105] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,112] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,114] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:42,131] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,140] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,150] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,158] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,167] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:42,176] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,185] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,194] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,204] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,210] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,212] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:42,230] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,239] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,248] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:42,257] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,266] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,275] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,284] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,293] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,303] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,310] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,312] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:42,329] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,337] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,339] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:42,355] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,364] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,373] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,383] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,392] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,399] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:42,401] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:42,418] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,427] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,436] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,445] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,454] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,463] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,472] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,481] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:42,491] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,498] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,500] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:42,517] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,527] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,536] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:42,544] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,553] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,562] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,571] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,580] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,589] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,596] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,598] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:42,615] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:42,626] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,635] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,644] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,653] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,660] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,662] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:42,678] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,688] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,698] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:42,707] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,717] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,724] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,725] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:42,742] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,751] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,760] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,770] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,779] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:42,786] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,788] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:42,805] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,813] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,815] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:42,832] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,841] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,850] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,858] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,866] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,875] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:42,883] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,892] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,901] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,908] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,909] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:42,927] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,935] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,936] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:42,954] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:42,961] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,963] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:42,980] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,987] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:42,989] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:43,006] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,015] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:43,024] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,034] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,042] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,051] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,060] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,070] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,079] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,086] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,088] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:43,106] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,115] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,125] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,134] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,145] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,153] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,155] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:43,172] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,182] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:43,191] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,200] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,209] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,216] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,217] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:43,234] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,243] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,252] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,260] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:43,268] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,276] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,285] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,293] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:43,302] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,310] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,311] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:43,328] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,337] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,346] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,356] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,365] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,372] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:43,373] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:43,391] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,398] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,400] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:43,418] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,425] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,427] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:43,443] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,453] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:43,462] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,471] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,480] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,487] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,489] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:43,505] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,512] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,514] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:43,531] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,540] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,549] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,558] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,568] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,574] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,576] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:43,593] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,601] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:43,602] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:43,619] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,629] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,639] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,648] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,658] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,664] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,666] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:43,683] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:43,693] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,702] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,712] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:43,721] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,728] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,730] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:43,748] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,755] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,757] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:43,773] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,782] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,791] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:43,800] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,810] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,817] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,818] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:43,836] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,845] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,854] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,863] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,872] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:43,883] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,893] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,903] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,914] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,921] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,923] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:43,941] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,951] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,960] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,969] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,979] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,987] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:43,997] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,005] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,015] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:44,021] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,023] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:44,042] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,051] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,052] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:44,071] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,082] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,091] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,102] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:44,114] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,124] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,135] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,145] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,156] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,164] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,166] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:44,185] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,200] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:44,214] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,228] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:44,242] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,254] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,266] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,278] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,289] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,298] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,300] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:44,322] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,333] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:44,344] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,355] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,366] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,374] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,376] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:44,395] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,406] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,416] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,426] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:44,434] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,443] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,452] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,461] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,470] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,477] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,478] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:44,495] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,505] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:44,515] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,525] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,534] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,545] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,556] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,565] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,576] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,583] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,585] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:44,605] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,616] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,625] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,635] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,645] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,654] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,664] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,674] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,684] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:44,692] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,694] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:44,714] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,725] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,735] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,747] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,757] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,768] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,779] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:44,789] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:44,800] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,808] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,809] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:44,832] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,839] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,841] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:44,861] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,872] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,883] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:44,893] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,904] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,912] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,914] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:44,935] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,945] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,956] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,967] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,978] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:44,986] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:44,988] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:45,007] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:45,018] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,035] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,047] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,064] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,072] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,074] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:45,096] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,112] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,121] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:45,130] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,139] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,149] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,158] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,168] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,178] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,184] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,186] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:45,203] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:45,210] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,212] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:45,230] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,238] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,240] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:45,259] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,270] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,280] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:45,290] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,300] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,308] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,309] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:45,327] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,338] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,348] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,358] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,368] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:45,378] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,389] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,400] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,410] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,418] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,420] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:45,436] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,445] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,454] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:45,462] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,470] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,478] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,487] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,496] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,505] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,511] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,513] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:45,530] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,539] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,547] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,555] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,564] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,572] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,581] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,590] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,598] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:45,605] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,606] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:45,623] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,633] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,642] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,652] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,661] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,668] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,669] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:45,686] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,696] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,704] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,713] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:45,721] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,729] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,738] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,747] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,756] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,763] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,764] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:45,781] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,790] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:45,800] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,809] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,818] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,825] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,827] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:45,845] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,854] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,864] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,874] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:45,883] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,892] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,902] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,912] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,922] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,931] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,933] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:45,953] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,963] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:45,973] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,983] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:45,992] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,002] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,011] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,022] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,032] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,040] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,042] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:46,062] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,072] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,083] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,092] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,102] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,111] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,121] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,131] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,140] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:46,147] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,149] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:46,166] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,176] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,185] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,194] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,203] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,212] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,222] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:46,231] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,240] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,247] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:46,249] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:46,266] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,273] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,274] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:46,291] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,301] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,310] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,322] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,333] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:46,343] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,346] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:46,369] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,381] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,393] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,403] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,413] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,420] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,422] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:46,442] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,453] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:46,462] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,471] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,480] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,489] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,499] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,509] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,519] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,527] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,529] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:46,552] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,569] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,580] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,592] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,603] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,614] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,624] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,636] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,649] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:46,657] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,660] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:46,683] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,695] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,706] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,717] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,728] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:46,738] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,750] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,761] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,772] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,780] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,782] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:46,801] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,811] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,822] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:46,832] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,842] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,850] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,852] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:46,871] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,880] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,882] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:46,902] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,912] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:46,922] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,932] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,941] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,950] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,959] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,969] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,979] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:46,987] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:46,989] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:47,008] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,017] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,019] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:47,040] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,049] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,051] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:47,070] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,084] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:47,094] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,105] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,116] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,123] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,125] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:47,145] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,154] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,156] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:47,176] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:47,187] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:47,197] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,206] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,215] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,224] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,235] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,244] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,254] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,261] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,264] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:47,283] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,291] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,293] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:47,311] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,319] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,321] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:47,341] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,351] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,360] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:47,371] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,381] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,390] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,401] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,411] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,422] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,430] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,432] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:47,452] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:47,461] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:47,471] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,481] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,491] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,499] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,501] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:47,519] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,528] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,538] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,548] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:47,557] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,567] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,576] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,586] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,596] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,604] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,606] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:47,625] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,636] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:47,646] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,656] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,666] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,676] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,687] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,697] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:47,707] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,715] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,717] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:47,736] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,743] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,745] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:47,764] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,773] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,782] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:47,792] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,801] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,807] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,809] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:47,826] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,837] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,846] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,854] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,863] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:47,872] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,881] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,890] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,900] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,906] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,908] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:47,925] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,934] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,943] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,951] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,959] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,968] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,976] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,985] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:47,994] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:48,001] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,003] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:48,020] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,029] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,038] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,048] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,057] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,064] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,066] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:48,083] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,090] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,092] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:48,110] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,118] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,120] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:48,138] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,148] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,158] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:48,169] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,178] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,188] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,199] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:48,208] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,220] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,227] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,229] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:48,250] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,260] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,270] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,280] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,289] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:48,299] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,308] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,318] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,328] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,335] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,337] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:48,355] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,363] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,365] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:48,382] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,392] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,401] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,411] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,420] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,427] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,428] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:48,446] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,454] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,455] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:48,473] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,482] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,491] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,500] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,509] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,519] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:48,529] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,539] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,548] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,555] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,557] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:48,575] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,584] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,593] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,602] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:48,611] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,621] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,631] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,641] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,651] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,658] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,660] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:48,680] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,688] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,690] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:48,711] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,722] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,733] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,743] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,753] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,763] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:48,773] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,784] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,794] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,802] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,804] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:48,823] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,835] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,845] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,856] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:48,866] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:48,876] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,886] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,896] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,907] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,914] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,917] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:48,935] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,945] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,955] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:48,964] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,973] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,983] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:48,993] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,003] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,013] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,021] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,023] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:49,042] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:49,053] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,062] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,073] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,083] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,092] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,102] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,111] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,122] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:49,129] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,132] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:49,151] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,161] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,171] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,181] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,190] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,200] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,210] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:49,221] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,231] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,238] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,240] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:49,259] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,271] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,281] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,292] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,302] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:49,309] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,311] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:49,330] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,338] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:49,340] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:49,359] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,369] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,379] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,390] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,400] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,407] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,409] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:49,430] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:49,438] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,440] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:49,461] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,469] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,471] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:49,491] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,499] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,501] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:49,521] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:49,529] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,531] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:49,549] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,557] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,559] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:49,575] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,582] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,584] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:49,600] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,609] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,618] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:49,628] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,637] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,644] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,646] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:49,664] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,671] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,673] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:49,691] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,699] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:49,701] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:49,719] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,728] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,730] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:49,748] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,756] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,758] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:49,777] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,786] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,796] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,806] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,816] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,825] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,835] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,845] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,854] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:49,862] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,863] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:49,879] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,888] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,898] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,908] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,917] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,924] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,925] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:49,943] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,950] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,952] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:49,971] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,979] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:49,981] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:50,001] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,012] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,022] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,033] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,042] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,053] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:50,063] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,073] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,083] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,091] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,092] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:50,111] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,120] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,122] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:50,139] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:50,149] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,158] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,167] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,177] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,184] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,186] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:50,203] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,210] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,212] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:50,229] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,236] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,238] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:50,255] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,262] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,265] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:50,284] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,294] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,304] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,314] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,324] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,333] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,342] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,352] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,361] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:50,368] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,370] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:50,386] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:50,396] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,405] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,415] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,424] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,431] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,433] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:50,450] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,459] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,468] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:50,477] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,486] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,493] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,495] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:50,512] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,520] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,522] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:50,539] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,546] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:50,547] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:50,565] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,573] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,574] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:50,591] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,598] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,599] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:50,616] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,623] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:50,625] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:50,642] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,650] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,651] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:50,669] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,676] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,678] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:50,699] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,709] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,719] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:50,729] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,739] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,748] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,758] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,768] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,779] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,786] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,788] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:50,808] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:50,817] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,819] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:50,840] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,848] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,851] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:50,872] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,884] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,895] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,905] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,916] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,925] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,936] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,945] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,956] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:50,964] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,966] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:50,986] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:50,997] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,006] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,016] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,026] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,036] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,046] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:51,057] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:51,067] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,074] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,075] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:51,093] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,102] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,112] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,121] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,131] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,140] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:51,150] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,159] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,169] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,177] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,179] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:51,200] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,207] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,209] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:51,228] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:51,239] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,248] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,259] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,271] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,278] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,280] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:51,300] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,308] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,310] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:51,331] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,340] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,341] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:51,361] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,371] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,381] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:51,391] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,400] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,409] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,418] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,427] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,436] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,443] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,445] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:51,463] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:51,471] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,473] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:51,492] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,500] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,502] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:51,521] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,532] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,543] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,554] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,565] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,572] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:51,574] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:51,594] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,605] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,615] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,649] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,663] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,672] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,675] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:51,697] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:51,708] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,719] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,729] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,739] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,747] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,749] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:51,769] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,779] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,790] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:51,799] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,808] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,817] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,827] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,838] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,847] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,856] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,857] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:51,876] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:51,886] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,897] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,907] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,917] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,925] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,927] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:51,945] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:51,956] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,967] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,978] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,989] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,996] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:51,998] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:52,017] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,027] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,037] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:52,046] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,055] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,065] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,075] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,085] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,094] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,102] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,104] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:52,124] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:52,135] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,144] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,155] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,165] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,175] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,186] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,196] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:52,206] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,214] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,216] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:52,235] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,243] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,245] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:52,264] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,274] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,285] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:52,295] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,305] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,312] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,314] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:52,334] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,345] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,355] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,366] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,376] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:52,385] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,387] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:52,406] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,416] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:52,426] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,436] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,447] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,455] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,457] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:52,476] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,487] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,497] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,508] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:52,519] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,526] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,528] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:52,549] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,557] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,559] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:52,578] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,590] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,601] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:52,612] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,623] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,632] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,634] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:52,654] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:52,665] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,676] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,686] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,696] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,706] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,716] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,726] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,736] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,743] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:52,744] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:52,763] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,774] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,784] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,794] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,804] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,812] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,814] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:52,834] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:52,844] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,854] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,863] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,872] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,882] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,891] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,902] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,912] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,920] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:52,922] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:52,941] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:52,952] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,962] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,973] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,984] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,991] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:52,993] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:53,012] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,020] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,022] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:53,040] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,048] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,050] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:53,068] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,078] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,087] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,097] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,106] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,116] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:53,125] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,136] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,146] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,154] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,156] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:53,175] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,185] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,195] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:53,204] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,214] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,223] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,233] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,243] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,253] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,261] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,263] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:53,282] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:53,291] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,293] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:53,313] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,323] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,332] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,342] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,352] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,361] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,372] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:53,381] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,392] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,400] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,402] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:53,421] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,428] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,430] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:53,451] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,461] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:53,471] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,482] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,491] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,502] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,511] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,521] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,530] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,537] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,539] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:53,557] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,568] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,578] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,587] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,596] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,606] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,617] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,627] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,637] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:53,645] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,646] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:53,665] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,676] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,686] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,695] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,706] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,714] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,716] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:53,737] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:53,748] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,758] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,767] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,777] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,787] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,798] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,808] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,818] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,825] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:53,827] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:53,848] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,860] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,871] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,881] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,891] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,902] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,912] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,922] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:53,933] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,940] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,942] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:53,963] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,972] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:53,974] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:53,993] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,004] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,015] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:54,026] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:54,037] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,044] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,046] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:54,067] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,077] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,088] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,098] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,109] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,119] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:54,129] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,140] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,150] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,158] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,159] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:54,178] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,189] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,199] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,210] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:54,221] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,228] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,231] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:54,251] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:54,262] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,272] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,281] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,291] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,300] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,310] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,320] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,330] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,338] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:54,339] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:54,358] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,369] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,378] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,388] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,397] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,407] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,418] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,428] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:54,439] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,446] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,448] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:54,468] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,476] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,478] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:54,498] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,509] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,519] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:54,528] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,537] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:54,547] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,557] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,568] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,578] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,586] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,588] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:54,607] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,618] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,628] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:54,638] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,648] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,656] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,658] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:54,677] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,685] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,687] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:54,704] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,714] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:54,723] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,733] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,742] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,750] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,752] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:54,770] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,780] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,791] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:54,802] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,813] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,824] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,827] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:54,848] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,857] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,859] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:54,878] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,889] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:54,900] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,910] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,921] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,928] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,930] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:54,951] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,959] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:54,961] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:54,981] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:54,992] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,004] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,014] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,025] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,033] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:55,035] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:55,054] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,062] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,064] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:55,084] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,095] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,106] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,118] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,128] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:55,136] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,138] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:55,158] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,168] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,178] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,188] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,198] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,208] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,219] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:55,228] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,239] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:55,246] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,249] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:55,269] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,279] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,290] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,300] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,310] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,320] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,331] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:55,342] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,352] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,360] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,362] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:55,383] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,391] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,393] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:55,413] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,422] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:55,424] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:55,445] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,453] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:55,456] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:55,478] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,492] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,503] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,513] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,523] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,533] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,543] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,554] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:55,563] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,571] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,573] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:55,592] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,603] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,613] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,623] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,633] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,640] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:55,642] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:55,661] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:55,670] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,679] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,687] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,696] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,704] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,713] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,721] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,730] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,737] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:55,739] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:55,755] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,764] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,773] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,782] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,791] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,798] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,800] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:55,817] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:55,828] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,838] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,847] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,857] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,866] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,875] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,885] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,895] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,902] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:55,904] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:55,925] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,934] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,936] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:55,956] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,966] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,976] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,985] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:55,994] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,004] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,013] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,024] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,035] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:56,042] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,044] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:56,065] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,073] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,075] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:56,093] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,104] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,114] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,125] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:56,135] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,142] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,144] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:56,163] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,174] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,183] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,193] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,202] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,211] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:56,222] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,232] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,242] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,250] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:56,252] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:56,270] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,278] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,280] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:56,300] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,308] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,310] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:56,330] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,341] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:56,351] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,360] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,370] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,379] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,389] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,400] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,410] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,417] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,419] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:56,438] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,448] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:56,458] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,469] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,479] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,488] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,489] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:56,509] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,520] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,530] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,541] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:56,551] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,560] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,571] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,581] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,590] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,597] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,599] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:56,617] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,627] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:56,637] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,647] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,657] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,667] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,678] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,689] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:56,699] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,707] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,709] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:56,729] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,739] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,749] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,759] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,769] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,778] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:56,789] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,799] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,810] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,818] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,820] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:56,839] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,849] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,858] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,868] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:56,877] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,886] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,895] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,905] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:56,915] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,922] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,924] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:56,943] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,953] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,962] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,972] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,983] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:56,992] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:57,003] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,013] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,023] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,031] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,033] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:57,052] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,062] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,071] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,080] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:57,090] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,100] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,110] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,120] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:57,130] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,138] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,140] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:57,160] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,170] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,180] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,190] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,200] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,210] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:57,220] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,230] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,240] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,248] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,250] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:57,270] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,280] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,291] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,302] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:57,312] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,323] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,333] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,343] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:57,355] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,362] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,364] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:57,385] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,393] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,395] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:57,415] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,426] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,438] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:57,449] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,460] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,468] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,470] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:57,491] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,500] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,502] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:57,521] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,529] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:57,531] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:57,552] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,562] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:57,573] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,583] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,593] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,603] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,614] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,624] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,635] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,642] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,644] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:57,664] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,675] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,686] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,696] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,707] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,714] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,716] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:57,737] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,748] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:57,758] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,769] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,779] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,786] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,788] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:57,807] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,814] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,817] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:57,836] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:57,846] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:57,857] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,866] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,877] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,887] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,898] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,908] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,917] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,925] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,927] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:57,946] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,957] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,968] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,978] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,988] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,995] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:57,997] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:58,017] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,027] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:58,038] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,048] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,058] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,066] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,068] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:58,087] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,095] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,097] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:58,117] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:58,128] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:58,139] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,150] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,160] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,168] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,170] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:58,189] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,199] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,209] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,220] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:58,230] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,238] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,240] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:58,259] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,270] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,280] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,291] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,302] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,309] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:58,311] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:58,332] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,339] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,341] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:58,362] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,374] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:58,385] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,396] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,407] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,417] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,427] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,436] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,446] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,454] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,456] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:58,474] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,482] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,485] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:58,502] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,513] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,523] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,533] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,543] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,551] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:58,552] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:58,571] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,578] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,580] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:58,601] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,609] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,611] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:58,631] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,641] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:58,651] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,660] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:58,670] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,679] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,689] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,700] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,710] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,718] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,720] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:58,739] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,749] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:58,759] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,771] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,781] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,788] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,790] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:58,809] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,818] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,820] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:58,839] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:58,849] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,859] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,869] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,879] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,887] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,889] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:58,909] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,920] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:58,930] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,942] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,952] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,960] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,962] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:58,982] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,990] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:58,992] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:59,014] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:59,021] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,023] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:59,040] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,048] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,050] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:59,069] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,079] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,088] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,097] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:59,105] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,114] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,123] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,132] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,142] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,149] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,151] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:59,171] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,178] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,180] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:59,201] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,212] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,223] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,235] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,245] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,253] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:59,255] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:59,274] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,282] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,284] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:59,304] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,312] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,314] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:59,335] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,345] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:59,355] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,365] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,380] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:59,391] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,401] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,410] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,420] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,427] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,429] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:59,448] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,456] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,458] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:59,477] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,485] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,487] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:59,506] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,517] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,527] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,537] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,547] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,557] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:59,567] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,577] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,587] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,594] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,596] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:59,613] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,622] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,631] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:59,639] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,648] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,656] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,665] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,674] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,684] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,690] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,692] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:59,711] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:59,722] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,731] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,741] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,751] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,760] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,771] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,780] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,790] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,798] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:59,800] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:59,820] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,829] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,831] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:59,849] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,860] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,871] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,881] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,891] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:59,898] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,900] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:36:59,921] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,933] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,943] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,953] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,962] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,972] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:36:59,983] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:36:59,992] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,003] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,010] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,012] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:00,032] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,042] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,052] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,061] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,070] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:00,080] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,090] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,099] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:00,109] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,118] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,120] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:00,140] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,150] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,160] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,170] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,180] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,190] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:00,201] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,211] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,221] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,229] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,231] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:00,251] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,258] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,260] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:00,281] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:00,290] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,291] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:00,312] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,323] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:00,333] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,343] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,354] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,364] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,375] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,386] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,396] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,404] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,406] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:00,426] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,435] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,437] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:00,457] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,465] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,467] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:00,487] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,495] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,498] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:00,518] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,528] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,539] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,549] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,559] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,571] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,581] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,592] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,602] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:00,609] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,611] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:00,633] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,644] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,654] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,664] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,675] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,685] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,696] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,706] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,716] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:00,724] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,726] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:00,745] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,756] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,766] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,776] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,786] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,796] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,807] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:00,817] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,827] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,836] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,837] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:00,856] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,867] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,878] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,889] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,899] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:00,907] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,908] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:00,928] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,939] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,950] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,959] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,969] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,979] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:00,989] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:00,999] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,009] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,017] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,019] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:01,037] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:01,048] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,059] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,070] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,080] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,088] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,090] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:01,109] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,120] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,130] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:01,141] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,151] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,159] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,160] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:01,181] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,190] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,192] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:01,211] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,220] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:01,221] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:01,240] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,251] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,261] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,272] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,282] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,290] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,292] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:01,312] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,321] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,323] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:01,342] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,351] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,353] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:01,372] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,381] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,383] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:01,404] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,415] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,425] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,434] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,443] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,454] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,463] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,474] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,484] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:01,490] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,492] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:01,510] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,520] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,529] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,539] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,547] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,557] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,568] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,578] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,589] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:01,596] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,599] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:01,619] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,629] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,639] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,650] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,660] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,670] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,680] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:01,690] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:01,700] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,707] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,709] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:01,730] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,738] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,740] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:01,760] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,768] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,771] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:01,789] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,797] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,799] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:01,818] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,826] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,828] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:01,846] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,857] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,866] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:01,877] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,889] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,896] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,899] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:01,919] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,927] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,929] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:01,949] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,959] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,970] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,981] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:01,992] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,000] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:02,002] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:02,022] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,033] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,043] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,055] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,066] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,074] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,076] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:02,096] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:02,106] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,116] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,126] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:02,137] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,144] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,146] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:02,166] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,177] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,187] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,197] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,208] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,216] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:02,217] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:02,235] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,244] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,254] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,264] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,275] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,282] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,284] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:02,304] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:02,315] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,325] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,335] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,345] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:02,355] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,365] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,375] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,386] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,393] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,395] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:02,416] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,424] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,426] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:02,445] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,456] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,466] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,476] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,486] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,493] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,495] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:02,516] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,526] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:02,536] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,546] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,556] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,563] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,565] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:02,585] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,595] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:02,606] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,617] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,627] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,635] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,637] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:37:02,657] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,669] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,678] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,689] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:37:02,698] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,708] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,719] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,728] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,739] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,746] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:37:02,748] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:35,681] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,691] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,700] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,709] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,719] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,726] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,728] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:35,746] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,756] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:35,765] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,774] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,783] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,792] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,802] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,812] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,822] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,829] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,831] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:35,849] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,857] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,859] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:35,876] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,884] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,885] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:35,903] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,913] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,923] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,933] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,943] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,950] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:35,952] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:35,969] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,979] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,988] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:35,998] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,007] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,014] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,016] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:36,033] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:36,041] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,043] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:36,060] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,070] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,079] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,087] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:36,096] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,104] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,113] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,122] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,131] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,137] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,139] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:36,157] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,167] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:36,176] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,186] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,194] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,203] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,213] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,222] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,232] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,239] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,241] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:36,258] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,267] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,276] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,285] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,294] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,301] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,303] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:36,320] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,330] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:36,339] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:36,347] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,357] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,366] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,375] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,384] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,393] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,400] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,402] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:36,420] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:36,430] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,439] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,448] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,458] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,466] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,468] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:36,489] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,497] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,499] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:36,520] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,529] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,531] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:36,551] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,562] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,573] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,584] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,594] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,604] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:36,615] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,624] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,634] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,641] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,643] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:36,660] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,670] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,679] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,689] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:36,698] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,705] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,707] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:36,728] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,737] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,738] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:36,760] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,770] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,781] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:36,792] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,802] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,813] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,825] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,835] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,845] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:36,853] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,855] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:36,879] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,889] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,900] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,912] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,922] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,933] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,943] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:36,953] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,964] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,971] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:36,973] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:36,995] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,005] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,017] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,031] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,045] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:37,053] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,055] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:37,079] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,090] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,100] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,112] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,122] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,132] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,143] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,152] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,163] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:37,170] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,173] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:37,195] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,206] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,217] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,228] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,238] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,249] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,259] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:37,269] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,279] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,287] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,288] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:37,307] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,318] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,327] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,337] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,347] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:37,356] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,366] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,376] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,385] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,392] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,394] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:37,412] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,422] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,432] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:37,441] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,450] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,459] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,469] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,479] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,488] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:37,496] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,499] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:37,517] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,526] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,536] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,545] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,554] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,563] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,573] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:37,582] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,592] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,600] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,601] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:37,620] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,630] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,640] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,649] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,659] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:37,666] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,668] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:37,685] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,695] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,704] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:37,714] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,724] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,730] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,732] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:37,751] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,761] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,771] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,781] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,791] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:37,798] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,800] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:37,818] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,825] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,827] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:37,845] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,852] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,854] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:37,872] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:37,881] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,890] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,898] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,907] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,915] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,924] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,933] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:37,943] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,951] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,953] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:37,974] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,984] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:37,994] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,004] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,016] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,026] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:38,036] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,051] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,063] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,070] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,072] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:38,093] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,101] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,103] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:38,124] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:38,132] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,134] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:38,154] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:38,164] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,174] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,185] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,194] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,201] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,203] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:38,221] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,230] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,231] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:38,250] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,260] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,269] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,279] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,288] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,296] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,297] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:38,316] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,326] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:38,336] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,346] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,356] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,364] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,366] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:38,386] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,397] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,407] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:38,419] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,429] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,439] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,450] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,461] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,471] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,478] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,480] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:38,499] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:38,510] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,519] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,529] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,539] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,546] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,548] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:38,568] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,576] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,579] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:38,599] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,610] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,620] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,631] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,641] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,652] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,663] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,673] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,683] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:38,691] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,693] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:38,715] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,723] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,726] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:38,747] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,758] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,768] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,778] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:38,787] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,797] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,806] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,817] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,829] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,837] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,838] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:38,858] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,869] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:38,879] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,890] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:38,901] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,909] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,911] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:38,933] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,941] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,944] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:38,968] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,977] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:38,979] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:38,998] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,006] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,008] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:39,030] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,040] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,050] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,062] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,073] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,084] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:39,086] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:39,106] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:39,118] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,129] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,141] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,151] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,161] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,171] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,182] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,193] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,201] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:39,203] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:39,224] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,235] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,245] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,256] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,267] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,275] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,277] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:39,298] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:39,309] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,319] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,330] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,340] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,348] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,349] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:39,369] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,381] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,391] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:39,402] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:39,412] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,422] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,433] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,443] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,453] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,461] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,462] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:39,482] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,493] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:39,502] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,513] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,522] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,532] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,542] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,551] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,563] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,570] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,572] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:39,589] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,599] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,608] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,617] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,625] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,633] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,642] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,651] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,660] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:39,667] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:39,669] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:39,688] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,696] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,698] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:39,716] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,724] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,726] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:39,745] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,755] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:39,764] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,773] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,783] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,792] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,801] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,811] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,820] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,827] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,829] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:39,851] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,861] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,873] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:39,883] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,893] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,900] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,902] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:39,921] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,932] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,942] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,952] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,961] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:39,970] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,980] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:39,990] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,000] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,007] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,009] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:40,028] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,036] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,038] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:40,061] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,075] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,087] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,099] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:40,109] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,116] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,118] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:40,138] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,148] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,159] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,169] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,181] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,190] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:40,200] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,210] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,220] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,229] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,231] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:40,250] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,258] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,260] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:40,280] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:40,292] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,302] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,314] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:40,325] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,333] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,335] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:40,356] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,367] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,378] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,389] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,401] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,409] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:40,411] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:40,432] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,439] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,442] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:40,463] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,471] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,473] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:40,492] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,502] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:40,511] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,520] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,528] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,537] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:40,546] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,555] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,565] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,571] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,573] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:40,592] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,602] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,613] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,622] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:40,632] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,641] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,651] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,661] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,671] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,678] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,680] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:40,699] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,709] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:40,719] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,728] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,737] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,746] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,755] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,764] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,773] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:40,781] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,783] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:40,803] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,814] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,823] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,832] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,841] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,851] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,861] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:40,871] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,880] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,887] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,889] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:40,906] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,915] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,924] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,934] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,944] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:40,951] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,953] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:40,972] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,979] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:40,981] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:41,002] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,012] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,022] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,033] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,042] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,052] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,063] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,072] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,083] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:41,090] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,092] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:41,112] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,119] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,121] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:41,143] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,151] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,153] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:41,174] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:41,184] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,194] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,203] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,212] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,222] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,231] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,241] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,250] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,260] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:41,262] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:41,280] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,288] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,289] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:41,309] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,319] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,329] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,338] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,347] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,357] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,367] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,376] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,386] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:41,394] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,396] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:41,415] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,423] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,425] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:41,447] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,455] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,457] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:41,476] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:41,485] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,494] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,504] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,514] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,521] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,523] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:41,542] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,552] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,561] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:41,571] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,581] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,588] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,589] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:41,608] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,618] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,627] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,636] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,646] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,655] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,664] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,674] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,684] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:41,695] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,697] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:41,720] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,729] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,731] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:41,752] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,765] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,775] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,786] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:41,796] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,805] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,818] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,828] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,838] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,845] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,847] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:41,864] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,874] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:41,884] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,894] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,903] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:41,910] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,912] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:41,931] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,939] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,941] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:41,960] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,971] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,980] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:41,990] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:42,000] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,007] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,009] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:42,029] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,039] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,051] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,063] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,073] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,080] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:42,082] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:42,100] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,107] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,109] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:42,129] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,139] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,148] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,158] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,167] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,176] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,185] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,195] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,205] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:42,213] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,215] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:42,234] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,243] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,252] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,262] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,271] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,279] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,281] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:42,299] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,306] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,308] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:42,326] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,335] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,345] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,355] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,364] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,371] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:42,373] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:42,390] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,400] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,409] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,419] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:42,429] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,435] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,437] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:42,456] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,466] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,475] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,484] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,493] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,502] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:42,511] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,521] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,531] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,538] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,539] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:42,557] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,567] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,576] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,586] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:42,597] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,604] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,605] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:42,623] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,634] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,642] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:42,651] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,659] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,668] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,677] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,686] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,695] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,702] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,704] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:42,722] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:42,731] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,741] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,750] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,760] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,767] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,769] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:42,787] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,797] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,807] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:42,817] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,827] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,834] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,836] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:42,854] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,865] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,874] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,884] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,893] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:42,900] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,902] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:42,919] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,929] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,937] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,947] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,955] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,963] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,972] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,982] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:42,991] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:42,998] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,000] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:43,018] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,024] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,026] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:43,046] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,056] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,067] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,076] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:43,085] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,094] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,104] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,114] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,123] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,130] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,132] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:43,149] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,159] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:43,168] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,177] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,185] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,194] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,203] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:43,214] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,223] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,230] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,232] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:43,250] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,258] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,260] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:43,278] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,285] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:43,287] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:43,306] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,316] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,326] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,336] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,346] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,355] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,365] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,374] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:43,387] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,394] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,396] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:43,416] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,426] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,436] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:43,446] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,455] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,467] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,477] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,487] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,497] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,504] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,506] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:43,526] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:43,536] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,545] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,554] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,564] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,574] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,584] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,594] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,603] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,611] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:43,613] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:43,633] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,643] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,652] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,662] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,671] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,679] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,689] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,698] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:43,708] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:43,715] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,718] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:43,736] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,745] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,755] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,765] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,774] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,781] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,783] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:43,800] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,809] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,819] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,828] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,837] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,844] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,846] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:43,863] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,873] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:43,882] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,891] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,899] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,908] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,916] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:43,925] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,935] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,942] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,944] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:43,962] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,973] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,983] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:43,993] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,003] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:44,012] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,022] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,032] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,043] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,051] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,052] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:44,072] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,079] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,081] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:44,098] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,108] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,118] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,128] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,137] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,145] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,147] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:44,165] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,175] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,184] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,193] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,202] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,211] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,220] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,229] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,238] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:44,246] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,247] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:44,264] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,275] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,286] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,297] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,307] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,315] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,317] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:44,337] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,349] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:44,359] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,369] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,379] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,389] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,399] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,409] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,420] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,428] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,430] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:44,448] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,458] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,468] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,478] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,487] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,497] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,507] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,517] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,527] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:44,535] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,537] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:44,556] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,564] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,566] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:44,586] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,596] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,598] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:44,620] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:44,628] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,630] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:44,649] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,656] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,658] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:44,679] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,689] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,699] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,710] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,720] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,727] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:44,729] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:44,748] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,758] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,768] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,781] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,790] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,799] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,809] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,818] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:44,828] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,834] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,836] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:44,855] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,865] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,874] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,883] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,893] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,900] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,902] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:44,920] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,929] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:44,938] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,947] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,956] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,965] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,974] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,983] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:44,993] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,000] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,001] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:45,020] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,031] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,040] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:45,051] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,061] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,068] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,070] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:45,088] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,099] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,108] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,118] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,128] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:45,135] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,137] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:45,156] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,163] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,165] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:45,184] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,194] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,203] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,212] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:45,220] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,229] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,237] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,247] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,256] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,263] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,265] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:45,283] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,293] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,303] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,316] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,326] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,333] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,335] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:45,352] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,364] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:45,374] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,383] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,392] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,399] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,401] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:45,420] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,427] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,429] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:45,447] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:45,457] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,466] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,477] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,486] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,498] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,507] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,517] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,527] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,534] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:45,535] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:45,555] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,563] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,564] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:45,584] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,592] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,594] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:45,618] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,630] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,640] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:45,651] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,661] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,671] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,681] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,690] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,700] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,707] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,709] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:45,729] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:45,743] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,745] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:45,775] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,787] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,801] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,815] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,829] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,841] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,844] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:45,868] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,879] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,882] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:45,908] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,921] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,932] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,946] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:45,957] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,966] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,976] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,986] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:45,996] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,005] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,007] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:46,026] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,033] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:46,035] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:46,056] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,066] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,076] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,086] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,095] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,104] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,115] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,124] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:46,134] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,141] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,143] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:46,161] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,171] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,180] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,192] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,201] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,211] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:46,221] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,231] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,241] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,249] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,250] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:46,270] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,281] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,291] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,301] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:46,311] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,320] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,330] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,340] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,349] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,356] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,359] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:46,378] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,386] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:46,388] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:46,409] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,417] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,419] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:46,438] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,449] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:46,458] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,467] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,477] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,485] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,486] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:46,505] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,517] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,526] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,536] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:46,546] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,556] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,566] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,576] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,587] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,595] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,597] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:46,615] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,623] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:46,625] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:46,643] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,653] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,662] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,671] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,680] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,688] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:46,697] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,706] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,716] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,723] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,725] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:46,745] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,752] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,754] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:46,774] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:46,784] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,795] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,804] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,814] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,821] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,823] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:46,845] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,855] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,864] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:46,874] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,883] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,892] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,902] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,912] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,923] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,930] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:46,933] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:46,952] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,963] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,973] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,984] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:46,994] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,004] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,014] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,024] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:47,035] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,044] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,046] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:47,067] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,077] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,087] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,098] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,108] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,116] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:47,117] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:47,138] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:47,147] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,149] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:47,169] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,180] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,190] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,201] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,211] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,218] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,220] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:47,240] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,251] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,253] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:47,275] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,286] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,296] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,330] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,342] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,353] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:47,364] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,375] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,386] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,394] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,396] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:47,416] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,424] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,426] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:47,446] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:47,456] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,466] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,476] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,485] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,495] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,505] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,516] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,526] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,533] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:47,535] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:47,556] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,568] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,579] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,589] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,600] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:47,610] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,626] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,637] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,647] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,655] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,656] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:47,674] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,682] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,684] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:47,704] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,712] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,714] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:47,733] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,743] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,752] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,762] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,771] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,780] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:47,790] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,800] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,810] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,819] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,820] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:47,838] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,848] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,858] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:47,869] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,882] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,888] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,890] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:47,912] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,919] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,921] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:47,940] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,950] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:47,960] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,969] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,979] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,986] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:47,988] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:48,007] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,017] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,027] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,037] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:48,050] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,060] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,071] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,081] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,091] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:48,100] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,101] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:48,121] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,129] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,131] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:48,150] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,161] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,171] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,181] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:48,190] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,198] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,200] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:48,219] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,229] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,239] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,249] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,258] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,268] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:48,277] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,287] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,297] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,304] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,306] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:48,327] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,334] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,336] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:48,356] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,364] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,366] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:48,385] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,395] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,404] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:48,414] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,423] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,436] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,446] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,455] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,466] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,474] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,476] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:48,495] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:48,505] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:48,514] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,524] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,534] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,543] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,553] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,562] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,571] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,578] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,580] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:48,601] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,611] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,621] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,631] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,640] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,649] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,659] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,669] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,679] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:48,687] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,688] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:48,707] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,717] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,726] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,735] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,744] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,753] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,763] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:48,772] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,782] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:48,791] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,793] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:48,813] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,822] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,831] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,841] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,850] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,861] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,870] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:48,880] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,890] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,897] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,899] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:48,918] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,929] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,939] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,950] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,960] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:48,968] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,969] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:48,990] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:48,998] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:49,001] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:49,021] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,029] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,031] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:49,053] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,061] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,062] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:49,082] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,090] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:49,092] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:49,112] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,120] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,122] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:49,142] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,152] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,162] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,172] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,181] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:49,190] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,200] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:49,210] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,220] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,227] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,229] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:49,249] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,259] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,270] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,281] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,290] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:49,300] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,310] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,319] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,329] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,337] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,339] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:49,359] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,367] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,369] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:49,390] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,398] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,400] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:49,420] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,430] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:49,438] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,448] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,458] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,466] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,467] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:49,486] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,496] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,505] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,515] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:49,524] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,534] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,544] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,554] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,564] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,571] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,573] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:49,593] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,601] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:49,603] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:49,621] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,631] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,641] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,651] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,661] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,668] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,670] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:49,690] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,699] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,700] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:49,720] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,730] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,740] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,752] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,763] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,770] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:49,772] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:49,792] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,803] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,812] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,822] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,832] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,842] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,852] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,862] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:49,872] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:49,880] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,882] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:49,901] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,911] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,920] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,931] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,941] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,948] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,950] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:49,970] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,978] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:49,980] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:50,000] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,012] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,022] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,032] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,041] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,050] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:50,060] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,070] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,080] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,088] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:50,090] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:50,108] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,116] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,118] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:50,139] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,147] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,149] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:50,168] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,178] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:50,187] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,196] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,205] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,214] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,223] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,232] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,242] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,249] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,251] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:50,271] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,279] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,281] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:50,301] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,308] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,310] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:50,330] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,338] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,340] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:50,360] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,368] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,370] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:50,393] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,403] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,412] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,422] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,431] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,439] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,449] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,459] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,468] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:50,475] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,477] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:50,496] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,504] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,506] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:50,526] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,537] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,547] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,556] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,564] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,573] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,583] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,593] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,603] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:50,611] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,613] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:50,631] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,639] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,641] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:50,662] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,670] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,671] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:50,692] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:50,700] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,702] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:50,722] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,731] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,733] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:50,751] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,762] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,772] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,782] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:50,791] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,798] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,800] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:50,818] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,829] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,838] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,848] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,857] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,866] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,876] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,886] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,896] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:50,903] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,905] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:50,924] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,934] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,942] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,952] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,961] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,969] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,978] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:50,987] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:50,997] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,004] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,006] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:51,026] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,035] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,037] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:51,060] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,070] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:51,079] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,089] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,097] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,106] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:51,116] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,127] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,138] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,145] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,147] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:51,165] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,174] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,177] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:51,197] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:51,207] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,216] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,225] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,234] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,243] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,253] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,264] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,274] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,281] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:51,283] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:51,301] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,309] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,311] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:51,330] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,340] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,349] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:51,359] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,368] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,376] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,386] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,396] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,406] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,413] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,415] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:51,433] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:51,441] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,443] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:51,463] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,473] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,482] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,492] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,501] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,510] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,520] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:51,530] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,539] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,546] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,548] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:51,567] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,577] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,586] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,596] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,605] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:51,614] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:51,624] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,635] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,645] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,652] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,654] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:51,673] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,683] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,693] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,705] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:51,718] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,728] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,737] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,747] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,757] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,765] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,767] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:51,785] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,795] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:51,804] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,814] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,823] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,833] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,843] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,853] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:51,863] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,871] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,872] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:51,893] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,900] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,902] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:51,921] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,931] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,941] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:51,951] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,961] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,970] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,980] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:51,990] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,000] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,008] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,010] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:52,029] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:52,043] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,052] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,062] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,072] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:52,081] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,091] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,101] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,111] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,118] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,120] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:52,141] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,149] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,151] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:52,174] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,183] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,184] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:52,204] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,212] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,214] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:52,233] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,240] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,242] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:52,261] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,271] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,281] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,291] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,302] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,310] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,312] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:52,330] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,340] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,349] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,360] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,370] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,377] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,379] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:52,398] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,406] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:52,408] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:52,430] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,440] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,451] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,461] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,470] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,480] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,490] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,501] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:52,512] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,519] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,521] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:52,540] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,551] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,561] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,570] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,580] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:52,590] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,601] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,610] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,620] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,630] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,632] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:52,650] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,660] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,670] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:52,680] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,689] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,698] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,708] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,717] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,727] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,735] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,736] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:52,756] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:52,767] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,776] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,785] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,795] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,804] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,814] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,823] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,833] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:52,840] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,842] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:52,863] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,873] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,886] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,895] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,905] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,914] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,924] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:52,935] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,945] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,953] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,955] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:52,974] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,981] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:52,983] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:53,002] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,013] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:53,023] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,033] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,043] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:53,051] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,053] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:53,071] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,082] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,091] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,102] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,112] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,119] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,121] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:53,140] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,149] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,151] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:53,171] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,182] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,192] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,202] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,214] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,224] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:53,234] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,243] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,253] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:53,260] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,262] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:53,282] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,291] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,301] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,310] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,320] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,329] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,338] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:53,348] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,358] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,366] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,368] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:53,387] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,397] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,406] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,415] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,425] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:53,434] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,443] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,453] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,462] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:53,469] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,471] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:53,492] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,502] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,513] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,523] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,533] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,539] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,541] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:53,560] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,570] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,580] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,589] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,599] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,606] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,607] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:53,626] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,637] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:53,647] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,655] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,664] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,673] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:53,683] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,693] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,703] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,711] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,713] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:53,732] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,745] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,755] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,767] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:53,776] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,785] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,794] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,803] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,813] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,820] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,822] ERROR in app: Exception on /end [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 34, in on_end\n",
      "    handlers[\"end\"](end_game)\n",
      "NameError: name 'end_game' is not defined\n",
      "[2024-08-23 11:43:53,841] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,852] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2024-08-23 11:43:53,862] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,871] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,881] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n",
      "[2024-08-23 11:43:53,891] ERROR in app: Exception on /move [POST]\n",
      "Traceback (most recent call last):\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 2190, in wsgi_app\n",
      "    response = self.full_dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1486, in full_dispatch_request\n",
      "    rv = self.handle_user_exception(e)\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1484, in full_dispatch_request\n",
      "    rv = self.dispatch_request()\n",
      "  File \"/home/student/.local/lib/python3.10/site-packages/flask/app.py\", line 1469, in dispatch_request\n",
      "    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\n",
      "  File \"/tmp/ipykernel_225482/3331377049.py\", line 26, in on_move\n",
      "    return handlers[\"move\"](game_state)\n",
      "  File \"/tmp/ipykernel_225482/219260561.py\", line 176, in move\n",
      "    search(game_state[\"board\"][\"\"], my_head, move_points, 20)\n",
      "KeyError: ''\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n",
      "INFO\n",
      "go!\n",
      "GAME START with  1  snakes\n"
     ]
    }
   ],
   "source": [
    "# Welcome to\n",
    "# __________         __    __  .__                               __\n",
    "# \\______   \\_____ _/  |__/  |_|  |   ____   ______ ____ _____  |  | __ ____\n",
    "#  |    |  _/\\__  \\\\   __\\   __\\  | _/ __ \\ /  ___//    \\\\__  \\ |  |/ // __ \\\n",
    "#  |    |   \\ / __ \\|  |  |  | |  |_\\  ___/ \\___ \\|   |  \\/ __ \\|    <\\  ___/\n",
    "#  |________/(______/__|  |__| |____/\\_____>______>___|__(______/__|__\\\\_____>\n",
    "#\n",
    "# This file can be a nice home for your Battlesnake logic and helper functions.\n",
    "#\n",
    "# To get you started we've included code to prevent your Battlesnake from moving backwards.\n",
    "# For more info see docs.battlesnake.com\n",
    "\n",
    "import random\n",
    "import typing\n",
    "\n",
    "# info is called when you create your Battlesnake on play.battlesnake.com\n",
    "# and controls your Battlesnake's appearance\n",
    "# TIP: If you open your Battlesnake URL in a browser you should see this data\n",
    "def info() -> typing.Dict:\n",
    "    print(\"INFO\")\n",
    "#MMMM   CUSTOMIZATIONS\n",
    "    return {\n",
    "        \"apiversion\": \"1\",\n",
    "        \"author\": \"Banana Bhav\",  # TODO: Your Battlesnake Username\n",
    "        \"color\": \"#db16be\",  # TODO: Choose color\n",
    "        \"head\": \"all-seeing\",  # TODO: Choose head\n",
    "        \"tail\": \"mouse\",  # TODO: Choose tail\n",
    "    }\n",
    "\n",
    "\n",
    "# start is called when your Battlesnake begins a game\n",
    "def start(game_state: typing.Dict):\n",
    "    global start_snake_count\n",
    "    start_snake_count = len(game_state['board']['snakes'])\n",
    "    print(\"GAME START with \", start_snake_count,\" snakes\")\n",
    "\n",
    "\n",
    "# end is called when your Battlesnake finishes a game\n",
    "# this is not happening right now :/\n",
    "def end(end_game: typing.Dict):\n",
    "#    ending = end_game['death']\n",
    "    print(\"GAME OVER. You died by: \",ending)    \n",
    "\n",
    "    \n",
    "def search(targets, my_head, move_points, points):\n",
    "    if targets:\n",
    "        closest = targets[0]\n",
    "        distance = 100\n",
    "        \n",
    "        for target in targets:\n",
    "            x_distance = abs(my_head[\"x\"] - target[\"x\"])\n",
    "            y_distance = abs(my_head[\"y\"] - target[\"y\"])\n",
    "            \n",
    "            if x_distance + y_distance < distance:\n",
    "                closest = target\n",
    "                distance = x_distance + y_distance\n",
    "                \n",
    "        if closest[\"x\"] < my_head[\"x\"]:\n",
    "            move_points[\"left\"] += points\n",
    "        if closest[\"x\"] > my_head[\"x\"]:\n",
    "            move_points[\"right\"] += points\n",
    "        if closest[\"y\"] < my_head[\"y\"]:\n",
    "            move_points[\"down\"] += points\n",
    "        if closest[\"y\"] > my_head[\"y\"]:\n",
    "            move_points[\"up\"] += points\n",
    "            \n",
    "            \n",
    "def search_head(targets, my_head, move_points, points):\n",
    "    if targets:\n",
    "        closest = targets[0]\n",
    "        distance = 100\n",
    "        \n",
    "        for target in targets:\n",
    "            x_distance = abs(my_head[\"x\"] - target[\"x\"])\n",
    "            y_distance = abs(my_head[\"y\"] - target[\"y\"])\n",
    "            \n",
    "            if x_distance + y_distance < distance:\n",
    "                closest = target\n",
    "                distance = x_distance + y_distance\n",
    "                \n",
    "        if closest[\"x\"] < my_head[\"x\"]:\n",
    "            move_points[\"left\"] += points\n",
    "        if closest[\"x\"] > my_head[\"x\"]:\n",
    "            move_points[\"right\"] += points\n",
    "        if closest[\"y\"] < my_head[\"y\"]:\n",
    "            move_points[\"down\"] += points\n",
    "        if closest[\"y\"] > my_head[\"y\"]:\n",
    "            move_points[\"up\"] += points\n",
    "            \n",
    "\n",
    "    search(game_state[\"board\"][\"food\"], my_head, move_points, 20)\n",
    "    search(game_state[\"board\"][\"snakes\"], my_head, move_points, 20)         \n",
    "#mmmm FLOODFILL FUNCTION\n",
    "def floodfill(snakes,start):\n",
    "    empty_spaces = 0\n",
    "    visited = []\n",
    "    to_visit = [start]                         \n",
    "    unsafe = []\n",
    "    for snake in snakes:\n",
    "        for body_part in snake[\"body\"]:\n",
    "            unsafe.append(body_part) #mmmm APPEND means adding something to the list\n",
    "    in_bounds = True\n",
    "    while to_visit:   \n",
    "        in_bounds = not(to_visit[0][\"y\"] < 0 or to_visit[0][\"y\"] > 10 or to_visit[0][\"x\"] < 0 or to_visit[0][\"x\"] > 10)\n",
    "        if to_visit[0] not in unsafe and in_bounds and to_visit[0] not in visited:\n",
    "            empty_spaces += 1\n",
    "            to_visit.append({\"x\": to_visit[0][\"x\"] +1, \"y\": to_visit[0][\"y\"]})\n",
    "            to_visit.append({\"x\": to_visit[0][\"x\"] -1, \"y\": to_visit[0][\"y\"]})\n",
    "            to_visit.append({\"x\": to_visit[0][\"x\"], \"y\": to_visit[0][\"y\"] +1})\n",
    "            to_visit.append({\"x\": to_visit[0][\"x\"], \"y\": to_visit[0][\"y\"] -1})\n",
    "            \n",
    "        visited.append(to_visit[0])\n",
    "        to_visit.pop(0)\n",
    "        \n",
    "    return empty_spaces\n",
    "\n",
    "            \n",
    "# move is called on every turn and returns your next move\n",
    "# Valid moves are \"up\", \"down\", \"left\", or \"right\"\n",
    "# See https://docs.battlesnake.com/api/example-move for available data\n",
    "def move(game_state: typing.Dict) -> typing.Dict:\n",
    "\n",
    "    move_points = {\"up\": 10, \"down\": 10, \"left\": 10, \"right\": 10}\n",
    "    moves = [\"up\", \"down\", \"left\", \"right\"]\n",
    "\n",
    "    # We've included code to prevent your Battlesnake from moving backwards\n",
    "    my_head = game_state[\"you\"][\"body\"][0]  # Coordinates of your head\n",
    "    my_neck = game_state[\"you\"][\"body\"][1]  # Coordinates of your \"neck\"\n",
    "    my_body = game_state['you']['body']\n",
    "\n",
    "    if my_neck[\"x\"] < my_head[\"x\"]:  # Neck is left of head, don't move left\n",
    "        move_points[\"left\"] = 0\n",
    "\n",
    "    elif my_neck[\"x\"] > my_head[\"x\"]:  # Neck is right of head, don't move right\n",
    "        move_points[\"right\"] = 0\n",
    "\n",
    "    elif my_neck[\"y\"] < my_head[\"y\"]:  # Neck is below head, don't move down\n",
    "        move_points[\"down\"] = 0\n",
    "\n",
    "    elif my_neck[\"y\"] > my_head[\"y\"]:  # Neck is above head, don't move up\n",
    "        move_points[\"up\"] = 0\n",
    "\n",
    "   #MMMM MAKE SURE YOU DONT HIT THE WALL\n",
    "\n",
    "    game_height = game_state[\"board\"][\"height\"]\n",
    "    game_width = game_state[\"board\"][\"width\"]\n",
    "    \n",
    "    \n",
    "    if my_head[\"y\"] == game_height - 1:\n",
    "        move_points[\"up\"] -= 1000\n",
    "    \n",
    "    if my_head[\"y\"] == 0:\n",
    "        move_points[\"down\"] -= 1000\n",
    "        \n",
    "    if my_head[\"x\"] == game_width - 1:\n",
    "        move_points[\"right\"] -= 1000\n",
    "        print(\"DONT GO RIGHT!\")\n",
    "        print(f\"Right points: {move_points['right']}\")\n",
    "\n",
    "    if my_head[\"x\"] == 0:\n",
    "        move_points[\"left\"] -= 1000\n",
    "        \n",
    "        \n",
    "    #MMMM DONT RUN INTO YOURSELF\n",
    "    \n",
    "    for body_part in my_body:\n",
    "        if body_part[\"y\"] == my_head[\"y\"]+1 and body_part[\"x\"] == my_head[\"x\"]:\n",
    "            move_points[\"up\"] -= 1000\n",
    "            \n",
    "        if body_part[\"y\"] == my_head[\"y\"]-1 and body_part[\"x\"] == my_head[\"x\"]:\n",
    "            move_points[\"down\"] -= 1000\n",
    "            \n",
    "        if body_part[\"x\"] == my_head[\"x\"]+1 and body_part[\"y\"] == my_head[\"y\"]:\n",
    "            move_points[\"right\"] -= 1000\n",
    "            \n",
    "        if body_part[\"x\"] == my_head[\"x\"]-1 and body_part[\"y\"] == my_head[\"y\"]:\n",
    "            move_points[\"left\"] -= 1000\n",
    "            \n",
    "    #MMMM DONT RUN INTO OTHER SNAKES\n",
    "    \n",
    "    all_snakes = game_state[\"board\"][\"snakes\"]\n",
    "    for snakes in all_snakes:\n",
    "        for body_part in snakes[\"body\"]:\n",
    "            if body_part[\"y\"] == my_head[\"y\"]+1 and body_part[\"x\"] == my_head[\"x\"]:\n",
    "                move_points[\"up\"] -= 1000\n",
    "\n",
    "            if body_part[\"y\"] == my_head[\"y\"]-1 and body_part[\"x\"] == my_head[\"x\"]:\n",
    "                move_points[\"down\"] -= 1000\n",
    "\n",
    "            if body_part[\"x\"] == my_head[\"x\"]+1 and body_part[\"y\"] == my_head[\"y\"]:\n",
    "                move_points[\"right\"] -= 1000\n",
    "\n",
    "            if body_part[\"x\"] == my_head[\"x\"]-1 and body_part[\"y\"] == my_head[\"y\"]:\n",
    "                move_points[\"left\"] -= 1000\n",
    "                \n",
    "    move_points[\"right\"] += floodfill(all_snakes, {\"x\": my_head[\"x\"] +1, \"y\": my_head[\"y\"]})\n",
    "    move_points[\"left\"] += floodfill(all_snakes, {\"x\": my_head[\"x\"] -1, \"y\": my_head[\"y\"]})\n",
    "    move_points[\"up\"] += floodfill(all_snakes, {\"x\": my_head[\"x\"] , \"y\": my_head[\"y\"] +1})\n",
    "    move_points[\"down\"] += floodfill(all_snakes, {\"x\": my_head[\"x\"] , \"y\": my_head[\"y\"] -1})\n",
    "\n",
    "    \n",
    "    #mmmm EAT SOME FOOD         \n",
    "    #bfs\n",
    "                \n",
    "    # Compare all of the moves to create a list of all moves with the highest score\n",
    "    print(f\"Right points: {move_points['right']}\")\n",
    "    best_moves = []\n",
    "    for move, points in move_points.items():\n",
    "        if len(best_moves) == 0:\n",
    "            best_moves.append(move)\n",
    "        else:\n",
    "            for good_move in best_moves:\n",
    "                if points > move_points[good_move]:\n",
    "                    best_moves.clear()\n",
    "                    best_moves.append(move)\n",
    "                elif points == move_points[good_move]:\n",
    "                    best_moves.append(move)\n",
    "                    break\n",
    "                    \n",
    "    # Choose a random move from the best choices\n",
    "    print(f\"Right points: {move_points['right']}\")\n",
    "    next_move = random.choice(best_moves)\n",
    "    # TODO: Step 4 - Move towards food instead of random, to regain health and survive longer\n",
    "    # food = game_state['board']['food']\n",
    "\n",
    "    print(f\"MOVE {game_state['turn']}: {next_move}\")\n",
    "    print(f\"MOVE {game_state['turn']} POINTS: UP - {move_points['up']}, DOWN - {move_points['down']}, LEFT - {move_points['left']}, RIGHT - {move_points['right']}\")\n",
    "    return {\"move\": next_move}\n",
    "\n",
    "run_server({\"info\": info, \"start\": start, \"move\": move, \"end\": end})\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "845e510c",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
