# Self-Trapping Random Walks on Integer Lattices

## Description of the Problem

The walker starts from the origin (0,0),(0,0,0),(0,0,0,0) in 2D, 3D, 4D. He tries one of the possible 2*d directions (+/-) along the coordinate axes with equal probability. If the target location of this trial step has been already visited before (including the start point), then a failed attempt is counted and another random choice out of the 2*d possible directions is made. This is repeated until a target location not visited before is found. This is counted as a successful step. If the current position is surrounded by 2*d already visited lattice points, then the walker is trapped and the walk is terminated. There are some characteristic numbers describing the path:
- The average number of steps before trapping occurs
- The average number of unsuccessful steps
- The location of the maximum of the distibution of the number of steps before termination
- The average distance travelled before trapping occurs: Manhattan or Euclidean
- The average maximum distance from origin reached during the walks: Manhattan or Euclidean

Here is an example of a very long 2D walk.

Probability distribution of the number of steps before termination for the 2D walk.