Policy and value iteration equations. Fixes #15, #16, #17