View Single Post
Posts: 158 | Thanked: 67 times | Joined on Jan 2008
#33
Originally Posted by ysss View Post
Can anyone share the herding algorithm?
There isn't one, per se, but since the random walk algorithm will get at least some of the gerbils where they're going, anyway, the solution is to have a ton of gerbils.

Wikipedia explains drunken gerbils and drunken monitors:

Imagine now a drunkard walking randomly in a city. The city is realistically infinite and arranged in a square grid, and at every intersection, the drunkard chooses one of the four possible routes (including the one he came from) with equal probability. Formally, this is a random walk on the set of all points in the plane with integer coordinates. Will the drunkard ever get back to his home from the bar? It turns out that he will.