Hey I am developing a model that should feature a relatively simple memory that updates with this procedure and puts a 1 every time the agent perceives there is something wrong with the environment through the following:
ifelse fishpop < concern-t-env [
set memory-env lput 1 memory-env
if length memory-env >= 6 [set memory-env but-first memory-env]
]
The memory is of length 6 and sometimes looks like this:
memory [1 1 0 1 0 1]
Now i want to ask the agent that owns the memory to check if there are more than 3 ones. Which could be a way to ask this? I am not sure how I could ask the agent to check if the number of 1s is bigger than a threshold?
I tried using n-of
but was not sure how to follow up. It is probably relatively easy to do but i dont seem to find the solution