To change state, you pass a function to the agent and it evaluates a stream of these functions, replacing the state with the output of each function.
要更改状态,您可以向agent传递一个函数,然后agent评估功能流,用每个函数的输出替换状态。
2
As the GDM code says, "it's hard to be event controlled while maintaining state," so we add our own state-monitoring variables and data structures to process the keystroke-dynamics functions.
The state is primed with initial-stateand passed throughout the iteration, allowing the visitor functions to manipulate it in whatever way they desire.