Agent works but runs in front of wall before starts to jump
planning more steps ahead could be the trick

-removed spaces after if, while and for