From 55f8a0b00d09ac3ad237fdf1cc5adeccedcf9d8a Mon Sep 17 00:00:00 2001 From: youainti Date: Wed, 4 Aug 2021 14:25:02 -0700 Subject: [PATCH] changes to recursion attempt --- Code/successful_recursion.ipynb | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/Code/successful_recursion.ipynb b/Code/successful_recursion.ipynb index c326a0a..845a8c2 100644 --- a/Code/successful_recursion.ipynb +++ b/Code/successful_recursion.ipynb @@ -3,7 +3,7 @@ { "cell_type": "code", "execution_count": 1, - "id": "linear-harvey", + "id": "sustained-board", "metadata": { "tags": [] }, @@ -16,7 +16,7 @@ }, { "cell_type": "markdown", - "id": "honey-excuse", + "id": "numeric-victoria", "metadata": {}, "source": [ "# Setup Functions\n", @@ -26,7 +26,7 @@ { "cell_type": "code", "execution_count": 2, - "id": "helpful-radical", + "id": "virtual-arlington", "metadata": {}, "outputs": [], "source": [ @@ -57,7 +57,7 @@ }, { "cell_type": "markdown", - "id": "fifty-southwest", + "id": "wrapped-message", "metadata": {}, "source": [ "## Setup functions related to the problem" @@ -66,7 +66,7 @@ { "cell_type": "code", "execution_count": 3, - "id": "fancy-manual", + "id": "neutral-vietnamese", "metadata": {}, "outputs": [], "source": [ @@ -82,10 +82,12 @@ " \n", " return 1 - ( b*eta*torch.exp(eta+b*stock-eta*torch.exp(b*stock)))\n", "\n", + "def test_launch(stock, debris):\n", + " return torch.ones(5, requires_grad=True)\n", "\n", "def laws_of_motion(stock, debris, launches):\n", " \n", - " new_stock = stock*survival(stock,debris) + launches #TODO: Launches will become a function (neural network)\n", + " new_stock = stock*survival(stock,debris) + launches(stock,debris) #TODO: Launches will become a function (neural network)\n", " \n", " #TODO: Currently Ignoring autocatalysis\n", " new_debris = (1-DELTA)*debris + LAUNCH_DEBRIS_RATE * launches.sum() + COLLISION_DEBRIS_RATE*(1-survival(stock,debris)) @ stock\n", @@ -100,7 +102,7 @@ { "cell_type": "code", "execution_count": 4, - "id": "dietary-vault", + "id": "considered-configuration", "metadata": {}, "outputs": [], "source": [ @@ -138,7 +140,7 @@ }, { "cell_type": "markdown", - "id": "illegal-thriller", + "id": "premium-lesbian", "metadata": {}, "source": [ "# Actual calculations" @@ -147,7 +149,7 @@ { "cell_type": "code", "execution_count": 5, - "id": "coated-dressing", + "id": "suffering-google", "metadata": {}, "outputs": [], "source": [ @@ -179,7 +181,7 @@ { "cell_type": "code", "execution_count": 10, - "id": "analyzed-transfer", + "id": "checked-medication", "metadata": {}, "outputs": [ { @@ -203,7 +205,7 @@ }, { "cell_type": "markdown", - "id": "confidential-stadium", + "id": "wanted-principal", "metadata": {}, "source": [ "Note how this fails on the last few iterations.\n", @@ -218,7 +220,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cbb2f9e4-2248-467e-b6f9-dd5cdd156ce6", + "id": "solid-correlation", "metadata": {}, "outputs": [], "source": [] @@ -240,7 +242,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.5" + "version": "3.8.8" } }, "nbformat": 4,