Builds the matrix for config's actions and facings.
config
The matrix of config, with cells by action and facing.