function drunkards_walk

deeptime.data.drunkards_walk(grid_size: Tuple[int, int] = (10, 10), bar_location: Union[Tuple[int, int], List[Tuple[int, int]]] = (9, 9), home_location: Union[Tuple[int, int], List[Tuple[int, int]]] = (0, 0))

This example dataset simulates the steps a drunkard living in a two-dimensional plane takes finding either the bar or the home as two absorbing states.

The drunkard can take steps in a 3x3 grid with uniform probability (as possible, in the corners the only possibilities are the ones that do not lead out of the grid). The transition matrix \(P\in\mathbb{R}^{nm\times nm}\) possesses one absorbing state for home and bar, respectively, and uniform two-dimensional jump probabilities in between. The grid is of size \(n\times m\) and a point \((i,j)\) is identified with state \(i+nj\) in the transition matrix.

(Source code, png, hires.png, pdf)

../../_images/plot_drunkards_walk.png
Parameters:
  • grid_size (tuple) – The grid size, must be tuple of length two.

  • bar_location (tuple) – The bar location, must be valid coordinate and tuple of length two.

  • home_location (tuple) – The home location, must be valid coordinate and tuple of length two.

Returns:

simulator – Simulator instance.

Return type:

deeptime.data.DrunkardsWalk