From 5fbfc61343a671b9a62c0b9aa12b26e3431e0243 Mon Sep 17 00:00:00 2001 From: SeanMcOwen Date: Tue, 17 Dec 2024 10:21:19 -0500 Subject: [PATCH 1/6] Add new food growth option --- .obsidian/workspace.json | 44 +++++++++---------- .../Mechanisms/Increment Time Mechanism.md | 6 +++ .../Log Simulation Data Mechanism.md | 6 +++ .../obsidian/Policies/Food Growth Policy.md | 6 +++ .../Policies/Simulation Meta Policy.md | 35 +++++++++++++++ .../Median Predator Age Stateful Metric.md | 13 +++--- .../Median Predator Food Stateful Metric.md | 13 +++--- .../Median Prey Age Stateful Metric.md | 11 +++-- .../Median Prey Food Stateful Metric.md | 11 +++-- .../Median Site Food Stateful Metric.md | 2 +- src/Policies/Site.py | 8 +++- 11 files changed, 101 insertions(+), 54 deletions(-) diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 70f05ac..f708763 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -11,14 +11,10 @@ "id": "4507d71ae7a37972", "type": "leaf", "state": { - "type": "markdown", - "state": { - "file": "reports/obsidian/Spaces/Timestep Space.md", - "mode": "source", - "source": false - }, + "type": "empty", + "state": {}, "icon": "lucide-file", - "title": "Timestep Space" + "title": "New tab" } } ] @@ -93,7 +89,6 @@ "state": { "type": "backlink", "state": { - "file": "reports/obsidian/Spaces/Timestep Space.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -103,7 +98,7 @@ "unlinkedCollapsed": true }, "icon": "links-coming-in", - "title": "Backlinks for Timestep Space" + "title": "Backlinks" } }, { @@ -163,27 +158,28 @@ }, "active": "4507d71ae7a37972", "lastOpenFiles": [ - "reports/obsidian/Policies/Simulation Meta Policy.md", - "src/Implementations/Python/Mechanisms/__pycache__/Meta.cpython-39.pyc", - "src/Implementations/Python/Mechanisms/Meta.py", - "reports/obsidian/Spaces/Timestep Space.md", - "tests/Simulation Log Test.ipynb", - "src/Implementations/Python/Policies/__pycache__/Meta.cpython-39.pyc", - "reports/obsidian/Spec Tree.md", "tests/Stateful Metrics.ipynb", + "tests/Simulation Log Test.ipynb", + "src/Wiring/Meta.py", + "src/Spaces/Meta.py", + "src/Policies/Meta.py", + "src/Mechanisms/Meta.py", + "src/Implementations/Python/Policies/Meta.py", + "src/Implementations/Python/Mechanisms/Meta.py", "reports/obsidian/Wiring/Simulation Meta Wiring.md", "reports/obsidian/Wiring/Simulation Meta Mechanisms.md", - "reports/obsidian/Spaces/Simulation Log Space.md", - "reports/obsidian/Mechanisms/Log Simulation Data Mechanism.md", - "reports/obsidian/Mechanisms/Increment Time Mechanism.md", "reports/obsidian/Types/Timestep Type.md", "reports/obsidian/Types/Delta Timestep Type.md", "reports/obsidian/State Variables/Global State-Timestep.md", - "src/Mechanisms/__pycache__/Meta.cpython-39.pyc", - "src/Mechanisms/Meta.py", - "src/Spaces/__pycache__/Meta.cpython-39.pyc", - "src/Spaces/Meta.py", - "src/Policies/__pycache__/Meta.cpython-39.pyc", + "reports/obsidian/Spaces/Timestep Space.md", + "reports/obsidian/Spaces/Simulation Log Space.md", + "reports/obsidian/Policies/Simulation Meta Policy.md", + "reports/obsidian/Mechanisms/Log Simulation Data Mechanism.md", + "reports/obsidian/Mechanisms/Increment Time Mechanism.md", + "LICENSE", + "src/Implementations/Python/Mechanisms/__pycache__/Meta.cpython-39.pyc", + "src/Implementations/Python/Policies/__pycache__/Meta.cpython-39.pyc", + "reports/obsidian/Spec Tree.md", "reports/obsidian/Wiring/Food Growth Wiring.md", "reports/obsidian/Boundary Actions/Prey Feeding Boundary Action.md", "reports/obsidian/Wiring/Prey Feeding Wiring.md", diff --git a/reports/obsidian/Mechanisms/Increment Time Mechanism.md b/reports/obsidian/Mechanisms/Increment Time Mechanism.md index 482a0e0..45d5b8e 100644 --- a/reports/obsidian/Mechanisms/Increment Time Mechanism.md +++ b/reports/obsidian/Mechanisms/Increment Time Mechanism.md @@ -16,6 +16,12 @@ Add the delta timestep to the current timestep ## Updates 1. [[Global]].[[Global State-Timestep|Timestep]] +## Python Implementation +```python +def increment_time_mechanism(state, params, spaces): + state["Timestep"] += spaces[0]["Timestep"] +``` +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Mechanisms/Meta.py](../../../src/Implementations/Python/Mechanisms/Meta.py) ## Spec Source Code Location diff --git a/reports/obsidian/Mechanisms/Log Simulation Data Mechanism.md b/reports/obsidian/Mechanisms/Log Simulation Data Mechanism.md index 334ddb8..e5a8c38 100644 --- a/reports/obsidian/Mechanisms/Log Simulation Data Mechanism.md +++ b/reports/obsidian/Mechanisms/Log Simulation Data Mechanism.md @@ -16,6 +16,12 @@ Append the space to the simulation log ## Updates 1. [[Global]].[[Global State-Simulation Log|Simulation Log]] +## Python Implementation +```python +def log_simulation_data_mechanism(state, params, spaces): + state["Simulation Log"].append(spaces[0]) +``` +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Mechanisms/Meta.py](../../../src/Implementations/Python/Mechanisms/Meta.py) ## Spec Source Code Location diff --git a/reports/obsidian/Policies/Food Growth Policy.md b/reports/obsidian/Policies/Food Growth Policy.md index e3dcf0a..86aca0c 100644 --- a/reports/obsidian/Policies/Food Growth Policy.md +++ b/reports/obsidian/Policies/Food Growth Policy.md @@ -35,6 +35,12 @@ def constant_food_growth_policy(state, params, spaces): ``` Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Policies/Site.py](../../../src/Implementations/Python/Policies/Site.py) +### 2. Poisson Food Growth Policy +#### Description +Food growth is based on the Poisson distribution +#### Logic +For each location, the delta is equal to min(Food + POISSON(params["Food Growth Rate"]), params["Maximum Food per Tile"]) + ## Spec Source Code Location Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Policies/Site.py](../../../../src/Policies/Site.py) diff --git a/reports/obsidian/Policies/Simulation Meta Policy.md b/reports/obsidian/Policies/Simulation Meta Policy.md index ca605bb..69966eb 100644 --- a/reports/obsidian/Policies/Simulation Meta Policy.md +++ b/reports/obsidian/Policies/Simulation Meta Policy.md @@ -13,6 +13,41 @@ The policy which determines the simulation metadata updates. ## Constraints ## Parameters Used ## Metrics Used +## Policy Options +### 1. Simulation Meta Policy V1 +#### Description +Baseline simulation meta policy. +#### Logic +The timestep will be incremented by 1 and a full simulation log will be returned. +#### Python Implementation +```python +def simulation_meta_policy_v1(state, params, spaces): + space1 = {"Timestep": 1} + space2 = {} + + space2["Timestep"] = state["Timestep"] + 1 + + for key in [ + "Open Locations Stateful Metric", + "Filled Locations Stateful Metric", + "Prey Locations Stateful Metric", + "Predator Locations Stateful Metric", + "Median Site Food Stateful Metric", + "Prey Stateful Metric", + "Predator Stateful Metric", + "Number of Prey Stateful Metric", + "Number of Predators Stateful Metric", + "Median Predator Food Stateful Metric", + "Median Prey Food Stateful Metric", + "Median Predator Age Stateful Metric", + "Median Prey Age Stateful Metric", + ]: + space2[key] = state["Stateful Metrics"][key](state, params) + + return [space1, space2] +``` +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Policies/Meta.py](../../../src/Implementations/Python/Policies/Meta.py) + ## Spec Source Code Location Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Policies/Meta.py](../../../../src/Policies/Meta.py) diff --git a/reports/obsidian/Stateful Metrics/Median Predator Age Stateful Metric.md b/reports/obsidian/Stateful Metrics/Median Predator Age Stateful Metric.md index d89b774..3a1a054 100644 --- a/reports/obsidian/Stateful Metrics/Median Predator Age Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Median Predator Age Stateful Metric.md @@ -15,14 +15,11 @@ Domain: None ## Python Implementation ```python def median_predator_age_stateful_metric(state, params): - return median( - [ - x["Age"] - for x in state["Stateful Metrics"]["Predator Stateful Metric"]( - state, params - ) - ] - ) + predators = [ + x["Age"] + for x in state["Stateful Metrics"]["Predator Stateful Metric"](state, params) + ] + return median(predators) if len(predators) > 0 else None ``` Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py](../../../src/Implementations/Python/StatefulMetrics/Agent.py) diff --git a/reports/obsidian/Stateful Metrics/Median Predator Food Stateful Metric.md b/reports/obsidian/Stateful Metrics/Median Predator Food Stateful Metric.md index ea23940..984b78d 100644 --- a/reports/obsidian/Stateful Metrics/Median Predator Food Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Median Predator Food Stateful Metric.md @@ -15,14 +15,11 @@ Domain: None ## Python Implementation ```python def median_predator_food_stateful_metric(state, params): - return median( - [ - x["Food"] - for x in state["Stateful Metrics"]["Predator Stateful Metric"]( - state, params - ) - ] - ) + predators = [ + x["Food"] + for x in state["Stateful Metrics"]["Predator Stateful Metric"](state, params) + ] + return median(predators) if len(predators) > 0 else None ``` Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py](../../../src/Implementations/Python/StatefulMetrics/Agent.py) diff --git a/reports/obsidian/Stateful Metrics/Median Prey Age Stateful Metric.md b/reports/obsidian/Stateful Metrics/Median Prey Age Stateful Metric.md index 56692a2..8c5558a 100644 --- a/reports/obsidian/Stateful Metrics/Median Prey Age Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Median Prey Age Stateful Metric.md @@ -15,12 +15,11 @@ Domain: None ## Python Implementation ```python def median_prey_age_stateful_metric(state, params): - return median( - [ - x["Age"] - for x in state["Stateful Metrics"]["Prey Stateful Metric"](state, params) - ] - ) + prey = [ + x["Age"] + for x in state["Stateful Metrics"]["Prey Stateful Metric"](state, params) + ] + return median(prey) if len(prey) > 0 else None ``` Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py](../../../src/Implementations/Python/StatefulMetrics/Agent.py) diff --git a/reports/obsidian/Stateful Metrics/Median Prey Food Stateful Metric.md b/reports/obsidian/Stateful Metrics/Median Prey Food Stateful Metric.md index c8403c9..ee084c6 100644 --- a/reports/obsidian/Stateful Metrics/Median Prey Food Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Median Prey Food Stateful Metric.md @@ -15,12 +15,11 @@ Domain: None ## Python Implementation ```python def median_prey_food_stateful_metric(state, params): - return median( - [ - x["Food"] - for x in state["Stateful Metrics"]["Prey Stateful Metric"](state, params) - ] - ) + prey = [ + x["Food"] + for x in state["Stateful Metrics"]["Prey Stateful Metric"](state, params) + ] + return median(prey) if len(prey) > 0 else None ``` Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py](../../../src/Implementations/Python/StatefulMetrics/Agent.py) diff --git a/reports/obsidian/Stateful Metrics/Median Site Food Stateful Metric.md b/reports/obsidian/Stateful Metrics/Median Site Food Stateful Metric.md index f4fdd71..47180ea 100644 --- a/reports/obsidian/Stateful Metrics/Median Site Food Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Median Site Food Stateful Metric.md @@ -15,7 +15,7 @@ Domain: None ## Python Implementation ```python def median_site_food_stateful_metric(state, params): - median([x["Food"] for x in state["Sites"]]) + return median([x["Food"] for x in state["Sites"]]) ``` Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Site.py](../../../src/Implementations/Python/StatefulMetrics/Site.py) diff --git a/src/Policies/Site.py b/src/Policies/Site.py index 8c123b9..8fe6fec 100644 --- a/src/Policies/Site.py +++ b/src/Policies/Site.py @@ -4,11 +4,17 @@ "logic": """For each location, the delta is equal to min(Food + params["Food Growth Rate"], params["Maximum Food per Tile"])""", } +food_growth_policy_option2 = { + "name": "Poisson Food Growth Policy", + "description": "Food growth is based on the Poisson distribution", + "logic": """For each location, the delta is equal to min(Food + POISSON(params["Food Growth Rate"]), params["Maximum Food per Tile"])""", +} + food_growth_policy = { "name": "Food Growth Policy", "description": "The policy determines the amount of food growth per site.", "constraints": [], - "policy_options": [food_growth_policy_option1], + "policy_options": [food_growth_policy_option1, food_growth_policy_option2], "domain": [ "Locations Space", ], From 15f64054fcb7c30ceb3544400bda7457d1786c96 Mon Sep 17 00:00:00 2001 From: SeanMcOwen Date: Wed, 18 Dec 2024 09:04:10 -0500 Subject: [PATCH 2/6] Clean up --- notebooks/Build Obsidian.ipynb | 7 ++ .../Median Predator Age Stateful Metric.md | 2 +- .../Median Prey Age Stateful Metric.md | 2 +- simulation/config/params.py | 1 + src/StatefulMetrics/Agent.py | 4 +- tests/Food Growth Test.ipynb | 73 ++++++++++++++++++- 6 files changed, 84 insertions(+), 5 deletions(-) diff --git a/notebooks/Build Obsidian.ipynb b/notebooks/Build Obsidian.ipynb index 8aff373..b956925 100644 --- a/notebooks/Build Obsidian.ipynb +++ b/notebooks/Build Obsidian.ipynb @@ -70,6 +70,13 @@ "write_spec_tree(ms, path=write_folder, linking=True)\n", "write_overview(ms, \"MSML Template\", \"../README.md\", base_folder=\"../README-Base.md\")" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { diff --git a/reports/obsidian/Stateful Metrics/Median Predator Age Stateful Metric.md b/reports/obsidian/Stateful Metrics/Median Predator Age Stateful Metric.md index 3a1a054..571bc7e 100644 --- a/reports/obsidian/Stateful Metrics/Median Predator Age Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Median Predator Age Stateful Metric.md @@ -1,6 +1,6 @@ Description: The median age of predators -Type: [[Age Type]] +Type: [[Integer Type]] Symbol: None diff --git a/reports/obsidian/Stateful Metrics/Median Prey Age Stateful Metric.md b/reports/obsidian/Stateful Metrics/Median Prey Age Stateful Metric.md index 8c5558a..044d45a 100644 --- a/reports/obsidian/Stateful Metrics/Median Prey Age Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Median Prey Age Stateful Metric.md @@ -1,6 +1,6 @@ Description: The median age of prey -Type: [[Age Type]] +Type: [[Integer Type]] Symbol: None diff --git a/simulation/config/params.py b/simulation/config/params.py index 99ddbd6..4504e11 100644 --- a/simulation/config/params.py +++ b/simulation/config/params.py @@ -14,6 +14,7 @@ "Reproduction Food Needed": 3, "Initial Prey Food": 5, "Initial Predator Food": 5, + "FP Food Growth Policy": "Constant Food Growth Policy", } diff --git a/src/StatefulMetrics/Agent.py b/src/StatefulMetrics/Agent.py index 59ad97b..8704960 100644 --- a/src/StatefulMetrics/Agent.py +++ b/src/StatefulMetrics/Agent.py @@ -75,7 +75,7 @@ "domain": None, }, { - "type": "Age Type", + "type": "Integer Type", "name": "Median Predator Age Stateful Metric", "description": "The median age of predators", "variables_used": [ @@ -87,7 +87,7 @@ "domain": None, }, { - "type": "Age Type", + "type": "Integer Type", "name": "Median Prey Age Stateful Metric", "description": "The median age of prey", "variables_used": [ diff --git a/tests/Food Growth Test.ipynb b/tests/Food Growth Test.ipynb index 3d3a858..0048c13 100644 --- a/tests/Food Growth Test.ipynb +++ b/tests/Food Growth Test.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -28,6 +28,77 @@ "msi = ms.build_implementation(params_test_food_growth)" ] }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'Terminating Space': Terminating Space,\n", + " 'Empty Space': Empty Space,\n", + " 'Locations Space': Locations Space,\n", + " 'Location Food Delta Space': Location Food Delta Space,\n", + " 'Agents Space': Agents Space,\n", + " 'Agent Age Delta Space': Agent Age Delta Space,\n", + " 'Agent Food Delta Space': Agent Food Delta Space,\n", + " 'Agent Location Space': Agent Location Space,\n", + " 'Timestep Space': Timestep Space,\n", + " 'Simulation Log Space': Simulation Log Space}" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ms.spaces" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[Agent Age Delta Space, Agent Food Delta Space, Locations Space, Agent Location Space, Timestep Space, Simulation Log Space, Terminating Space, Empty Space, Location Food Delta Space, Agents Space]\n" + ] + } + ], + "source": [ + "all_spaces = []\n", + "for x in ms.components.values():\n", + " all_spaces.extend(x.domain)\n", + " all_spaces.extend(x.codomain)\n", + "all_spaces = list(set(all_spaces))\n", + "print(all_spaces)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Agent Age Delta Space" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "all_spaces[0]" + ] + }, { "cell_type": "code", "execution_count": 2, From 70ea969fbe014d083e88815162d763883b0acdbe Mon Sep 17 00:00:00 2001 From: SeanMcOwen Date: Fri, 20 Dec 2024 14:07:10 -0500 Subject: [PATCH 3/6] Checkpoint --- .obsidian/workspace.json | 23 +++++++++++-------- notebooks/Build Obsidian.ipynb | 17 +------------- .../Agent Movement Boundary Action.md | 4 ++-- .../Agent Reproduction Boundary Action.md | 4 ++-- .../Hunt Prey Boundary Action.md | 4 ++-- .../Prey Feeding Boundary Action.md | 4 ++-- .../Food Growth Control Action.md | 4 ++-- .../Increase Age Control Action.md | 4 ++-- .../Natural Death Control Action.md | 4 ++-- .../Displays/Wiring/All Top Level Wirings.md | 4 ++++ .../Displays/Wiring/Boundary Wirings.md | 4 ++++ reports/obsidian/Entities/Agent.md | 2 +- reports/obsidian/Entities/Global.md | 2 +- reports/obsidian/Entities/Site.md | 2 +- .../Mechanisms/Create Agents Mechanism.md | 4 ++-- .../Increase Agent Age Mechanism.md | 4 ++-- .../Mechanisms/Increment Time Mechanism.md | 4 ++-- .../Log Simulation Data Mechanism.md | 4 ++-- .../Mechanisms/Remove Agents Mechanism.md | 4 ++-- .../Update Agent Locations Mechanism.md | 4 ++-- .../Update Food Locations Mechanism.md | 4 ++-- .../Mechanisms/Update Food Mechanism.md | 4 ++-- .../obsidian/Metrics/Available Food Metric.md | 4 ++-- .../obsidian/Metrics/Is Neighbor Metric.md | 4 ++-- .../Metrics/Neighboring Valid Tiles Metric.md | 4 ++-- .../obsidian/Parameters/Food Growth Rate.md | 2 +- .../obsidian/Parameters/Hunger Threshold.md | 2 +- .../Initial Number of Food Tiles.md | 2 +- .../Parameters/Initial Number of Predators.md | 2 +- .../Parameters/Initial Number of Prey.md | 2 +- .../Parameters/Initial Predator Food.md | 2 +- .../obsidian/Parameters/Initial Prey Food.md | 2 +- .../Parameters/Maximum Age Parameter.md | 2 +- .../Parameters/Maximum Food per Tile.md | 2 +- .../Parameters/Reproduction Food Needed.md | 2 +- .../Parameters/Reproduction Food Threshold.md | 2 +- .../Parameters/Reproduction Probability.md | 2 +- reports/obsidian/Parameters/Site Size.md | 2 +- .../Policies/Agent Movement Policy.md | 4 ++-- .../Policies/Agent Reproduction Policy.md | 4 ++-- .../obsidian/Policies/Food Growth Policy.md | 4 ++-- reports/obsidian/Policies/Hunt Prey Policy.md | 4 ++-- .../Policies/Increase Agent Age Policy.md | 4 ++-- .../obsidian/Policies/Natural Death Policy.md | 4 ++-- .../obsidian/Policies/Prey Feeding Policy.md | 4 ++-- .../Policies/Simulation Meta Policy.md | 4 ++-- .../obsidian/Spaces/Agent Age Delta Space.md | 2 +- .../obsidian/Spaces/Agent Food Delta Space.md | 2 +- .../obsidian/Spaces/Agent Location Space.md | 2 +- reports/obsidian/Spaces/Agents Space.md | 2 +- .../Spaces/Location Food Delta Space.md | 2 +- reports/obsidian/Spaces/Locations Space.md | 2 +- .../obsidian/Spaces/Simulation Log Space.md | 2 +- reports/obsidian/Spaces/Timestep Space.md | 2 +- .../Filled Locations Stateful Metric.md | 4 ++-- .../Median Predator Age Stateful Metric.md | 4 ++-- .../Median Predator Food Stateful Metric.md | 4 ++-- .../Median Prey Age Stateful Metric.md | 4 ++-- .../Median Prey Food Stateful Metric.md | 4 ++-- .../Median Site Food Stateful Metric.md | 4 ++-- .../Number of Predators Stateful Metric.md | 4 ++-- .../Number of Prey Stateful Metric.md | 4 ++-- .../Open Locations Stateful Metric.md | 4 ++-- .../Predator Locations Stateful Metric.md | 4 ++-- .../Predator Stateful Metric.md | 4 ++-- .../Prey Locations Stateful Metric.md | 4 ++-- .../Stateful Metrics/Prey Stateful Metric.md | 4 ++-- reports/obsidian/States/Agent State.md | 2 +- reports/obsidian/States/Global State.md | 2 +- reports/obsidian/States/Site State.md | 2 +- reports/obsidian/Types/2D Size Type.md | 2 +- .../Types/Agent Age Delta Array Type.md | 2 +- reports/obsidian/Types/Agent Array Type.md | 2 +- reports/obsidian/Types/Agent Entity Type.md | 2 +- .../Types/Agent Food Delta Array Type.md | 2 +- .../Types/Agent Location Array Type.md | 2 +- reports/obsidian/Types/Agent Type.md | 2 +- reports/obsidian/Types/Delta Timestep Type.md | 2 +- reports/obsidian/Types/Entity Type.md | 2 +- reports/obsidian/Types/Float Type.md | 2 +- .../Types/Food Location Array Type.md | 2 +- reports/obsidian/Types/Food Type.md | 2 +- reports/obsidian/Types/Integer Type.md | 2 +- reports/obsidian/Types/Location Type.md | 2 +- .../obsidian/Types/Locations Array Type.md | 2 +- reports/obsidian/Types/Probability Type.md | 2 +- reports/obsidian/Types/Simulation Log Type.md | 2 +- reports/obsidian/Types/Timestep Type.md | 2 +- .../obsidian/Wiring/Age & Food Mechanisms.md | 2 +- .../obsidian/Wiring/Agent Movement Wiring.md | 2 +- .../Wiring/Agent Reproduction Mechanisms.md | 2 +- .../Wiring/Agent Reproduction Wiring.md | 2 +- .../obsidian/Wiring/Food Eating Mechanisms.md | 2 +- reports/obsidian/Wiring/Food Growth Wiring.md | 2 +- reports/obsidian/Wiring/Hunt Prey Wiring.md | 2 +- .../Wiring/Increase Agent Age Wiring.md | 2 +- .../obsidian/Wiring/Natural Death Wiring.md | 2 +- .../obsidian/Wiring/Prey Eaten Mechanisms.md | 2 +- .../obsidian/Wiring/Prey Feeding Wiring.md | 2 +- .../Wiring/Simulation Meta Mechanisms.md | 2 +- .../obsidian/Wiring/Simulation Meta Wiring.md | 2 +- 101 files changed, 159 insertions(+), 161 deletions(-) diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index f708763..faa26a1 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -11,10 +11,14 @@ "id": "4507d71ae7a37972", "type": "leaf", "state": { - "type": "empty", - "state": {}, + "type": "markdown", + "state": { + "file": "reports/obsidian/Control Actions/Increase Age Control Action.md", + "mode": "source", + "source": false + }, "icon": "lucide-file", - "title": "New tab" + "title": "Increase Age Control Action" } } ] @@ -89,6 +93,7 @@ "state": { "type": "backlink", "state": { + "file": "reports/obsidian/Control Actions/Increase Age Control Action.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -98,7 +103,7 @@ "unlinkedCollapsed": true }, "icon": "links-coming-in", - "title": "Backlinks" + "title": "Backlinks for Increase Age Control Action" } }, { @@ -158,6 +163,10 @@ }, "active": "4507d71ae7a37972", "lastOpenFiles": [ + "reports/obsidian/Control Actions/Food Growth Control Action.md", + "reports/obsidian/Parameters/Initial Number of Predators.md", + "reports/obsidian/Mechanisms/Update Agent Locations Mechanism.md", + "reports/obsidian/Displays/Wiring/All Top Level Wirings.md", "tests/Stateful Metrics.ipynb", "tests/Simulation Log Test.ipynb", "src/Wiring/Meta.py", @@ -178,7 +187,6 @@ "reports/obsidian/Mechanisms/Increment Time Mechanism.md", "LICENSE", "src/Implementations/Python/Mechanisms/__pycache__/Meta.cpython-39.pyc", - "src/Implementations/Python/Policies/__pycache__/Meta.cpython-39.pyc", "reports/obsidian/Spec Tree.md", "reports/obsidian/Wiring/Food Growth Wiring.md", "reports/obsidian/Boundary Actions/Prey Feeding Boundary Action.md", @@ -190,9 +198,6 @@ "reports/obsidian/Wiring/Agent Reproduction Mechanisms.md", "reports/obsidian/Boundary Actions/Agent Movement Boundary Action.md", "reports/obsidian/Wiring/Agent Movement Wiring.md", - "reports/obsidian/Wiring/Age & Food Mechanisms.md", - "reports/obsidian/Wiring/DUMMY Length-1 Boundary Wiring.md", - "reports/obsidian/Mechanisms/Increase Agent Age Mechanism.md", - "reports/obsidian/Mechanisms/Update Food Locations Mechanism.md" + "reports/obsidian/Wiring/Age & Food Mechanisms.md" ] } \ No newline at end of file diff --git a/notebooks/Build Obsidian.ipynb b/notebooks/Build Obsidian.ipynb index b956925..e3c1dc3 100644 --- a/notebooks/Build Obsidian.ipynb +++ b/notebooks/Build Obsidian.ipynb @@ -18,15 +18,7 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Displays not implemented\n" - ] - } - ], + "outputs": [], "source": [ "import sys\n", "import os\n", @@ -70,13 +62,6 @@ "write_spec_tree(ms, path=write_folder, linking=True)\n", "write_overview(ms, \"MSML Template\", \"../README.md\", base_folder=\"../README-Base.md\")" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/reports/obsidian/Boundary Actions/Agent Movement Boundary Action.md b/reports/obsidian/Boundary Actions/Agent Movement Boundary Action.md index 78984fd..96b8839 100644 --- a/reports/obsidian/Boundary Actions/Agent Movement Boundary Action.md +++ b/reports/obsidian/Boundary Actions/Agent Movement Boundary Action.md @@ -29,9 +29,9 @@ def all_agents_move(state, params, spaces): shuffle(agents) return [{"Agents": agents}] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/BoundaryActions/Agent.py](../../../src/Implementations/Python/BoundaryActions/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/BoundaryActions/Agent.py#L17](../../../src/Implementations/Python/BoundaryActions/Agent.py#L17) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/BoundaryActions/Agent.py](../../../../src/BoundaryActions/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/BoundaryActions/Agent.py#L50](../../../../src/BoundaryActions/Agent.py#L50) diff --git a/reports/obsidian/Boundary Actions/Agent Reproduction Boundary Action.md b/reports/obsidian/Boundary Actions/Agent Reproduction Boundary Action.md index 38c6e58..00fddb3 100644 --- a/reports/obsidian/Boundary Actions/Agent Reproduction Boundary Action.md +++ b/reports/obsidian/Boundary Actions/Agent Reproduction Boundary Action.md @@ -32,9 +32,9 @@ def reproduction_threshold_reproduction_boundary_action(state, params, spaces): shuffle(agents) return [{"Agents": agents}] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/BoundaryActions/Agent.py](../../../src/Implementations/Python/BoundaryActions/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/BoundaryActions/Agent.py#L23](../../../src/Implementations/Python/BoundaryActions/Agent.py#L23) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/BoundaryActions/Agent.py](../../../../src/BoundaryActions/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/BoundaryActions/Agent.py#L72](../../../../src/BoundaryActions/Agent.py#L72) diff --git a/reports/obsidian/Boundary Actions/Hunt Prey Boundary Action.md b/reports/obsidian/Boundary Actions/Hunt Prey Boundary Action.md index a0f5550..8526951 100644 --- a/reports/obsidian/Boundary Actions/Hunt Prey Boundary Action.md +++ b/reports/obsidian/Boundary Actions/Hunt Prey Boundary Action.md @@ -32,9 +32,9 @@ def hunt_prey_boundary_action_v1(state, params, spaces): shuffle(predators) return [{"Agents": predators}] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/BoundaryActions/Agent.py](../../../src/Implementations/Python/BoundaryActions/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/BoundaryActions/Agent.py#L10](../../../src/Implementations/Python/BoundaryActions/Agent.py#L10) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/BoundaryActions/Agent.py](../../../../src/BoundaryActions/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/BoundaryActions/Agent.py#L23](../../../../src/BoundaryActions/Agent.py#L23) diff --git a/reports/obsidian/Boundary Actions/Prey Feeding Boundary Action.md b/reports/obsidian/Boundary Actions/Prey Feeding Boundary Action.md index 8d3af08..37c46c4 100644 --- a/reports/obsidian/Boundary Actions/Prey Feeding Boundary Action.md +++ b/reports/obsidian/Boundary Actions/Prey Feeding Boundary Action.md @@ -31,9 +31,9 @@ def prey_feeding_boundary_action_v1(state, params, spaces): prey = [x for x in prey if x["Food"] <= params["Hunger Threshold"]] return [{"Agents": prey}] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/BoundaryActions/Agent.py](../../../src/Implementations/Python/BoundaryActions/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/BoundaryActions/Agent.py#L4](../../../src/Implementations/Python/BoundaryActions/Agent.py#L4) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/BoundaryActions/Agent.py](../../../../src/BoundaryActions/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/BoundaryActions/Agent.py#L2](../../../../src/BoundaryActions/Agent.py#L2) diff --git a/reports/obsidian/Control Actions/Food Growth Control Action.md b/reports/obsidian/Control Actions/Food Growth Control Action.md index 4f690d9..be14ccc 100644 --- a/reports/obsidian/Control Actions/Food Growth Control Action.md +++ b/reports/obsidian/Control Actions/Food Growth Control Action.md @@ -29,9 +29,9 @@ def food_growth_control_action_v1(state, params, spaces): ] return [{"Locations": sites}] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/ControlActions/Site.py](../../../src/Implementations/Python/ControlActions/Site.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/ControlActions/Site.py#L1](../../../src/Implementations/Python/ControlActions/Site.py#L1) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/ControlActions/Site.py](../../../../src/ControlActions/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/ControlActions/Site.py#L2](../../../../src/ControlActions/Site.py#L2) diff --git a/reports/obsidian/Control Actions/Increase Age Control Action.md b/reports/obsidian/Control Actions/Increase Age Control Action.md index fef2a51..9e93654 100644 --- a/reports/obsidian/Control Actions/Increase Age Control Action.md +++ b/reports/obsidian/Control Actions/Increase Age Control Action.md @@ -23,9 +23,9 @@ Return all agents def increase_agent_age_control_action_v1(state, params, spaces): return [{"Agents": state["Agents"]}] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/ControlActions/Agent.py](../../../src/Implementations/Python/ControlActions/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/ControlActions/Agent.py#L5](../../../src/Implementations/Python/ControlActions/Agent.py#L5) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/ControlActions/Agent.py](../../../../src/ControlActions/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/ControlActions/Agent.py#L23](../../../../src/ControlActions/Agent.py#L23) diff --git a/reports/obsidian/Control Actions/Natural Death Control Action.md b/reports/obsidian/Control Actions/Natural Death Control Action.md index 72ecb95..5f3c884 100644 --- a/reports/obsidian/Control Actions/Natural Death Control Action.md +++ b/reports/obsidian/Control Actions/Natural Death Control Action.md @@ -23,9 +23,9 @@ Return all agents def natural_death_control_action_v1(state, params, spaces): return [{"Agents": state["Agents"]}] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/ControlActions/Agent.py](../../../src/Implementations/Python/ControlActions/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/ControlActions/Agent.py#L1](../../../src/Implementations/Python/ControlActions/Agent.py#L1) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/ControlActions/Agent.py](../../../../src/ControlActions/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/ControlActions/Agent.py#L2](../../../../src/ControlActions/Agent.py#L2) diff --git a/reports/obsidian/Displays/Wiring/All Top Level Wirings.md b/reports/obsidian/Displays/Wiring/All Top Level Wirings.md index 04b72de..75d02ea 100644 --- a/reports/obsidian/Displays/Wiring/All Top Level Wirings.md +++ b/reports/obsidian/Displays/Wiring/All Top Level Wirings.md @@ -9,3 +9,7 @@ The wirings which are not components of other wirings. ## Unique Parameters Used +## Spec Source Code Location + +Spec Path (only works if vault is opened at level including the src folder): [../../../../../src/Displays/wiring.py#L4](../../../../../src/Displays/wiring.py#L4) + diff --git a/reports/obsidian/Displays/Wiring/Boundary Wirings.md b/reports/obsidian/Displays/Wiring/Boundary Wirings.md index a35cf85..5b7ec4c 100644 --- a/reports/obsidian/Displays/Wiring/Boundary Wirings.md +++ b/reports/obsidian/Displays/Wiring/Boundary Wirings.md @@ -9,3 +9,7 @@ The wirings related to only boundary type actions. ## Unique Parameters Used +## Spec Source Code Location + +Spec Path (only works if vault is opened at level including the src folder): [../../../../../src/Displays/wiring.py#L12](../../../../../src/Displays/wiring.py#L12) + diff --git a/reports/obsidian/Entities/Agent.md b/reports/obsidian/Entities/Agent.md index ddaf1f9..388b69a 100644 --- a/reports/obsidian/Entities/Agent.md +++ b/reports/obsidian/Entities/Agent.md @@ -29,5 +29,5 @@ An agent within the system ### [[Increase Age Control Action]] ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Entities/Agent.py](../../../../src/Entities/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Entities/Agent.py#L2](../../../../src/Entities/Agent.py#L2) diff --git a/reports/obsidian/Entities/Global.md b/reports/obsidian/Entities/Global.md index 4d62a9e..b654c49 100644 --- a/reports/obsidian/Entities/Global.md +++ b/reports/obsidian/Entities/Global.md @@ -24,5 +24,5 @@ ### [[Agent Reproduction Boundary Action]] ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Entities/Global.py](../../../../src/Entities/Global.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Entities/Global.py#L1](../../../../src/Entities/Global.py#L1) diff --git a/reports/obsidian/Entities/Site.md b/reports/obsidian/Entities/Site.md index ff9510e..12dde46 100644 --- a/reports/obsidian/Entities/Site.md +++ b/reports/obsidian/Entities/Site.md @@ -23,5 +23,5 @@ A site within the sites ### [[Agent Reproduction Boundary Action]] ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Entities/Sites.py](../../../../src/Entities/Sites.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Entities/Sites.py#L2](../../../../src/Entities/Sites.py#L2) diff --git a/reports/obsidian/Mechanisms/Create Agents Mechanism.md b/reports/obsidian/Mechanisms/Create Agents Mechanism.md index b8717f2..8720199 100644 --- a/reports/obsidian/Mechanisms/Create Agents Mechanism.md +++ b/reports/obsidian/Mechanisms/Create Agents Mechanism.md @@ -29,9 +29,9 @@ def create_agents_mechanism(state, params, spaces): state["Agents"].append(agent) state["Sites Matrix"][loc[0]][loc[1]]["Agent"] = agent ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Mechanisms/Agent.py](../../../src/Implementations/Python/Mechanisms/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Mechanisms/Agent.py#L21](../../../src/Implementations/Python/Mechanisms/Agent.py#L21) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Mechanisms/Agent.py](../../../../src/Mechanisms/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Mechanisms/Agent.py#L38](../../../../src/Mechanisms/Agent.py#L38) diff --git a/reports/obsidian/Mechanisms/Increase Agent Age Mechanism.md b/reports/obsidian/Mechanisms/Increase Agent Age Mechanism.md index 1e7e728..dacf330 100644 --- a/reports/obsidian/Mechanisms/Increase Agent Age Mechanism.md +++ b/reports/obsidian/Mechanisms/Increase Agent Age Mechanism.md @@ -22,9 +22,9 @@ def update_agent_age_mechanism(state, params, spaces): for values in spaces[0]["Age Deltas"]: values["Agent"]["Age"] += values["Delta Age"] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Mechanisms/Agent.py](../../../src/Implementations/Python/Mechanisms/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Mechanisms/Agent.py#L16](../../../src/Implementations/Python/Mechanisms/Agent.py#L16) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Mechanisms/Agent.py](../../../../src/Mechanisms/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Mechanisms/Agent.py#L26](../../../../src/Mechanisms/Agent.py#L26) diff --git a/reports/obsidian/Mechanisms/Increment Time Mechanism.md b/reports/obsidian/Mechanisms/Increment Time Mechanism.md index 45d5b8e..a7cce9e 100644 --- a/reports/obsidian/Mechanisms/Increment Time Mechanism.md +++ b/reports/obsidian/Mechanisms/Increment Time Mechanism.md @@ -21,9 +21,9 @@ Add the delta timestep to the current timestep def increment_time_mechanism(state, params, spaces): state["Timestep"] += spaces[0]["Timestep"] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Mechanisms/Meta.py](../../../src/Implementations/Python/Mechanisms/Meta.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Mechanisms/Meta.py#L1](../../../src/Implementations/Python/Mechanisms/Meta.py#L1) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Mechanisms/Meta.py](../../../../src/Mechanisms/Meta.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Mechanisms/Meta.py#L2](../../../../src/Mechanisms/Meta.py#L2) diff --git a/reports/obsidian/Mechanisms/Log Simulation Data Mechanism.md b/reports/obsidian/Mechanisms/Log Simulation Data Mechanism.md index e5a8c38..8dd23bf 100644 --- a/reports/obsidian/Mechanisms/Log Simulation Data Mechanism.md +++ b/reports/obsidian/Mechanisms/Log Simulation Data Mechanism.md @@ -21,9 +21,9 @@ Append the space to the simulation log def log_simulation_data_mechanism(state, params, spaces): state["Simulation Log"].append(spaces[0]) ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Mechanisms/Meta.py](../../../src/Implementations/Python/Mechanisms/Meta.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Mechanisms/Meta.py#L5](../../../src/Implementations/Python/Mechanisms/Meta.py#L5) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Mechanisms/Meta.py](../../../../src/Mechanisms/Meta.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Mechanisms/Meta.py#L14](../../../../src/Mechanisms/Meta.py#L14) diff --git a/reports/obsidian/Mechanisms/Remove Agents Mechanism.md b/reports/obsidian/Mechanisms/Remove Agents Mechanism.md index 7be5005..6e78016 100644 --- a/reports/obsidian/Mechanisms/Remove Agents Mechanism.md +++ b/reports/obsidian/Mechanisms/Remove Agents Mechanism.md @@ -28,9 +28,9 @@ def remove_agents_mechanism(state, params, spaces): "Agent" ] = None ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Mechanisms/Agent.py](../../../src/Implementations/Python/Mechanisms/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Mechanisms/Agent.py#L1](../../../src/Implementations/Python/Mechanisms/Agent.py#L1) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Mechanisms/Agent.py](../../../../src/Mechanisms/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Mechanisms/Agent.py#L2](../../../../src/Mechanisms/Agent.py#L2) diff --git a/reports/obsidian/Mechanisms/Update Agent Locations Mechanism.md b/reports/obsidian/Mechanisms/Update Agent Locations Mechanism.md index 675db41..8479e68 100644 --- a/reports/obsidian/Mechanisms/Update Agent Locations Mechanism.md +++ b/reports/obsidian/Mechanisms/Update Agent Locations Mechanism.md @@ -31,9 +31,9 @@ def update_agent_locations_mechanism(state, params, spaces): agent["Location"] = loc state["Sites Matrix"][loc[0]][loc[1]]["Agent"] = agent ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Mechanisms/Site.py](../../../src/Implementations/Python/Mechanisms/Site.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Mechanisms/Site.py#L8](../../../src/Implementations/Python/Mechanisms/Site.py#L8) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Mechanisms/Site.py](../../../../src/Mechanisms/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Mechanisms/Site.py#L14](../../../../src/Mechanisms/Site.py#L14) diff --git a/reports/obsidian/Mechanisms/Update Food Locations Mechanism.md b/reports/obsidian/Mechanisms/Update Food Locations Mechanism.md index 69cc01c..6d6e611 100644 --- a/reports/obsidian/Mechanisms/Update Food Locations Mechanism.md +++ b/reports/obsidian/Mechanisms/Update Food Locations Mechanism.md @@ -25,9 +25,9 @@ def update_food_locations_mechanism(state, params, spaces): "Food" ] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Mechanisms/Site.py](../../../src/Implementations/Python/Mechanisms/Site.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Mechanisms/Site.py#L1](../../../src/Implementations/Python/Mechanisms/Site.py#L1) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Mechanisms/Site.py](../../../../src/Mechanisms/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Mechanisms/Site.py#L2](../../../../src/Mechanisms/Site.py#L2) diff --git a/reports/obsidian/Mechanisms/Update Food Mechanism.md b/reports/obsidian/Mechanisms/Update Food Mechanism.md index 5f5b9b2..b562354 100644 --- a/reports/obsidian/Mechanisms/Update Food Mechanism.md +++ b/reports/obsidian/Mechanisms/Update Food Mechanism.md @@ -25,9 +25,9 @@ def update_food_mechanism(state, params, spaces): for values in spaces[0]["Food Deltas"]: values["Agent"]["Food"] += values["Delta Food"] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Mechanisms/Agent.py](../../../src/Implementations/Python/Mechanisms/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Mechanisms/Agent.py#L11](../../../src/Implementations/Python/Mechanisms/Agent.py#L11) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Mechanisms/Agent.py](../../../../src/Mechanisms/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Mechanisms/Agent.py#L14](../../../../src/Mechanisms/Agent.py#L14) diff --git a/reports/obsidian/Metrics/Available Food Metric.md b/reports/obsidian/Metrics/Available Food Metric.md index 2db17a7..7b05a96 100644 --- a/reports/obsidian/Metrics/Available Food Metric.md +++ b/reports/obsidian/Metrics/Available Food Metric.md @@ -23,9 +23,9 @@ def available_food_metric(state, params, spaces): food = [x["Food"] for x in sites] return food ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Metrics/Site.py](../../../src/Implementations/Python/Metrics/Site.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Metrics/Site.py#L1](../../../src/Implementations/Python/Metrics/Site.py#L1) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Metrics/Site.py](../../../../src/Metrics/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Metrics/Site.py#L7](../../../../src/Metrics/Site.py#L7) diff --git a/reports/obsidian/Metrics/Is Neighbor Metric.md b/reports/obsidian/Metrics/Is Neighbor Metric.md index 1e0d190..eaff53e 100644 --- a/reports/obsidian/Metrics/Is Neighbor Metric.md +++ b/reports/obsidian/Metrics/Is Neighbor Metric.md @@ -35,9 +35,9 @@ def is_neighbor_metric(state, params, spaces): out.append(neighbors) return out ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Metrics/Agent.py](../../../src/Implementations/Python/Metrics/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Metrics/Agent.py#L16](../../../src/Implementations/Python/Metrics/Agent.py#L16) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Metrics/Site.py](../../../../src/Metrics/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Metrics/Site.py#L36](../../../../src/Metrics/Site.py#L36) diff --git a/reports/obsidian/Metrics/Neighboring Valid Tiles Metric.md b/reports/obsidian/Metrics/Neighboring Valid Tiles Metric.md index 9e8c9f0..5e4323a 100644 --- a/reports/obsidian/Metrics/Neighboring Valid Tiles Metric.md +++ b/reports/obsidian/Metrics/Neighboring Valid Tiles Metric.md @@ -32,9 +32,9 @@ def neighboring_valid_tiles_metric(state, params, spaces): out.append(options) return out ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Metrics/Agent.py](../../../src/Implementations/Python/Metrics/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Metrics/Agent.py#L1](../../../src/Implementations/Python/Metrics/Agent.py#L1) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Metrics/Site.py](../../../../src/Metrics/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Metrics/Site.py#L21](../../../../src/Metrics/Site.py#L21) diff --git a/reports/obsidian/Parameters/Food Growth Rate.md b/reports/obsidian/Parameters/Food Growth Rate.md index edabf51..444dcc3 100644 --- a/reports/obsidian/Parameters/Food Growth Rate.md +++ b/reports/obsidian/Parameters/Food Growth Rate.md @@ -10,5 +10,5 @@ Parameter Class: Behavioral ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Site.py](../../../../src/Parameters/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Site.py#L55](../../../../src/Parameters/Site.py#L55) diff --git a/reports/obsidian/Parameters/Hunger Threshold.md b/reports/obsidian/Parameters/Hunger Threshold.md index c9731ff..4b79a22 100644 --- a/reports/obsidian/Parameters/Hunger Threshold.md +++ b/reports/obsidian/Parameters/Hunger Threshold.md @@ -10,5 +10,5 @@ Parameter Class: Behavioral ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Agent.py](../../../../src/Parameters/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Agent.py#L7](../../../../src/Parameters/Agent.py#L7) diff --git a/reports/obsidian/Parameters/Initial Number of Food Tiles.md b/reports/obsidian/Parameters/Initial Number of Food Tiles.md index 979673d..1d6f038 100644 --- a/reports/obsidian/Parameters/Initial Number of Food Tiles.md +++ b/reports/obsidian/Parameters/Initial Number of Food Tiles.md @@ -10,5 +10,5 @@ Parameter Class: Functional ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Site.py](../../../../src/Parameters/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Site.py#L15](../../../../src/Parameters/Site.py#L15) diff --git a/reports/obsidian/Parameters/Initial Number of Predators.md b/reports/obsidian/Parameters/Initial Number of Predators.md index edc628f..da06df7 100644 --- a/reports/obsidian/Parameters/Initial Number of Predators.md +++ b/reports/obsidian/Parameters/Initial Number of Predators.md @@ -10,5 +10,5 @@ Parameter Class: Functional ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Site.py](../../../../src/Parameters/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Site.py#L23](../../../../src/Parameters/Site.py#L23) diff --git a/reports/obsidian/Parameters/Initial Number of Prey.md b/reports/obsidian/Parameters/Initial Number of Prey.md index 0893cf2..cff0f14 100644 --- a/reports/obsidian/Parameters/Initial Number of Prey.md +++ b/reports/obsidian/Parameters/Initial Number of Prey.md @@ -10,5 +10,5 @@ Parameter Class: Functional ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Site.py](../../../../src/Parameters/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Site.py#L31](../../../../src/Parameters/Site.py#L31) diff --git a/reports/obsidian/Parameters/Initial Predator Food.md b/reports/obsidian/Parameters/Initial Predator Food.md index f9fce4c..c202319 100644 --- a/reports/obsidian/Parameters/Initial Predator Food.md +++ b/reports/obsidian/Parameters/Initial Predator Food.md @@ -10,5 +10,5 @@ Parameter Class: Behavioral ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Agent.py](../../../../src/Parameters/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Agent.py#L55](../../../../src/Parameters/Agent.py#L55) diff --git a/reports/obsidian/Parameters/Initial Prey Food.md b/reports/obsidian/Parameters/Initial Prey Food.md index 2dd1af6..e350b9d 100644 --- a/reports/obsidian/Parameters/Initial Prey Food.md +++ b/reports/obsidian/Parameters/Initial Prey Food.md @@ -10,5 +10,5 @@ Parameter Class: Behavioral ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Agent.py](../../../../src/Parameters/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Agent.py#L47](../../../../src/Parameters/Agent.py#L47) diff --git a/reports/obsidian/Parameters/Maximum Age Parameter.md b/reports/obsidian/Parameters/Maximum Age Parameter.md index b9a91bb..0c04f6a 100644 --- a/reports/obsidian/Parameters/Maximum Age Parameter.md +++ b/reports/obsidian/Parameters/Maximum Age Parameter.md @@ -10,5 +10,5 @@ Parameter Class: System ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Agent.py](../../../../src/Parameters/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Agent.py#L15](../../../../src/Parameters/Agent.py#L15) diff --git a/reports/obsidian/Parameters/Maximum Food per Tile.md b/reports/obsidian/Parameters/Maximum Food per Tile.md index ac9fce0..eed735e 100644 --- a/reports/obsidian/Parameters/Maximum Food per Tile.md +++ b/reports/obsidian/Parameters/Maximum Food per Tile.md @@ -10,5 +10,5 @@ Parameter Class: Behavioral ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Site.py](../../../../src/Parameters/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Site.py#L47](../../../../src/Parameters/Site.py#L47) diff --git a/reports/obsidian/Parameters/Reproduction Food Needed.md b/reports/obsidian/Parameters/Reproduction Food Needed.md index c7fc9d2..96be043 100644 --- a/reports/obsidian/Parameters/Reproduction Food Needed.md +++ b/reports/obsidian/Parameters/Reproduction Food Needed.md @@ -10,5 +10,5 @@ Parameter Class: System ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Agent.py](../../../../src/Parameters/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Agent.py#L39](../../../../src/Parameters/Agent.py#L39) diff --git a/reports/obsidian/Parameters/Reproduction Food Threshold.md b/reports/obsidian/Parameters/Reproduction Food Threshold.md index 8b92736..890b669 100644 --- a/reports/obsidian/Parameters/Reproduction Food Threshold.md +++ b/reports/obsidian/Parameters/Reproduction Food Threshold.md @@ -10,5 +10,5 @@ Parameter Class: System ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Agent.py](../../../../src/Parameters/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Agent.py#L23](../../../../src/Parameters/Agent.py#L23) diff --git a/reports/obsidian/Parameters/Reproduction Probability.md b/reports/obsidian/Parameters/Reproduction Probability.md index 99f4a5b..aceb61e 100644 --- a/reports/obsidian/Parameters/Reproduction Probability.md +++ b/reports/obsidian/Parameters/Reproduction Probability.md @@ -10,5 +10,5 @@ Parameter Class: Behavioral ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Agent.py](../../../../src/Parameters/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Agent.py#L31](../../../../src/Parameters/Agent.py#L31) diff --git a/reports/obsidian/Parameters/Site Size.md b/reports/obsidian/Parameters/Site Size.md index 3527728..4ff85b4 100644 --- a/reports/obsidian/Parameters/Site Size.md +++ b/reports/obsidian/Parameters/Site Size.md @@ -10,5 +10,5 @@ Parameter Class: Functional ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Site.py](../../../../src/Parameters/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Parameters/Site.py#L7](../../../../src/Parameters/Site.py#L7) diff --git a/reports/obsidian/Policies/Agent Movement Policy.md b/reports/obsidian/Policies/Agent Movement Policy.md index 1ec0879..7d17c69 100644 --- a/reports/obsidian/Policies/Agent Movement Policy.md +++ b/reports/obsidian/Policies/Agent Movement Policy.md @@ -55,9 +55,9 @@ def random_agent_movement_with_sieve(state, params, spaces): sieve = hold return [out_space] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Policies/Agent.py](../../../src/Implementations/Python/Policies/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Policies/Agent.py#L42](../../../src/Implementations/Python/Policies/Agent.py#L42) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Policies/Agent.py](../../../../src/Policies/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Policies/Agent.py#L69](../../../../src/Policies/Agent.py#L69) diff --git a/reports/obsidian/Policies/Agent Reproduction Policy.md b/reports/obsidian/Policies/Agent Reproduction Policy.md index ad7eec8..1fd0c32 100644 --- a/reports/obsidian/Policies/Agent Reproduction Policy.md +++ b/reports/obsidian/Policies/Agent Reproduction Policy.md @@ -114,9 +114,9 @@ def agent_reproduction_policy_v1(state, params, spaces): ) return [space1, space2] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Policies/Agent.py](../../../src/Implementations/Python/Policies/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Policies/Agent.py#L100](../../../src/Implementations/Python/Policies/Agent.py#L100) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Policies/Agent.py](../../../../src/Policies/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Policies/Agent.py#L108](../../../../src/Policies/Agent.py#L108) diff --git a/reports/obsidian/Policies/Food Growth Policy.md b/reports/obsidian/Policies/Food Growth Policy.md index 86aca0c..01070b1 100644 --- a/reports/obsidian/Policies/Food Growth Policy.md +++ b/reports/obsidian/Policies/Food Growth Policy.md @@ -33,7 +33,7 @@ def constant_food_growth_policy(state, params, spaces): ) return [space] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Policies/Site.py](../../../src/Implementations/Python/Policies/Site.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Policies/Site.py#L1](../../../src/Implementations/Python/Policies/Site.py#L1) ### 2. Poisson Food Growth Policy #### Description @@ -43,5 +43,5 @@ For each location, the delta is equal to min(Food + POISSON(params["Food Growth ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Policies/Site.py](../../../../src/Policies/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Policies/Site.py#L2](../../../../src/Policies/Site.py#L2) diff --git a/reports/obsidian/Policies/Hunt Prey Policy.md b/reports/obsidian/Policies/Hunt Prey Policy.md index 573833e..8d6ad13 100644 --- a/reports/obsidian/Policies/Hunt Prey Policy.md +++ b/reports/obsidian/Policies/Hunt Prey Policy.md @@ -50,9 +50,9 @@ def hunt_prey_policy_v1(state, params, spaces): space2["Agents"].append(prey) return [space1, space2] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Policies/Agent.py](../../../src/Implementations/Python/Policies/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Policies/Agent.py#L74](../../../src/Implementations/Python/Policies/Agent.py#L74) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Policies/Agent.py](../../../../src/Policies/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Policies/Agent.py#L91](../../../../src/Policies/Agent.py#L91) diff --git a/reports/obsidian/Policies/Increase Agent Age Policy.md b/reports/obsidian/Policies/Increase Agent Age Policy.md index 5fa1cc8..341db15 100644 --- a/reports/obsidian/Policies/Increase Agent Age Policy.md +++ b/reports/obsidian/Policies/Increase Agent Age Policy.md @@ -28,9 +28,9 @@ def increase_agent_age_policy_plus1(state, params, spaces): space2 = {"Age Deltas": [{"Agent": x, "Delta Age": 1} for x in agents]} return [space1, space2] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Policies/Agent.py](../../../src/Implementations/Python/Policies/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Policies/Agent.py#L16](../../../src/Implementations/Python/Policies/Agent.py#L16) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Policies/Agent.py](../../../../src/Policies/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Policies/Agent.py#L23](../../../../src/Policies/Agent.py#L23) diff --git a/reports/obsidian/Policies/Natural Death Policy.md b/reports/obsidian/Policies/Natural Death Policy.md index d1c1315..cb40944 100644 --- a/reports/obsidian/Policies/Natural Death Policy.md +++ b/reports/obsidian/Policies/Natural Death Policy.md @@ -32,9 +32,9 @@ def natural_death_policy(state, params, spaces): } return [space] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Policies/Agent.py](../../../src/Implementations/Python/Policies/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Policies/Agent.py#L4](../../../src/Implementations/Python/Policies/Agent.py#L4) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Policies/Agent.py](../../../../src/Policies/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Policies/Agent.py#L2](../../../../src/Policies/Agent.py#L2) diff --git a/reports/obsidian/Policies/Prey Feeding Policy.md b/reports/obsidian/Policies/Prey Feeding Policy.md index 0a749f0..0c5c0ad 100644 --- a/reports/obsidian/Policies/Prey Feeding Policy.md +++ b/reports/obsidian/Policies/Prey Feeding Policy.md @@ -41,9 +41,9 @@ def prey_eat_all_food_policy(state, params, spaces): } return [space1, space2] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Policies/Agent.py](../../../src/Implementations/Python/Policies/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Policies/Agent.py#L23](../../../src/Implementations/Python/Policies/Agent.py#L23) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Policies/Agent.py](../../../../src/Policies/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Policies/Agent.py#L48](../../../../src/Policies/Agent.py#L48) diff --git a/reports/obsidian/Policies/Simulation Meta Policy.md b/reports/obsidian/Policies/Simulation Meta Policy.md index 69966eb..4802f6c 100644 --- a/reports/obsidian/Policies/Simulation Meta Policy.md +++ b/reports/obsidian/Policies/Simulation Meta Policy.md @@ -46,9 +46,9 @@ def simulation_meta_policy_v1(state, params, spaces): return [space1, space2] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Policies/Meta.py](../../../src/Implementations/Python/Policies/Meta.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/Policies/Meta.py#L1](../../../src/Implementations/Python/Policies/Meta.py#L1) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Policies/Meta.py](../../../../src/Policies/Meta.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Policies/Meta.py#L2](../../../../src/Policies/Meta.py#L2) diff --git a/reports/obsidian/Spaces/Agent Age Delta Space.md b/reports/obsidian/Spaces/Agent Age Delta Space.md index 2467853..0fb46cd 100644 --- a/reports/obsidian/Spaces/Agent Age Delta Space.md +++ b/reports/obsidian/Spaces/Agent Age Delta Space.md @@ -10,5 +10,5 @@ ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Spaces/Agent.py](../../../../src/Spaces/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Spaces/Agent.py#L9](../../../../src/Spaces/Agent.py#L9) diff --git a/reports/obsidian/Spaces/Agent Food Delta Space.md b/reports/obsidian/Spaces/Agent Food Delta Space.md index 12b1207..fdbebbf 100644 --- a/reports/obsidian/Spaces/Agent Food Delta Space.md +++ b/reports/obsidian/Spaces/Agent Food Delta Space.md @@ -13,5 +13,5 @@ ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Spaces/Agent.py](../../../../src/Spaces/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Spaces/Agent.py#L16](../../../../src/Spaces/Agent.py#L16) diff --git a/reports/obsidian/Spaces/Agent Location Space.md b/reports/obsidian/Spaces/Agent Location Space.md index 34f6f65..df96258 100644 --- a/reports/obsidian/Spaces/Agent Location Space.md +++ b/reports/obsidian/Spaces/Agent Location Space.md @@ -10,5 +10,5 @@ ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Spaces/Agent.py](../../../../src/Spaces/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Spaces/Agent.py#L23](../../../../src/Spaces/Agent.py#L23) diff --git a/reports/obsidian/Spaces/Agents Space.md b/reports/obsidian/Spaces/Agents Space.md index 7acb8f6..b93ac3e 100644 --- a/reports/obsidian/Spaces/Agents Space.md +++ b/reports/obsidian/Spaces/Agents Space.md @@ -25,5 +25,5 @@ ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Spaces/Agent.py](../../../../src/Spaces/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Spaces/Agent.py#L2](../../../../src/Spaces/Agent.py#L2) diff --git a/reports/obsidian/Spaces/Location Food Delta Space.md b/reports/obsidian/Spaces/Location Food Delta Space.md index 7cf3df8..b7aba96 100644 --- a/reports/obsidian/Spaces/Location Food Delta Space.md +++ b/reports/obsidian/Spaces/Location Food Delta Space.md @@ -11,5 +11,5 @@ ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Spaces/Site.py](../../../../src/Spaces/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Spaces/Site.py#L9](../../../../src/Spaces/Site.py#L9) diff --git a/reports/obsidian/Spaces/Locations Space.md b/reports/obsidian/Spaces/Locations Space.md index 0d5fa08..14c5601 100644 --- a/reports/obsidian/Spaces/Locations Space.md +++ b/reports/obsidian/Spaces/Locations Space.md @@ -10,5 +10,5 @@ ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Spaces/Site.py](../../../../src/Spaces/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Spaces/Site.py#L2](../../../../src/Spaces/Site.py#L2) diff --git a/reports/obsidian/Spaces/Simulation Log Space.md b/reports/obsidian/Spaces/Simulation Log Space.md index b562fbe..b8cf5f9 100644 --- a/reports/obsidian/Spaces/Simulation Log Space.md +++ b/reports/obsidian/Spaces/Simulation Log Space.md @@ -10,5 +10,5 @@ ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Spaces/Meta.py](../../../../src/Spaces/Meta.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Spaces/Meta.py#L9](../../../../src/Spaces/Meta.py#L9) diff --git a/reports/obsidian/Spaces/Timestep Space.md b/reports/obsidian/Spaces/Timestep Space.md index fc9f4a7..a4e332f 100644 --- a/reports/obsidian/Spaces/Timestep Space.md +++ b/reports/obsidian/Spaces/Timestep Space.md @@ -10,5 +10,5 @@ ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Spaces/Meta.py](../../../../src/Spaces/Meta.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Spaces/Meta.py#L2](../../../../src/Spaces/Meta.py#L2) diff --git a/reports/obsidian/Stateful Metrics/Filled Locations Stateful Metric.md b/reports/obsidian/Stateful Metrics/Filled Locations Stateful Metric.md index f2105ac..c76cdf9 100644 --- a/reports/obsidian/Stateful Metrics/Filled Locations Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Filled Locations Stateful Metric.md @@ -17,9 +17,9 @@ Domain: None def filled_locations_stateful_metric(state, params): return [site for site in state["Sites"] if site["Agent"] is not None] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Site.py](../../../src/Implementations/Python/StatefulMetrics/Site.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Site.py#L8](../../../src/Implementations/Python/StatefulMetrics/Site.py#L8) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Site.py](../../../../src/StatefulMetrics/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Site.py#L16](../../../../src/StatefulMetrics/Site.py#L16) diff --git a/reports/obsidian/Stateful Metrics/Median Predator Age Stateful Metric.md b/reports/obsidian/Stateful Metrics/Median Predator Age Stateful Metric.md index 571bc7e..fbbe267 100644 --- a/reports/obsidian/Stateful Metrics/Median Predator Age Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Median Predator Age Stateful Metric.md @@ -21,9 +21,9 @@ def median_predator_age_stateful_metric(state, params): ] return median(predators) if len(predators) > 0 else None ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py](../../../src/Implementations/Python/StatefulMetrics/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py#L36](../../../src/Implementations/Python/StatefulMetrics/Agent.py#L36) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Agent.py](../../../../src/StatefulMetrics/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Agent.py#L79](../../../../src/StatefulMetrics/Agent.py#L79) diff --git a/reports/obsidian/Stateful Metrics/Median Predator Food Stateful Metric.md b/reports/obsidian/Stateful Metrics/Median Predator Food Stateful Metric.md index 984b78d..732d0d8 100644 --- a/reports/obsidian/Stateful Metrics/Median Predator Food Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Median Predator Food Stateful Metric.md @@ -21,9 +21,9 @@ def median_predator_food_stateful_metric(state, params): ] return median(predators) if len(predators) > 0 else None ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py](../../../src/Implementations/Python/StatefulMetrics/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py#L20](../../../src/Implementations/Python/StatefulMetrics/Agent.py#L20) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Agent.py](../../../../src/StatefulMetrics/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Agent.py#L55](../../../../src/StatefulMetrics/Agent.py#L55) diff --git a/reports/obsidian/Stateful Metrics/Median Prey Age Stateful Metric.md b/reports/obsidian/Stateful Metrics/Median Prey Age Stateful Metric.md index 044d45a..d8fd6b5 100644 --- a/reports/obsidian/Stateful Metrics/Median Prey Age Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Median Prey Age Stateful Metric.md @@ -21,9 +21,9 @@ def median_prey_age_stateful_metric(state, params): ] return median(prey) if len(prey) > 0 else None ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py](../../../src/Implementations/Python/StatefulMetrics/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py#L44](../../../src/Implementations/Python/StatefulMetrics/Agent.py#L44) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Agent.py](../../../../src/StatefulMetrics/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Agent.py#L91](../../../../src/StatefulMetrics/Agent.py#L91) diff --git a/reports/obsidian/Stateful Metrics/Median Prey Food Stateful Metric.md b/reports/obsidian/Stateful Metrics/Median Prey Food Stateful Metric.md index ee084c6..a7237ce 100644 --- a/reports/obsidian/Stateful Metrics/Median Prey Food Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Median Prey Food Stateful Metric.md @@ -21,9 +21,9 @@ def median_prey_food_stateful_metric(state, params): ] return median(prey) if len(prey) > 0 else None ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py](../../../src/Implementations/Python/StatefulMetrics/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py#L28](../../../src/Implementations/Python/StatefulMetrics/Agent.py#L28) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Agent.py](../../../../src/StatefulMetrics/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Agent.py#L67](../../../../src/StatefulMetrics/Agent.py#L67) diff --git a/reports/obsidian/Stateful Metrics/Median Site Food Stateful Metric.md b/reports/obsidian/Stateful Metrics/Median Site Food Stateful Metric.md index 47180ea..730cef0 100644 --- a/reports/obsidian/Stateful Metrics/Median Site Food Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Median Site Food Stateful Metric.md @@ -17,9 +17,9 @@ Domain: None def median_site_food_stateful_metric(state, params): return median([x["Food"] for x in state["Sites"]]) ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Site.py](../../../src/Implementations/Python/StatefulMetrics/Site.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Site.py#L29](../../../src/Implementations/Python/StatefulMetrics/Site.py#L29) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Site.py](../../../../src/StatefulMetrics/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Site.py#L43](../../../../src/StatefulMetrics/Site.py#L43) diff --git a/reports/obsidian/Stateful Metrics/Number of Predators Stateful Metric.md b/reports/obsidian/Stateful Metrics/Number of Predators Stateful Metric.md index e190c30..a931b27 100644 --- a/reports/obsidian/Stateful Metrics/Number of Predators Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Number of Predators Stateful Metric.md @@ -17,9 +17,9 @@ Domain: None def number_of_predators_stateful_metric(state, params): return len(state["Stateful Metrics"]["Predator Stateful Metric"](state, params)) ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py](../../../src/Implementations/Python/StatefulMetrics/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py#L16](../../../src/Implementations/Python/StatefulMetrics/Agent.py#L16) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Agent.py](../../../../src/StatefulMetrics/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Agent.py#L43](../../../../src/StatefulMetrics/Agent.py#L43) diff --git a/reports/obsidian/Stateful Metrics/Number of Prey Stateful Metric.md b/reports/obsidian/Stateful Metrics/Number of Prey Stateful Metric.md index 9739014..b6bf1c6 100644 --- a/reports/obsidian/Stateful Metrics/Number of Prey Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Number of Prey Stateful Metric.md @@ -17,9 +17,9 @@ Domain: None def number_of_prey_stateful_metric(state, params): return len(state["Stateful Metrics"]["Prey Stateful Metric"](state, params)) ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py](../../../src/Implementations/Python/StatefulMetrics/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py#L12](../../../src/Implementations/Python/StatefulMetrics/Agent.py#L12) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Agent.py](../../../../src/StatefulMetrics/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Agent.py#L31](../../../../src/StatefulMetrics/Agent.py#L31) diff --git a/reports/obsidian/Stateful Metrics/Open Locations Stateful Metric.md b/reports/obsidian/Stateful Metrics/Open Locations Stateful Metric.md index 5b6cfdb..a7db9d3 100644 --- a/reports/obsidian/Stateful Metrics/Open Locations Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Open Locations Stateful Metric.md @@ -17,9 +17,9 @@ Domain: None def open_locations_stateful_metric(state, params): return [site for site in state["Sites"] if site["Agent"] is None] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Site.py](../../../src/Implementations/Python/StatefulMetrics/Site.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Site.py#L4](../../../src/Implementations/Python/StatefulMetrics/Site.py#L4) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Site.py](../../../../src/StatefulMetrics/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Site.py#L7](../../../../src/StatefulMetrics/Site.py#L7) diff --git a/reports/obsidian/Stateful Metrics/Predator Locations Stateful Metric.md b/reports/obsidian/Stateful Metrics/Predator Locations Stateful Metric.md index bdc1371..bf6b98c 100644 --- a/reports/obsidian/Stateful Metrics/Predator Locations Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Predator Locations Stateful Metric.md @@ -21,9 +21,9 @@ def predator_locations_stateful_metric(state, params): if (site["Agent"] is not None) and (site["Agent"]["Agent Type"] == "Predator") ] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Site.py](../../../src/Implementations/Python/StatefulMetrics/Site.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Site.py#L21](../../../src/Implementations/Python/StatefulMetrics/Site.py#L21) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Site.py](../../../../src/StatefulMetrics/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Site.py#L34](../../../../src/StatefulMetrics/Site.py#L34) diff --git a/reports/obsidian/Stateful Metrics/Predator Stateful Metric.md b/reports/obsidian/Stateful Metrics/Predator Stateful Metric.md index 073a0ec..843029b 100644 --- a/reports/obsidian/Stateful Metrics/Predator Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Predator Stateful Metric.md @@ -17,9 +17,9 @@ Domain: None def predator_stateful_metric(state, params): return [agent for agent in state["Agents"] if agent["Agent Type"] == "Predator"] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py](../../../src/Implementations/Python/StatefulMetrics/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py#L8](../../../src/Implementations/Python/StatefulMetrics/Agent.py#L8) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Agent.py](../../../../src/StatefulMetrics/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Agent.py#L19](../../../../src/StatefulMetrics/Agent.py#L19) diff --git a/reports/obsidian/Stateful Metrics/Prey Locations Stateful Metric.md b/reports/obsidian/Stateful Metrics/Prey Locations Stateful Metric.md index 38c063c..539104c 100644 --- a/reports/obsidian/Stateful Metrics/Prey Locations Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Prey Locations Stateful Metric.md @@ -22,9 +22,9 @@ def prey_locations_stateful_metric(state, params): if (site["Agent"] is not None) and (site["Agent"]["Agent Type"] == "Prey") ] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Site.py](../../../src/Implementations/Python/StatefulMetrics/Site.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Site.py#L12](../../../src/Implementations/Python/StatefulMetrics/Site.py#L12) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Site.py](../../../../src/StatefulMetrics/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Site.py#L25](../../../../src/StatefulMetrics/Site.py#L25) diff --git a/reports/obsidian/Stateful Metrics/Prey Stateful Metric.md b/reports/obsidian/Stateful Metrics/Prey Stateful Metric.md index 56406f4..d7b14ba 100644 --- a/reports/obsidian/Stateful Metrics/Prey Stateful Metric.md +++ b/reports/obsidian/Stateful Metrics/Prey Stateful Metric.md @@ -17,9 +17,9 @@ Domain: None def prey_stateful_metric(state, params): return [agent for agent in state["Agents"] if agent["Agent Type"] == "Prey"] ``` -Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py](../../../src/Implementations/Python/StatefulMetrics/Agent.py) +Implementation Path (only works if vault is opened at level including the src folder): [../../../src/Implementations/Python/StatefulMetrics/Agent.py#L4](../../../src/Implementations/Python/StatefulMetrics/Agent.py#L4) ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Agent.py](../../../../src/StatefulMetrics/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/StatefulMetrics/Agent.py#L7](../../../../src/StatefulMetrics/Agent.py#L7) diff --git a/reports/obsidian/States/Agent State.md b/reports/obsidian/States/Agent State.md index ca01921..edf5462 100644 --- a/reports/obsidian/States/Agent State.md +++ b/reports/obsidian/States/Agent State.md @@ -15,5 +15,5 @@ ### [[Increase Agent Age Mechanism]] ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/State/Agent.py](../../../../src/State/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/State/Agent.py#L2](../../../../src/State/Agent.py#L2) diff --git a/reports/obsidian/States/Global State.md b/reports/obsidian/States/Global State.md index c352153..13d27ad 100644 --- a/reports/obsidian/States/Global State.md +++ b/reports/obsidian/States/Global State.md @@ -16,5 +16,5 @@ ### [[Log Simulation Data Mechanism]] ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/State/Global.py](../../../../src/State/Global.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/State/Global.py#L2](../../../../src/State/Global.py#L2) diff --git a/reports/obsidian/States/Site State.md b/reports/obsidian/States/Site State.md index 5e60a5a..e62e948 100644 --- a/reports/obsidian/States/Site State.md +++ b/reports/obsidian/States/Site State.md @@ -14,5 +14,5 @@ ### [[Create Agents Mechanism]] ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/State/Site.py](../../../../src/State/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/State/Site.py#L2](../../../../src/State/Site.py#L2) diff --git a/reports/obsidian/Types/2D Size Type.md b/reports/obsidian/Types/2D Size Type.md index 3582d95..413d609 100644 --- a/reports/obsidian/Types/2D Size Type.md +++ b/reports/obsidian/Types/2D Size Type.md @@ -5,5 +5,5 @@ A tuple of size two with two [[integer type]] that represents the 2D size of something ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Primitives.py](../../../../src/Types/Primitives.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Primitives.py#L13](../../../../src/Types/Primitives.py#L13) diff --git a/reports/obsidian/Types/Agent Age Delta Array Type.md b/reports/obsidian/Types/Agent Age Delta Array Type.md index 481b48c..fb2bf47 100644 --- a/reports/obsidian/Types/Agent Age Delta Array Type.md +++ b/reports/obsidian/Types/Agent Age Delta Array Type.md @@ -5,5 +5,5 @@ An array where the objects the form of {"Agent": [[Agent Entity Type]], "Delta Age": [[Float Type]]} ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py](../../../../src/Types/Data.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py#L2](../../../../src/Types/Data.py#L2) diff --git a/reports/obsidian/Types/Agent Array Type.md b/reports/obsidian/Types/Agent Array Type.md index b1c74b7..03966fb 100644 --- a/reports/obsidian/Types/Agent Array Type.md +++ b/reports/obsidian/Types/Agent Array Type.md @@ -5,5 +5,5 @@ An array of [[agent entity type]] ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py](../../../../src/Types/Data.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py#L8](../../../../src/Types/Data.py#L8) diff --git a/reports/obsidian/Types/Agent Entity Type.md b/reports/obsidian/Types/Agent Entity Type.md index 346bda0..d00167c 100644 --- a/reports/obsidian/Types/Agent Entity Type.md +++ b/reports/obsidian/Types/Agent Entity Type.md @@ -5,5 +5,5 @@ A representation of an [[Entities/Agent|agent]] ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py](../../../../src/Types/Data.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py#L4](../../../../src/Types/Data.py#L4) diff --git a/reports/obsidian/Types/Agent Food Delta Array Type.md b/reports/obsidian/Types/Agent Food Delta Array Type.md index e5d20ec..eb450fb 100644 --- a/reports/obsidian/Types/Agent Food Delta Array Type.md +++ b/reports/obsidian/Types/Agent Food Delta Array Type.md @@ -5,5 +5,5 @@ An array where the objects the form of {"Agent": [[Agent Entity Type]], "Delta Food": [[Types/Food Type|Food Type]]} ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py](../../../../src/Types/Data.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py#L14](../../../../src/Types/Data.py#L14) diff --git a/reports/obsidian/Types/Agent Location Array Type.md b/reports/obsidian/Types/Agent Location Array Type.md index ad70623..1287a55 100644 --- a/reports/obsidian/Types/Agent Location Array Type.md +++ b/reports/obsidian/Types/Agent Location Array Type.md @@ -5,5 +5,5 @@ An array where the objects the form of {"Agent": [[Agent Entity Type]], "Location": [[Location Type]]} ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py](../../../../src/Types/Data.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py#L21](../../../../src/Types/Data.py#L21) diff --git a/reports/obsidian/Types/Agent Type.md b/reports/obsidian/Types/Agent Type.md index 3963d4c..2cefc97 100644 --- a/reports/obsidian/Types/Agent Type.md +++ b/reports/obsidian/Types/Agent Type.md @@ -5,5 +5,5 @@ A string of either 'Prey' or 'Predator' ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Primitives.py](../../../../src/Types/Primitives.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Primitives.py#L49](../../../../src/Types/Primitives.py#L49) diff --git a/reports/obsidian/Types/Delta Timestep Type.md b/reports/obsidian/Types/Delta Timestep Type.md index f376cb6..0439a81 100644 --- a/reports/obsidian/Types/Delta Timestep Type.md +++ b/reports/obsidian/Types/Delta Timestep Type.md @@ -5,5 +5,5 @@ A delta timestep. ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Primitives.py](../../../../src/Types/Primitives.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Primitives.py#L61](../../../../src/Types/Primitives.py#L61) diff --git a/reports/obsidian/Types/Entity Type.md b/reports/obsidian/Types/Entity Type.md index 96ee6b1..3aeaa2d 100644 --- a/reports/obsidian/Types/Entity Type.md +++ b/reports/obsidian/Types/Entity Type.md @@ -9,5 +9,5 @@ type EntityType = object ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py](../../../../src/Types/Data.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py#L4](../../../../src/Types/Data.py#L4) diff --git a/reports/obsidian/Types/Float Type.md b/reports/obsidian/Types/Float Type.md index 2a7bcb2..5ddfa34 100644 --- a/reports/obsidian/Types/Float Type.md +++ b/reports/obsidian/Types/Float Type.md @@ -5,5 +5,5 @@ A floating point number ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py](../../../../src/Types/Data.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py#L4](../../../../src/Types/Data.py#L4) diff --git a/reports/obsidian/Types/Food Location Array Type.md b/reports/obsidian/Types/Food Location Array Type.md index c13a489..dba36e4 100644 --- a/reports/obsidian/Types/Food Location Array Type.md +++ b/reports/obsidian/Types/Food Location Array Type.md @@ -5,5 +5,5 @@ An array where the objects the form of {"Location": [[Location Type]], "Food": [[Types/Food Type|Food Type]]} ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py](../../../../src/Types/Data.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py#L27](../../../../src/Types/Data.py#L27) diff --git a/reports/obsidian/Types/Food Type.md b/reports/obsidian/Types/Food Type.md index 056ee13..cbf7b8c 100644 --- a/reports/obsidian/Types/Food Type.md +++ b/reports/obsidian/Types/Food Type.md @@ -5,5 +5,5 @@ A subclass of [[integer type]] which represents some amount of food ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py](../../../../src/Types/Data.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py#L16](../../../../src/Types/Data.py#L16) diff --git a/reports/obsidian/Types/Integer Type.md b/reports/obsidian/Types/Integer Type.md index b05fecb..d80eaaf 100644 --- a/reports/obsidian/Types/Integer Type.md +++ b/reports/obsidian/Types/Integer Type.md @@ -5,5 +5,5 @@ An integer ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Primitives.py](../../../../src/Types/Primitives.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Primitives.py#L25](../../../../src/Types/Primitives.py#L25) diff --git a/reports/obsidian/Types/Location Type.md b/reports/obsidian/Types/Location Type.md index dcc60d2..9667a27 100644 --- a/reports/obsidian/Types/Location Type.md +++ b/reports/obsidian/Types/Location Type.md @@ -5,5 +5,5 @@ A type with x and y as integers representing the 0-indexed grid location ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py](../../../../src/Types/Data.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py#L23](../../../../src/Types/Data.py#L23) diff --git a/reports/obsidian/Types/Locations Array Type.md b/reports/obsidian/Types/Locations Array Type.md index 38bdf4f..8cbaaa9 100644 --- a/reports/obsidian/Types/Locations Array Type.md +++ b/reports/obsidian/Types/Locations Array Type.md @@ -5,5 +5,5 @@ An array of [[Location Type]] ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py](../../../../src/Types/Data.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py#L33](../../../../src/Types/Data.py#L33) diff --git a/reports/obsidian/Types/Probability Type.md b/reports/obsidian/Types/Probability Type.md index 2de8c89..e3d3229 100644 --- a/reports/obsidian/Types/Probability Type.md +++ b/reports/obsidian/Types/Probability Type.md @@ -5,5 +5,5 @@ A probability which takes a value between 0 and 1 inclusive. ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Primitives.py](../../../../src/Types/Primitives.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Primitives.py#L55](../../../../src/Types/Primitives.py#L55) diff --git a/reports/obsidian/Types/Simulation Log Type.md b/reports/obsidian/Types/Simulation Log Type.md index 2aea288..123e4f4 100644 --- a/reports/obsidian/Types/Simulation Log Type.md +++ b/reports/obsidian/Types/Simulation Log Type.md @@ -9,5 +9,5 @@ type SimulationLogType = object[] A log of simulation data ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py](../../../../src/Types/Data.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Data.py#L39](../../../../src/Types/Data.py#L39) diff --git a/reports/obsidian/Types/Timestep Type.md b/reports/obsidian/Types/Timestep Type.md index a9b08df..e978fb2 100644 --- a/reports/obsidian/Types/Timestep Type.md +++ b/reports/obsidian/Types/Timestep Type.md @@ -5,5 +5,5 @@ A timestep. ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Primitives.py](../../../../src/Types/Primitives.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Types/Primitives.py#L61](../../../../src/Types/Primitives.py#L61) diff --git a/reports/obsidian/Wiring/Age & Food Mechanisms.md b/reports/obsidian/Wiring/Age & Food Mechanisms.md index a637fc6..03c0ec4 100644 --- a/reports/obsidian/Wiring/Age & Food Mechanisms.md +++ b/reports/obsidian/Wiring/Age & Food Mechanisms.md @@ -106,5 +106,5 @@ Mechanisms for updating food and age ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py](../../../../src/Wiring/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py#L19](../../../../src/Wiring/Agent.py#L19) diff --git a/reports/obsidian/Wiring/Agent Movement Wiring.md b/reports/obsidian/Wiring/Agent Movement Wiring.md index 5a60329..3e8d228 100644 --- a/reports/obsidian/Wiring/Agent Movement Wiring.md +++ b/reports/obsidian/Wiring/Agent Movement Wiring.md @@ -107,5 +107,5 @@ Wiring for agents moving ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py](../../../../src/Wiring/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py#L75](../../../../src/Wiring/Agent.py#L75) diff --git a/reports/obsidian/Wiring/Agent Reproduction Mechanisms.md b/reports/obsidian/Wiring/Agent Reproduction Mechanisms.md index a293b71..837a014 100644 --- a/reports/obsidian/Wiring/Agent Reproduction Mechanisms.md +++ b/reports/obsidian/Wiring/Agent Reproduction Mechanisms.md @@ -121,5 +121,5 @@ Wiring for reproduction ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py](../../../../src/Wiring/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py#L120](../../../../src/Wiring/Agent.py#L120) diff --git a/reports/obsidian/Wiring/Agent Reproduction Wiring.md b/reports/obsidian/Wiring/Agent Reproduction Wiring.md index 1a091aa..e69f3f1 100644 --- a/reports/obsidian/Wiring/Agent Reproduction Wiring.md +++ b/reports/obsidian/Wiring/Agent Reproduction Wiring.md @@ -139,5 +139,5 @@ Wiring for agents hunting prey ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py](../../../../src/Wiring/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py#L116](../../../../src/Wiring/Agent.py#L116) diff --git a/reports/obsidian/Wiring/Food Eating Mechanisms.md b/reports/obsidian/Wiring/Food Eating Mechanisms.md index 3247d00..cb4e781 100644 --- a/reports/obsidian/Wiring/Food Eating Mechanisms.md +++ b/reports/obsidian/Wiring/Food Eating Mechanisms.md @@ -110,5 +110,5 @@ Mechanisms for when food is eaten by prey ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py](../../../../src/Wiring/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py#L47](../../../../src/Wiring/Agent.py#L47) diff --git a/reports/obsidian/Wiring/Food Growth Wiring.md b/reports/obsidian/Wiring/Food Growth Wiring.md index 65f7069..b6fe51a 100644 --- a/reports/obsidian/Wiring/Food Growth Wiring.md +++ b/reports/obsidian/Wiring/Food Growth Wiring.md @@ -96,5 +96,5 @@ Wiring for growth of food ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Site.py](../../../../src/Wiring/Site.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Site.py#L5](../../../../src/Wiring/Site.py#L5) diff --git a/reports/obsidian/Wiring/Hunt Prey Wiring.md b/reports/obsidian/Wiring/Hunt Prey Wiring.md index 07fd415..d993104 100644 --- a/reports/obsidian/Wiring/Hunt Prey Wiring.md +++ b/reports/obsidian/Wiring/Hunt Prey Wiring.md @@ -124,5 +124,5 @@ Wiring for agents hunting prey ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py](../../../../src/Wiring/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py#L89](../../../../src/Wiring/Agent.py#L89) diff --git a/reports/obsidian/Wiring/Increase Agent Age Wiring.md b/reports/obsidian/Wiring/Increase Agent Age Wiring.md index 80b75c7..cbe7e15 100644 --- a/reports/obsidian/Wiring/Increase Agent Age Wiring.md +++ b/reports/obsidian/Wiring/Increase Agent Age Wiring.md @@ -117,5 +117,5 @@ Wiring for updating of the agent age and decreasing their food from aging ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py](../../../../src/Wiring/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py#L33](../../../../src/Wiring/Agent.py#L33) diff --git a/reports/obsidian/Wiring/Natural Death Wiring.md b/reports/obsidian/Wiring/Natural Death Wiring.md index 642ce96..b3e0365 100644 --- a/reports/obsidian/Wiring/Natural Death Wiring.md +++ b/reports/obsidian/Wiring/Natural Death Wiring.md @@ -94,5 +94,5 @@ Wiring for growth of food ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py](../../../../src/Wiring/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py#L5](../../../../src/Wiring/Agent.py#L5) diff --git a/reports/obsidian/Wiring/Prey Eaten Mechanisms.md b/reports/obsidian/Wiring/Prey Eaten Mechanisms.md index 584e5eb..7d4df77 100644 --- a/reports/obsidian/Wiring/Prey Eaten Mechanisms.md +++ b/reports/obsidian/Wiring/Prey Eaten Mechanisms.md @@ -110,5 +110,5 @@ Wiring for predators eating prey ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py](../../../../src/Wiring/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py#L93](../../../../src/Wiring/Agent.py#L93) diff --git a/reports/obsidian/Wiring/Prey Feeding Wiring.md b/reports/obsidian/Wiring/Prey Feeding Wiring.md index 3df1203..38d7afd 100644 --- a/reports/obsidian/Wiring/Prey Feeding Wiring.md +++ b/reports/obsidian/Wiring/Prey Feeding Wiring.md @@ -124,5 +124,5 @@ Wiring for when prey eats food ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py](../../../../src/Wiring/Agent.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Agent.py#L60](../../../../src/Wiring/Agent.py#L60) diff --git a/reports/obsidian/Wiring/Simulation Meta Mechanisms.md b/reports/obsidian/Wiring/Simulation Meta Mechanisms.md index be4e6d6..8bd55dc 100644 --- a/reports/obsidian/Wiring/Simulation Meta Mechanisms.md +++ b/reports/obsidian/Wiring/Simulation Meta Mechanisms.md @@ -106,5 +106,5 @@ Wiring for mechanisms that update the simulation log and simulation metadata ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Meta.py](../../../../src/Wiring/Meta.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Meta.py#L8](../../../../src/Wiring/Meta.py#L8) diff --git a/reports/obsidian/Wiring/Simulation Meta Wiring.md b/reports/obsidian/Wiring/Simulation Meta Wiring.md index f90cf7f..6085e23 100644 --- a/reports/obsidian/Wiring/Simulation Meta Wiring.md +++ b/reports/obsidian/Wiring/Simulation Meta Wiring.md @@ -108,5 +108,5 @@ Wiring for meta simulation steps ## Spec Source Code Location -Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Meta.py](../../../../src/Wiring/Meta.py) +Spec Path (only works if vault is opened at level including the src folder): [../../../../src/Wiring/Meta.py#L5](../../../../src/Wiring/Meta.py#L5) From e7b23449231bc9b45ce23d3de8221914775f4725 Mon Sep 17 00:00:00 2001 From: SeanMcOwen Date: Fri, 20 Dec 2024 14:11:15 -0500 Subject: [PATCH 4/6] Debug food growth --- Type.md | 0 tests/Agent Reproduction Test.ipynb | 12 +-- tests/Food Growth Test.ipynb | 153 +++++++--------------------- 3 files changed, 37 insertions(+), 128 deletions(-) delete mode 100644 Type.md diff --git a/Type.md b/Type.md deleted file mode 100644 index e69de29..0000000 diff --git a/tests/Agent Reproduction Test.ipynb b/tests/Agent Reproduction Test.ipynb index 9411cae..a650418 100644 --- a/tests/Agent Reproduction Test.ipynb +++ b/tests/Agent Reproduction Test.ipynb @@ -4,17 +4,7 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "No python implementation for Increment Time Mechanism. To fix this, go to Implementations/Python/Mechanisms and add Increment Time Mechanism\n", - "No python implementation for Log Simulation Data Mechanism. To fix this, go to Implementations/Python/Mechanisms and add Log Simulation Data Mechanism\n", - "The following wirings were not loading: ['Simulation Meta Mechanisms', 'Simulation Meta Wiring']\n" - ] - } - ], + "outputs": [], "source": [ "import sys\n", "import os\n", diff --git a/tests/Food Growth Test.ipynb b/tests/Food Growth Test.ipynb index 0048c13..f800428 100644 --- a/tests/Food Growth Test.ipynb +++ b/tests/Food Growth Test.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -30,92 +30,9 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 10, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'Terminating Space': Terminating Space,\n", - " 'Empty Space': Empty Space,\n", - " 'Locations Space': Locations Space,\n", - " 'Location Food Delta Space': Location Food Delta Space,\n", - " 'Agents Space': Agents Space,\n", - " 'Agent Age Delta Space': Agent Age Delta Space,\n", - " 'Agent Food Delta Space': Agent Food Delta Space,\n", - " 'Agent Location Space': Agent Location Space,\n", - " 'Timestep Space': Timestep Space,\n", - " 'Simulation Log Space': Simulation Log Space}" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ms.spaces" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[Agent Age Delta Space, Agent Food Delta Space, Locations Space, Agent Location Space, Timestep Space, Simulation Log Space, Terminating Space, Empty Space, Location Food Delta Space, Agents Space]\n" - ] - } - ], - "source": [ - "all_spaces = []\n", - "for x in ms.components.values():\n", - " all_spaces.extend(x.domain)\n", - " all_spaces.extend(x.codomain)\n", - "all_spaces = list(set(all_spaces))\n", - "print(all_spaces)" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Agent Age Delta Space" - ] - }, - "execution_count": 13, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "all_spaces[0]" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "ename": "AssertionError", - "evalue": "", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mAssertionError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn[2], line 10\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[38;5;66;03m# Set the state and parameters\u001b[39;00m\n\u001b[1;32m 6\u001b[0m state, params \u001b[38;5;241m=\u001b[39m msi\u001b[38;5;241m.\u001b[39mprepare_state_and_params(state_base, params_test_food_growth,\n\u001b[1;32m 7\u001b[0m state_preperation_functions\u001b[38;5;241m=\u001b[39m[create_sites],\n\u001b[1;32m 8\u001b[0m parameter_preperation_functions\u001b[38;5;241m=\u001b[39m[])\n\u001b[0;32m---> 10\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m state[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mSites\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m==\u001b[39m [{\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mLocation\u001b[39m\u001b[38;5;124m'\u001b[39m: (\u001b[38;5;241m0\u001b[39m, \u001b[38;5;241m0\u001b[39m), \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mFood\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;241m0\u001b[39m},\n\u001b[1;32m 11\u001b[0m {\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mLocation\u001b[39m\u001b[38;5;124m'\u001b[39m: (\u001b[38;5;241m0\u001b[39m, \u001b[38;5;241m1\u001b[39m), \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mFood\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;241m0\u001b[39m},\n\u001b[1;32m 12\u001b[0m {\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mLocation\u001b[39m\u001b[38;5;124m'\u001b[39m: (\u001b[38;5;241m1\u001b[39m, \u001b[38;5;241m0\u001b[39m), \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mFood\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;241m0\u001b[39m},\n\u001b[1;32m 13\u001b[0m {\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mLocation\u001b[39m\u001b[38;5;124m'\u001b[39m: (\u001b[38;5;241m1\u001b[39m, \u001b[38;5;241m1\u001b[39m), \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mFood\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;241m0\u001b[39m}]\n\u001b[1;32m 14\u001b[0m spaces \u001b[38;5;241m=\u001b[39m []\n\u001b[1;32m 15\u001b[0m spaces \u001b[38;5;241m=\u001b[39m msi\u001b[38;5;241m.\u001b[39mcomponents[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mFood Growth Control Action\u001b[39m\u001b[38;5;124m\"\u001b[39m](state, params, spaces)\n", - "\u001b[0;31mAssertionError\u001b[0m: " - ] - } - ], + "outputs": [], "source": [ "# Set the randomness to ensure the same outcome each time from random parts\n", "from random import seed\n", @@ -126,25 +43,27 @@ " state_preperation_functions=[create_sites],\n", " parameter_preperation_functions=[])\n", "\n", - "assert state[\"Sites\"] == [{'Location': (0, 0), 'Food': 0},\n", - " {'Location': (0, 1), 'Food': 0},\n", - " {'Location': (1, 0), 'Food': 0},\n", - " {'Location': (1, 1), 'Food': 0}]\n", + "assert state[\"Sites\"] == [{'Location': (0, 0), 'Food': 1, 'Agent': None},\n", + " {'Location': (0, 1), 'Food': 2, 'Agent': None},\n", + " {'Location': (1, 0), 'Food': 0, 'Agent': None},\n", + " {'Location': (1, 1), 'Food': 2, 'Agent': None}]\n", "spaces = []\n", "spaces = msi.components[\"Food Growth Control Action\"](state, params, spaces)\n", - "assert spaces == [{'Locations': [{'Location': (0, 0), 'Food': 0}, {'Location': (0, 1), 'Food': 0}, {'Location': (1, 0), 'Food': 0}, {'Location': (1, 1), 'Food': 0}]}]\n", + "assert spaces == [{'Locations': [{'Location': (0, 0), 'Food': 1, 'Agent': None},\n", + " {'Location': (1, 0), 'Food': 0, 'Agent': None}]}]\n", "spaces = msi.components[\"Food Growth Policy\"](state, params, spaces)\n", - "assert spaces == [{'Food Locations': [{'Location': (0, 0), 'Food': 1}, {'Location': (0, 1), 'Food': 1}, {'Location': (1, 0), 'Food': 1}, {'Location': (1, 1), 'Food': 1}]}]\n", + "assert spaces == [{'Food Locations': [{'Location': (0, 0), 'Food': 1},\n", + " {'Location': (1, 0), 'Food': 1}]}]\n", "spaces = msi.components[\"Update Food Locations Mechanism\"](state, params, spaces)\n", - "assert state[\"Sites\"] == [{'Location': (0, 0), 'Food': 1},\n", - " {'Location': (0, 1), 'Food': 1},\n", - " {'Location': (1, 0), 'Food': 1},\n", - " {'Location': (1, 1), 'Food': 1}]" + "assert state[\"Sites\"] == [{'Location': (0, 0), 'Food': 2, 'Agent': None},\n", + " {'Location': (0, 1), 'Food': 2, 'Agent': None},\n", + " {'Location': (1, 0), 'Food': 1, 'Agent': None},\n", + " {'Location': (1, 1), 'Food': 2, 'Agent': None}]" ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -157,35 +76,35 @@ " state_preperation_functions=[create_sites],\n", " parameter_preperation_functions=[])\n", "\n", - "assert state[\"Sites\"] == [{'Location': (0, 0), 'Food': 0},\n", - " {'Location': (0, 1), 'Food': 0},\n", - " {'Location': (1, 0), 'Food': 0},\n", - " {'Location': (1, 1), 'Food': 0}]\n", + "assert state[\"Sites\"] == [{'Location': (0, 0), 'Food': 1, 'Agent': None},\n", + " {'Location': (0, 1), 'Food': 2, 'Agent': None},\n", + " {'Location': (1, 0), 'Food': 0, 'Agent': None},\n", + " {'Location': (1, 1), 'Food': 2, 'Agent': None}]\n", "\n", "msi.wiring[\"Food Growth Wiring\"](state, params, [])\n", - "assert state[\"Sites\"] == [{'Location': (0, 0), 'Food': 1},\n", - " {'Location': (0, 1), 'Food': 1},\n", - " {'Location': (1, 0), 'Food': 1},\n", - " {'Location': (1, 1), 'Food': 1}]\n", + "assert state[\"Sites\"] == [{'Location': (0, 0), 'Food': 2, 'Agent': None},\n", + " {'Location': (0, 1), 'Food': 2, 'Agent': None},\n", + " {'Location': (1, 0), 'Food': 1, 'Agent': None},\n", + " {'Location': (1, 1), 'Food': 2, 'Agent': None}]\n", "\n", "msi.wiring[\"Food Growth Wiring\"](state, params, [])\n", - "assert state[\"Sites\"] == [{'Location': (0, 0), 'Food': 2},\n", - " {'Location': (0, 1), 'Food': 2},\n", - " {'Location': (1, 0), 'Food': 2},\n", - " {'Location': (1, 1), 'Food': 2}]\n", + "assert state[\"Sites\"] == [{'Location': (0, 0), 'Food': 2, 'Agent': None},\n", + " {'Location': (0, 1), 'Food': 2, 'Agent': None},\n", + " {'Location': (1, 0), 'Food': 2, 'Agent': None},\n", + " {'Location': (1, 1), 'Food': 2, 'Agent': None}]\n", "\n", "# Maximum should be hit now\n", "msi.wiring[\"Food Growth Wiring\"](state, params, [])\n", - "assert state[\"Sites\"] == [{'Location': (0, 0), 'Food': 2},\n", - " {'Location': (0, 1), 'Food': 2},\n", - " {'Location': (1, 0), 'Food': 2},\n", - " {'Location': (1, 1), 'Food': 2}]\n", + "assert state[\"Sites\"] == [{'Location': (0, 0), 'Food': 2, 'Agent': None},\n", + " {'Location': (0, 1), 'Food': 2, 'Agent': None},\n", + " {'Location': (1, 0), 'Food': 2, 'Agent': None},\n", + " {'Location': (1, 1), 'Food': 2, 'Agent': None}]\n", "\n", "msi.wiring[\"Food Growth Wiring\"](state, params, [])\n", - "assert state[\"Sites\"] == [{'Location': (0, 0), 'Food': 2},\n", - " {'Location': (0, 1), 'Food': 2},\n", - " {'Location': (1, 0), 'Food': 2},\n", - " {'Location': (1, 1), 'Food': 2}]" + "assert state[\"Sites\"] == [{'Location': (0, 0), 'Food': 2, 'Agent': None},\n", + " {'Location': (0, 1), 'Food': 2, 'Agent': None},\n", + " {'Location': (1, 0), 'Food': 2, 'Agent': None},\n", + " {'Location': (1, 1), 'Food': 2, 'Agent': None}]" ] } ], From e77a41015c6f6a0988502fb3d41ad4d3a1110e99 Mon Sep 17 00:00:00 2001 From: SeanMcOwen Date: Fri, 20 Dec 2024 14:16:42 -0500 Subject: [PATCH 5/6] Add poisson implementation --- .obsidian/workspace.json | 12 ++++++------ simulation/config/params.py | 2 ++ src/Implementations/Python/Policies/Site.py | 16 ++++++++++++++++ src/Implementations/Python/Policies/__init__.py | 3 ++- 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index faa26a1..118de4f 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -13,12 +13,12 @@ "state": { "type": "markdown", "state": { - "file": "reports/obsidian/Control Actions/Increase Age Control Action.md", + "file": "reports/obsidian/Policies/Food Growth Policy.md", "mode": "source", "source": false }, "icon": "lucide-file", - "title": "Increase Age Control Action" + "title": "Food Growth Policy" } } ] @@ -93,7 +93,7 @@ "state": { "type": "backlink", "state": { - "file": "reports/obsidian/Control Actions/Increase Age Control Action.md", + "file": "reports/obsidian/Policies/Food Growth Policy.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -103,7 +103,7 @@ "unlinkedCollapsed": true }, "icon": "links-coming-in", - "title": "Backlinks for Increase Age Control Action" + "title": "Backlinks for Food Growth Policy" } }, { @@ -164,6 +164,7 @@ "active": "4507d71ae7a37972", "lastOpenFiles": [ "reports/obsidian/Control Actions/Food Growth Control Action.md", + "reports/obsidian/Control Actions/Increase Age Control Action.md", "reports/obsidian/Parameters/Initial Number of Predators.md", "reports/obsidian/Mechanisms/Update Agent Locations Mechanism.md", "reports/obsidian/Displays/Wiring/All Top Level Wirings.md", @@ -197,7 +198,6 @@ "reports/obsidian/Spaces/Location Food Delta Space.md", "reports/obsidian/Wiring/Agent Reproduction Mechanisms.md", "reports/obsidian/Boundary Actions/Agent Movement Boundary Action.md", - "reports/obsidian/Wiring/Agent Movement Wiring.md", - "reports/obsidian/Wiring/Age & Food Mechanisms.md" + "reports/obsidian/Wiring/Agent Movement Wiring.md" ] } \ No newline at end of file diff --git a/simulation/config/params.py b/simulation/config/params.py index 4504e11..5a5c09b 100644 --- a/simulation/config/params.py +++ b/simulation/config/params.py @@ -23,6 +23,8 @@ params_test_food_growth["Maximum Food per Tile"] = 2 params_test_food_growth["Food Growth Rate"] = 1 +params_test_food_growth2 = deepcopy(params_test_food_growth) +params_test_food_growth2["FP Food Growth Policy"] = "Poisson Food Growth Policy" params_test2 = deepcopy(params_base) params_test2["DUMMY D Probability"] = 0 diff --git a/src/Implementations/Python/Policies/Site.py b/src/Implementations/Python/Policies/Site.py index 3c58d29..5203694 100644 --- a/src/Implementations/Python/Policies/Site.py +++ b/src/Implementations/Python/Policies/Site.py @@ -1,3 +1,6 @@ +import numpy as np + + def constant_food_growth_policy(state, params, spaces): space = {"Food Locations": []} for loc in spaces[0]["Locations"]: @@ -8,3 +11,16 @@ def constant_food_growth_policy(state, params, spaces): {"Location": loc["Location"], "Food": delta_food} ) return [space] + + +def poisson_food_growth_policy(state, params, spaces): + space = {"Food Locations": []} + for loc in spaces[0]["Locations"]: + delta_food = min( + params["Maximum Food per Tile"] - loc["Food"], + np.random.poisson(["Food Growth Rate"]), + ) + space["Food Locations"].append( + {"Location": loc["Location"], "Food": delta_food} + ) + return [space] diff --git a/src/Implementations/Python/Policies/__init__.py b/src/Implementations/Python/Policies/__init__.py index 94e1f79..393ac97 100644 --- a/src/Implementations/Python/Policies/__init__.py +++ b/src/Implementations/Python/Policies/__init__.py @@ -1,4 +1,4 @@ -from .Site import constant_food_growth_policy +from .Site import constant_food_growth_policy, poisson_food_growth_policy from .Agent import ( natural_death_policy, increase_agent_age_policy_plus1, @@ -18,4 +18,5 @@ "Hunt Prey V1": hunt_prey_policy_v1, "Agent Reproduction Policy V1": agent_reproduction_policy_v1, "Simulation Meta Policy V1": simulation_meta_policy_v1, + "Poisson Food Growth Policy": poisson_food_growth_policy, } From 16dca7ea70fd5f356815f6b352651a94191d59d2 Mon Sep 17 00:00:00 2001 From: SeanMcOwen Date: Fri, 20 Dec 2024 14:26:59 -0500 Subject: [PATCH 6/6] Finish poisson dist food growth --- simulation/__init__.py | 1 + simulation/config/__init__.py | 1 + src/Implementations/Python/Policies/Site.py | 2 +- tests/Food Growth Test.ipynb | 44 +++++++++++++++++++-- tests/Hunt Prey Test.ipynb | 2 +- tests/Natural Death Test.ipynb | 15 ++++++- tests/Stateful Metrics.ipynb | 19 +-------- 7 files changed, 60 insertions(+), 24 deletions(-) diff --git a/simulation/__init__.py b/simulation/__init__.py index fad6a32..ca1eb54 100644 --- a/simulation/__init__.py +++ b/simulation/__init__.py @@ -16,6 +16,7 @@ state_agent_reproduction_test, params_mech_test, state_mech_test, + params_test_food_growth2, ) from .preprocessing import ( compute_starting_total_length, diff --git a/simulation/config/__init__.py b/simulation/config/__init__.py index 1844672..aa0762f 100644 --- a/simulation/config/__init__.py +++ b/simulation/config/__init__.py @@ -17,5 +17,6 @@ params_agent_movement_test, params_agent_reproduction_test, params_mech_test, + params_test_food_growth2, ) from .experiment import experiments_map diff --git a/src/Implementations/Python/Policies/Site.py b/src/Implementations/Python/Policies/Site.py index 5203694..1004b79 100644 --- a/src/Implementations/Python/Policies/Site.py +++ b/src/Implementations/Python/Policies/Site.py @@ -18,7 +18,7 @@ def poisson_food_growth_policy(state, params, spaces): for loc in spaces[0]["Locations"]: delta_food = min( params["Maximum Food per Tile"] - loc["Food"], - np.random.poisson(["Food Growth Rate"]), + np.random.poisson(params["Food Growth Rate"]), ) space["Food Locations"].append( {"Location": loc["Location"], "Food": delta_food} diff --git a/tests/Food Growth Test.ipynb b/tests/Food Growth Test.ipynb index f800428..45446d5 100644 --- a/tests/Food Growth Test.ipynb +++ b/tests/Food Growth Test.ipynb @@ -12,7 +12,7 @@ "sys.path.append(os.path.abspath('..'))\n", "\n", "\n", - "from simulation import params_test_food_growth, state_base, create_sites\n", + "from simulation import params_test_food_growth, state_base, create_sites, params_test_food_growth2\n", "\n", "from math_spec_mapping import load_from_json\n", "\n", @@ -30,7 +30,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -63,7 +63,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -106,6 +106,44 @@ " {'Location': (1, 0), 'Food': 2, 'Agent': None},\n", " {'Location': (1, 1), 'Food': 2, 'Agent': None}]" ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "# Use the other functional parameterization\n", + "msi = ms.build_implementation(params_test_food_growth2)\n", + "\n", + "# Set the randomness to ensure the same outcome each time from random parts\n", + "from random import seed\n", + "import numpy as np\n", + "np.random.seed(5)\n", + "seed(1)\n", + "\n", + "# Set the state and parameters\n", + "state, params = msi.prepare_state_and_params(state_base, params_test_food_growth2,\n", + " state_preperation_functions=[create_sites],\n", + " parameter_preperation_functions=[])\n", + "\n", + "assert state[\"Sites\"] == [{'Location': (0, 0), 'Food': 1, 'Agent': None},\n", + " {'Location': (0, 1), 'Food': 2, 'Agent': None},\n", + " {'Location': (1, 0), 'Food': 0, 'Agent': None},\n", + " {'Location': (1, 1), 'Food': 2, 'Agent': None}]\n", + "spaces = []\n", + "spaces = msi.components[\"Food Growth Control Action\"](state, params, spaces)\n", + "assert spaces == [{'Locations': [{'Location': (0, 0), 'Food': 1, 'Agent': None},\n", + " {'Location': (1, 0), 'Food': 0, 'Agent': None}]}]\n", + "spaces = msi.components[\"Food Growth Policy\"](state, params, spaces)\n", + "assert spaces == [{'Food Locations': [{'Location': (0, 0), 'Food': 0},\n", + " {'Location': (1, 0), 'Food': 1}]}]\n", + "spaces = msi.components[\"Update Food Locations Mechanism\"](state, params, spaces)\n", + "assert state[\"Sites\"] == [{'Location': (0, 0), 'Food': 1, 'Agent': None},\n", + " {'Location': (0, 1), 'Food': 2, 'Agent': None},\n", + " {'Location': (1, 0), 'Food': 1, 'Agent': None},\n", + " {'Location': (1, 1), 'Food': 2, 'Agent': None}]" + ] } ], "metadata": { diff --git a/tests/Hunt Prey Test.ipynb b/tests/Hunt Prey Test.ipynb index 9f67623..86c99a3 100644 --- a/tests/Hunt Prey Test.ipynb +++ b/tests/Hunt Prey Test.ipynb @@ -124,7 +124,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ diff --git a/tests/Natural Death Test.ipynb b/tests/Natural Death Test.ipynb index 841c020..958c00f 100644 --- a/tests/Natural Death Test.ipynb +++ b/tests/Natural Death Test.ipynb @@ -32,7 +32,20 @@ "cell_type": "code", "execution_count": 2, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "KeyError", + "evalue": "'Location'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[2], line 21\u001b[0m\n\u001b[1;32m 19\u001b[0m spaces \u001b[38;5;241m=\u001b[39m msi\u001b[38;5;241m.\u001b[39mblocks[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mNatural Death Policy\u001b[39m\u001b[38;5;124m\"\u001b[39m](state, params, spaces)\n\u001b[1;32m 20\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m spaces \u001b[38;5;241m==\u001b[39m [{\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mAgents\u001b[39m\u001b[38;5;124m'\u001b[39m: [{\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mAge\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;241m5\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mAgent Type\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mPredator\u001b[39m\u001b[38;5;124m'\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mFood\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;241m0\u001b[39m}, {\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mAge\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;241m10\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mAgent Type\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mPredator\u001b[39m\u001b[38;5;124m'\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mFood\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;241m10\u001b[39m}, {\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mAge\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;241m15\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mAgent Type\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mPredator\u001b[39m\u001b[38;5;124m'\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mFood\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;241m10\u001b[39m}]}]\n\u001b[0;32m---> 21\u001b[0m \u001b[43mmsi\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mblocks\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mRemove Agents Mechanism\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m(\u001b[49m\u001b[43mstate\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mparams\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mspaces\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 22\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m state[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mAgents\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m==\u001b[39m [{\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mAge\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;241m5\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mAgent Type\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mPredator\u001b[39m\u001b[38;5;124m'\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mFood\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;241m10\u001b[39m}]\n", + "File \u001b[0;32m~/Dropbox/BlockScience/Predator-Prey-MSML/src/Implementations/Python/Mechanisms/Agent.py:6\u001b[0m, in \u001b[0;36mremove_agents_mechanism\u001b[0;34m(state, params, spaces)\u001b[0m\n\u001b[1;32m 2\u001b[0m state[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mAgents\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m [\n\u001b[1;32m 3\u001b[0m agent \u001b[38;5;28;01mfor\u001b[39;00m agent \u001b[38;5;129;01min\u001b[39;00m state[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mAgents\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;28;01mif\u001b[39;00m agent \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m spaces[\u001b[38;5;241m0\u001b[39m][\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mAgents\u001b[39m\u001b[38;5;124m\"\u001b[39m]\n\u001b[1;32m 4\u001b[0m ]\n\u001b[1;32m 5\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m agent \u001b[38;5;129;01min\u001b[39;00m spaces[\u001b[38;5;241m0\u001b[39m][\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mAgents\u001b[39m\u001b[38;5;124m\"\u001b[39m]:\n\u001b[0;32m----> 6\u001b[0m state[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mSites Matrix\u001b[39m\u001b[38;5;124m\"\u001b[39m][\u001b[43magent\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mLocation\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m[\u001b[38;5;241m0\u001b[39m]][agent[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mLocation\u001b[39m\u001b[38;5;124m\"\u001b[39m][\u001b[38;5;241m1\u001b[39m]][\n\u001b[1;32m 7\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mAgent\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 8\u001b[0m ] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n", + "\u001b[0;31mKeyError\u001b[0m: 'Location'" + ] + } + ], "source": [ "# Set the randomness to ensure the same outcome each time from random parts\n", "from random import seed\n", diff --git a/tests/Stateful Metrics.ipynb b/tests/Stateful Metrics.ipynb index 20a4e3e..96f6703 100644 --- a/tests/Stateful Metrics.ipynb +++ b/tests/Stateful Metrics.ipynb @@ -4,17 +4,7 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "No python implementation for Increment Time Mechanism. To fix this, go to Implementations/Python/Mechanisms and add Increment Time Mechanism\n", - "No python implementation for Log Simulation Data Mechanism. To fix this, go to Implementations/Python/Mechanisms and add Log Simulation Data Mechanism\n", - "The following wirings were not loading: ['Simulation Meta Mechanisms', 'Simulation Meta Wiring']\n" - ] - } - ], + "outputs": [], "source": [ "import sys\n", "import os\n", @@ -95,13 +85,6 @@ "assert state[\"Stateful Metrics\"][\"Median Predator Age Stateful Metric\"](state, params) == 0\n", "assert state[\"Stateful Metrics\"][\"Median Prey Age Stateful Metric\"](state, params) == 0" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": {