rand. action and coroutines.

Changes action functions to coroutines to let the system wait for an
action to finish. Make update in agentController a coroutine to maximize
effect.
make predict do random action.