def trueValues(T, R, discountFactor):
    assert discountFactor < 1
    distr = T.copy()
    res = dot(T, R)
    for i in range(1, int(10 / (1. - discountFactor))):
        distr = dot(distr, T)
        res += (discountFactor ** i) * dot(distr, R)
    return res
Compute the true discounted value function for each state,
dataset/ETHPy150Open pybrain/pybrain/pybrain/rl/learners/modelbased/policyiteration.py/trueValues