refactored grid2d agent action / perception system