Implements action selection on the basis of deterministic policy [A, ACTION] = PIGREEDYACT(A, STATE, ACTIONS, REWARDS, PARAMS) Supports discrete states and actions, with 1 action variable only. The policy must be stored under field 'h' of the agent, as a flat vector. Moreover, this size must be cached in field 'sizes.h' of the agent. See also agent_act