Template. Chooses an action for the agent [A, ACTION] = ACT(A, STATE, ACTIONS, REWARDS, PARAMS) Implements action selection for an agent. This function is called at each learning iteration, as long as the agent has not finished its task. The learning behaviour will be initialized prior to this function being called. This function is a template and performs no operations. This functions' input and output argument(s) must conform to the specifications below. Parameters: A - the agent STATE - the agent's view over the world state. A column vector ACTIONS - the agent's view over the last executed joint action. A column vector. If no action has yet been executed, the vector is filled with NaNs. REWARDS - the agent's view over the last received joint reward. A column vector. If no feedback has yet been received, the vector is filled with NaNs. PARAMS - a structure containing extra information on the basis of which the agent may reason on how to act. In episodic environments, must contain a boolean field "newtrial" signaling whether a new trial has just begun, and a field "finished" signaling whether the agent has finished its task in the current trial. The action function must support a special mode, activable via a field named "mode" of the [params] argument. This mode is "init", initialization of the action selection algorithm. In this mode, no action selection is required and the state, actions, and rewards arguments should be disregarded. Returns: A - the possibly updated agent ACTION - the chosen action. May also return 0 as a special case, when the agent has reached its goal See also agent, agent_act