{
  "cells": [
    {
      "cell_type": "code",
      "source": [
        "%matplotlib inline\n",
        "\n",
        "import matplotlib.pyplot as plt\n",
        "import numpy as np\n",
        "\n",
        "from plotting import plot_trajectory\n",
        "from walker import Walker"
      ],
      "outputs": [],
      "execution_count": 4,
      "metadata": {
        "ExecuteTime": {
          "end_time": "2022-08-18T09:50:40.616906Z",
          "start_time": "2022-08-18T11:50:40.181358+02:00"
        },
        "collapsed": false,
        "pycharm": {
          "name": "#%%\n"
        },
        "execution": {
          "iopub.status.busy": "2023-06-28T17:23:15.993Z",
          "iopub.execute_input": "2023-06-28T17:23:16.002Z",
          "shell.execute_reply": "2023-06-28T17:23:16.081Z",
          "iopub.status.idle": "2023-06-28T17:23:16.018Z"
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "For this Exercise let's go back to the version of the walker with only one \"next step proposal\". "
      ],
      "metadata": {
        "nteract": {
          "transient": {
            "deleting": false
          }
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "# 1. Complete the run.py script\n",
        "- In the file, at the top we give the desired parameters for the run\n",
        "- create a context map and walker (see previous exercises for reference)\n",
        "- simulate a trajectory (see previous exercises for reference)\n",
        "- save the trajectory using `np.save()` and some metadata"
      ],
      "metadata": {
        "nteract": {
          "transient": {
            "deleting": false
          }
        }
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "# 2. Run the run.py script twice and compare that the outcome is identical by plotting the result below"
      ],
      "metadata": {
        "nteract": {
          "transient": {
            "deleting": false
          }
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "trajectory = np.load(\"sim_20230628-192022.npy\") # change the name of the file here!"
      ],
      "outputs": [],
      "execution_count": 5,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2023-06-28T17:23:19.216Z",
          "iopub.execute_input": "2023-06-28T17:23:19.227Z",
          "iopub.status.idle": "2023-06-28T17:23:19.236Z",
          "shell.execute_reply": "2023-06-28T17:23:19.239Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [
        "plt.plot(trajectory[:,0], trajectory[:,1])"
      ],
      "outputs": [
        {
          "output_type": "execute_result",
          "execution_count": 6,
          "data": {
            "text/plain": "[<matplotlib.lines.Line2D at 0x12c7436d0>]"
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": "<Figure size 432x288 with 1 Axes>",
            "image/png": "[encoded data, 57288 characters]\n"
          },
          "metadata": {
            "needs_background": "light"
          }
        }
      ],
      "execution_count": 6,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        },
        "execution": {
          "iopub.status.busy": "2023-06-28T17:23:21.468Z",
          "iopub.execute_input": "2023-06-28T17:23:21.471Z",
          "iopub.status.idle": "2023-06-28T17:23:21.552Z",
          "shell.execute_reply": "2023-06-28T17:23:21.558Z"
        }
      }
    },
    {
      "cell_type": "code",
      "source": [],
      "outputs": [],
      "execution_count": null,
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "source_hidden": false,
          "outputs_hidden": false
        },
        "nteract": {
          "transient": {
            "deleting": false
          }
        }
      }
    }
  ],
  "metadata": {
    "hide_input": false,
    "kernelspec": {
      "display_name": "Python [default]",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "name": "python",
      "version": "3.10.3",
      "mimetype": "text/x-python",
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "pygments_lexer": "ipython3",
      "nbconvert_exporter": "python",
      "file_extension": ".py"
    },
    "toc": {
      "nav_menu": {
        "height": "12px",
        "width": "252px"
      },
      "navigate_menu": true,
      "number_sections": true,
      "sideBar": true,
      "threshold": 4,
      "toc_cell": false,
      "toc_section_display": "block",
      "toc_window_display": false
    },
    "nteract": {
      "version": "0.28.0"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}