Commit Graph

34 Commits

Author SHA1 Message Date
db1d59843b
update plotting functions 2023-06-29 17:16:31 +02:00
kaghog
ee6ab086d8 plot for alive ants and tracking of dead ants 2023-06-28 17:25:12 +02:00
0465481ff6
modify bfs connectivity 2023-06-28 15:30:14 +02:00
c4ee305256
further plotting experiments 2023-06-28 14:58:17 +02:00
7b5627fafc
fix indents, add bfs to scheduler 2023-06-27 22:45:40 +02:00
ef7646f556
add viviane's bfs implementation 2023-06-27 22:24:40 +02:00
9fae37347b
hotfix 2023-06-26 16:03:45 +02:00
fb1c8f5797
Combine resistance and sensitivity/alpha 2023-06-26 15:54:22 +02:00
7c19031ca2
Merge branch 'viviane' 2023-06-26 11:10:31 +02:00
960b4b1ca0
alternative cummulative successful ants measurement 2023-06-26 10:55:23 +02:00
74d59ecc2e
fix indents from ipynb to py 2023-06-26 10:27:53 +02:00
15efd64c3e
vivianes changes 2023-06-26 10:23:19 +02:00
8f2771463d
General Debugging. Moved to nomenclature from paper for ease of
understanding
Resistance map implementation
2023-06-20 15:00:14 +02:00
83a973f377
Merge branch 'implementations_tests'
Implemented check for ants to follow positive pheromone gradient

step() function has been improved.
Previously, self.prev_pos (now: self._prev_pos) was set non-uniformly;
sometimes in step() but also always in advance() which resulted in
unwanted behavior.
As self._prev_pos is now marked as private all assignments are done
simultaneously with self._next_pos in step(), not advance().

Accordingly, future functions should strive not to access
self._prev_pos outside of the agent if possible.

Gradient following behaviour was additionally not observed since the
sensitivity_max variable was set too low, resulting in the adjusted
pheromone concentration gradients to not be present.
2023-05-18 16:02:13 +02:00
10279930e1
implemented test ant_follow_gradient, fixed step() function 2023-05-18 16:00:43 +02:00
85f9ecdaec
Merge branch 'implementations_tests'
We now have in main.py three functions to check theoretical decays vs
actual decays.
For this a custom testing environment is set up so no disruptions from
for example, finding a food source or an ant depositing pheromones on
the grid.

The functions are otherwise pretty self-explanatory:

    check_pheromone_exponential_decay()
    check_ant_sensitivity_linear_decay()
    check_ant_pheromone_exponential_decay()

Besides this, with this merge we also finally have an upper limit for
ants on the grid using the num_max_agents model variable to check before
new ants are generated.

any use of the word 'chemical' has been replaced by 'pheromone' for
consistency
2023-05-18 12:47:21 +02:00
30661542b5
add num_max_agents, cleanup 2023-05-18 12:46:48 +02:00
a8cb347e4a
add test ant pheromone decay, rename chemicals to pheromone 2023-05-17 19:32:08 +02:00
11821b6138
plots for linear sensitivity decay and grid pheromone decay 2023-05-17 18:10:02 +02:00
9cce168536
fix Grace's name 2023-05-17 15:57:23 +02:00
ecb9cc26e9
dynamic normalization for pheromones 2023-05-11 17:57:39 +02:00
e45d33bf8d
more step and sensitivity improvements following Schweitzer et al. 1997) 2023-05-11 16:45:55 +02:00
044aab26ca
Merge branch 'implement_agent_step'
The agent step() function has been further improved.
Now, ants behave as roamers and follow a positive gradient in
pheromones until they find food, when they find food they will switch
what chemical they are dropping (A -> B) and will look for A.
When they return they will recruit new ants.

Currently, the sensitivity to the pheromone concentration is clamped
linear, meaning that:
			{ 0 		if concentration < lower_threshold
sens(concentration) = 	{ concentration if lower_threshold < c < higher_threshold
			{ higher_threshold else

A correct non-linear response is yet to be added.
Similarily next steps could include adding a sensitivity decay to ants
as described in the paper.

A proper setup for sane initial values such that interesting behaviour
can be observed can also still be implemented (consult the paper)

The visualization function in server.py can also still be adjusted to
automatically (?) adjust the normalization for color values.
2023-05-07 15:28:52 +02:00
44c8516868
add food and nestfinding behaviour on step function 2023-05-07 15:24:27 +02:00
e7fedbfe25
Merge branch 'live_server_visualization'
Previously nothign was displayed if value > normalization.
Now just clips at max value.
2023-04-29 11:49:30 +02:00
cdafa5e5f9
fix no display on overflow 2023-04-29 11:49:06 +02:00
a22e832a0e
Merge branch 'live_server_visualization'
This merge implements server.py for a visualization of the model.

For this implementation the mesa-provided CanvasHexGrid class needed to
be adjusted. Mesa's own function runs a visualization function on all
agents. For us it would be smarter to run the visualization function on
all grid locations, this is what CanvasHexGridMultiAgents does.

For now, concentrations are normalized using magic numbers. In the
future it might be smarter to somehow dynamically adjust these
normalizisation numbers to not threshold our visualization.
2023-04-29 11:04:05 +02:00
7e5c40ad11
add server visualization to README 2023-04-29 11:02:55 +02:00
214135d063
added live-server visualization to project 2023-04-29 11:01:53 +02:00
a5e03b38ac
Merge branch 'implement_agent_step'
Initial implementation of step() accoriding to the rules of Schweitzer
et alii 1996.
A few neighbor fetching functions are now implemented in agent.py.

The MultiHexScalarFields implementation could be simplified as the ants
only drop their pheromones in advance() and not step(), thus they do not
interfere with each other.
We might need to look at the concentration decay for the scalar fields
again to correctly implement it. To me it is not clear whether we should
decrease the pheromone levels before the ants step() or after the ants
step() and before their advance()
2023-04-28 19:13:37 +02:00
65e9d12e5a
implement agent.step() and simplify scalar fields 2023-04-28 19:10:33 +02:00
1952198fad
add scalarfields on grid 2023-04-28 14:45:56 +02:00
808dc6f78c
add initial project files 2023-04-26 23:45:14 +02:00
Alexander Bocken
9a11387436
Initial commit 2023-04-26 21:07:21 +02:00