[Computational Media] Grass Hunt

  • A Cool Explanation about The Levy flight:

“An animal that forages will hang out in a small area, looking for nuts or berries, then will realize it has used up all the likely sources in this spot. It will then head off in a random direction, walk many paces, and start foraging again. When you plot the Levy flight, it looks like this:

Someone discovers your site. They poke and prod and join and return and return again. Then they feel as though there’s no more benefit and they move on, surfing until they find another place to forage. (http://sethgodin.typepad.com/seths_blog/2010/04/the-levy-flight.html)”

  • Background knowledge:

The particular case for which Mandelbrot used the term “Lévy flight” is defined by the survivor function (commonly known as the survival function) of the distribution of step-sizes, U, being:

Pr(U>u) = begin{cases}<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> 1 &: u < 1,\<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> u^{-D} &: u ge 1.<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> end{cases}   Here D is a parameter related to the fractal dimension.

My idea is to make a grass hunt game/experience. To create a grass map as background, then use levy flight as the grass-hunting route to find&eat grass. Finally it will show you the total number of grass you eat within the specific period of time and the route. Then compared it with the totally random walk.

Screen Shots:1

  • Rest and result:

I made a comparison for the route of Levy Flight walk and the totally random walk. Here to see the route of different walk types. We can see the route of totally random is super massy while Levy Flight is much more organized.

2random

The average eaten number for both of the 2 types :

I calculated the number 5 times for each of them. The average eaten number for Levy Flight is 407, while the totally random is 233.

So… Be smart to choose a better way of walking~~
Github codes: