Implementation of random policy.