def randomPolicy(Ts):
    numA = len(Ts)
    dim = len(Ts[0])
    return ones((dim, numA)) / float(numA), mean(array(Ts), axis=0)
Each action is equally likely.
dataset/ETHPy150Open pybrain/pybrain/pybrain/rl/learners/modelbased/policyiteration.py/randomPolicy