https://5dok.net/document/eqoe085y-theory-algorithms-markov-decision-problems-total-reward-decision.html