curr=random page, prev=null
for a long time do
| if curr not in array ranked[] then
| rank[curr]=0
| end if
| rank[curr]=rank[curr]+1
| if random(0,100)<85 then // with 85% chance ...
| prev=curr
| curr=choose hyperlink from curr // ... crawl on
| else
| curr=random page // avoid getting stuck
| prev=null
| end if
end for
|