worldStates is a Matlab MxNxL 3D array (tensor) containing L states of a MxN grid of binary values.
worldStates
ps is a length L list of probabilities assoc
ps