It sounds like you’d rather have the closure enclose the state, not the agent. Perhaps
condition(state) = agent -> has_state(agent, state)
random_agent(model, condition(1))
It sounds like you’d rather have the closure enclose the state, not the agent. Perhaps
condition(state) = agent -> has_state(agent, state)
random_agent(model, condition(1))