make valueiteration function, prettyprint fix, board not as global variable