Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean #98

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 25 additions & 24 deletions .obsidian/workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
"state": {
"type": "markdown",
"state": {
"file": "reports/obsidian/Spaces/Timestep Space.md",
"file": "reports/obsidian/Policies/Food Growth Policy.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "Timestep Space"
"title": "Food Growth Policy"
}
}
]
Expand Down Expand Up @@ -93,7 +93,7 @@
"state": {
"type": "backlink",
"state": {
"file": "reports/obsidian/Spaces/Timestep Space.md",
"file": "reports/obsidian/Policies/Food Growth Policy.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
Expand All @@ -103,7 +103,7 @@
"unlinkedCollapsed": true
},
"icon": "links-coming-in",
"title": "Backlinks for Timestep Space"
"title": "Backlinks for Food Growth Policy"
}
},
{
Expand Down Expand Up @@ -163,27 +163,32 @@
},
"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",
"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",
"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",
"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",
Expand All @@ -193,10 +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/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/Agent Movement Wiring.md"
]
}
Empty file removed Type.md
Empty file.
10 changes: 1 addition & 9 deletions notebooks/Build Obsidian.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Original file line number Diff line number Diff line change
Expand Up @@ -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)

Original file line number Diff line number Diff line change
Expand Up @@ -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)

Original file line number Diff line number Diff line change
Expand Up @@ -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)

Original file line number Diff line number Diff line change
Expand Up @@ -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)

Original file line number Diff line number Diff line change
Expand Up @@ -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)

Original file line number Diff line number Diff line change
Expand Up @@ -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)

4 changes: 4 additions & 0 deletions reports/obsidian/Displays/Wiring/All Top Level Wirings.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

4 changes: 4 additions & 0 deletions reports/obsidian/Displays/Wiring/Boundary Wirings.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

2 changes: 1 addition & 1 deletion reports/obsidian/Entities/Agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

2 changes: 1 addition & 1 deletion reports/obsidian/Entities/Global.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

2 changes: 1 addition & 1 deletion reports/obsidian/Entities/Site.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

4 changes: 2 additions & 2 deletions reports/obsidian/Mechanisms/Create Agents Mechanism.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

4 changes: 2 additions & 2 deletions reports/obsidian/Mechanisms/Increase Agent Age Mechanism.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

8 changes: 7 additions & 1 deletion reports/obsidian/Mechanisms/Increment Time Mechanism.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ 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#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)

8 changes: 7 additions & 1 deletion reports/obsidian/Mechanisms/Log Simulation Data Mechanism.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ 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#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)

4 changes: 2 additions & 2 deletions reports/obsidian/Mechanisms/Remove Agents Mechanism.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Original file line number Diff line number Diff line change
Expand Up @@ -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)

Original file line number Diff line number Diff line change
Expand Up @@ -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)

4 changes: 2 additions & 2 deletions reports/obsidian/Mechanisms/Update Food Mechanism.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Loading