Commit Graph

20 Commits

Author SHA1 Message Date
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