Use 0 ~ 4 to represent action "no action", "move forward 1 step", "turn right", "turn left", "turn back" in action sequence. Intial directions are set to 90 degree.
(x, y, d) is the position (x,y) in maps with facial direction d, where d in {0, 1, 2, 3} corresponds to degree direction {0, 90, 180, 270} respectively.
Three maps are indexed with number, where 0 = "Grid", 1 = "Jelly", 2 = "L".
Update: make a 3d matrix for each map of shape [sizeOfX, sizeOfY, 4]. Each element is a 74d vector(implemented with python list). If (x, y, d) doesn't exist in the map, output a zero vector with the same length.
How to use matrix
cd matrix
python
// in python
import map // at the directory of matrix
map.map_grid
map.map_jelly
map.map_one