Implementing reading part of state transitions
Rough implementation of value iteration