Cleans up learning structures from the agent A = AGENT_CLEANUP(A) Notifies the agent that its learning process has completed, and it shouldn't worry any longer about any memory-consuming data structures used during learning. Parameters: A - the agent Returns: A - the cleaned up agent This function removes all the fields of the agent which are mentioned by its learning initialization function as being volatile (i.e. stored under the field 'volatile' as a cell array of field names). If fields volatility is not supported by the given agent type, nothing happens. Global variables removal is supported. Use the prefix "global:" in defining the volatile field, for instance: a.volatile = {'global:GLOBAL_DATA', 'localfield1', 'localfield2'}; See also agent_initlearn, agent_learn