Bug Report

(Resolved) minor bug with random page [#1505]

Back to forum

New reply

 
reply
Dieter: (Resolved) minor bug with random page (2008-08-02 15:24) [#4936]

As a frequent user of the random page function, it occurs to me that

  • it occasionally returns Homepages, despite these being excluded. I suspect this is because it really returns the alias, which is another page type than Homepage.
  • it has a tendency to pick the same page twice in a short span, against not only the popular odds but also the statistical odds. This is not even disturbing for its most frequent user, only peculiar.
reply
ArnoHollosi: not a bug, pure math (2008-08-02 15:18) [#4940]

regarding point 1: true. You just exclude homepages, but not aliases. As there are over 120 aliases of homepages it is not surprising that you land on a alias for a homepage occasionally.

regarding point 2: [ext] some math shows that the probability of hitting on the same page twice is about 30% if you use random page 100 times. Add in the fact that SL currently has over 2000 aliases and the odds that you hit the same page twice increases dramatically.

I have added some functionality for SL's #1 RandomPageJunkie :o)

X
Dieter: Re: not a bug, pure math (2008-08-02 19:10) [#4944]

(sad face for being accused of falling for the birthday paradox) I believe it is a random function. My math did not take the aliases into account. Even then I had some strong incidences, but then again multiple experiments with the same odds will also produce anomalies ...

Cheers

ArnoHollosi: Re: not a bug, pure math (update) (2008-08-02 21:13) [#4946]

Didn't want to accuse you of anything. Actually, I'm using MySQL's rand() function about which its documentation says:

RAND() is not meant to be a perfect random generator, ...

I assume this means that rand() is good enough, but that it's not a cryptographically secure random generator.

I ran some tests and with aliases there is a 10% chance that you hit the same page within 50 tries, and a 2% chance that you hit the same page within 25 tries.

Maybe your memory is playing a trick on you: I looked through the logs and you had only three duplicates within the last three days (250 random pages served). Note: this does not take aliases into account, so you may have seen more duplicates.

reply
Unkx80: Number of pages (2008-08-02 18:19) [#4943]

I assume that the current number of pages as listed by %% Frontpageblurb %% includes the number of alias pages. It seems more informative to exclude the alias pages from this count, no?

X
ArnoHollosi: Re: Number of pages (2008-08-02 20:51) [#4947]

Probably true. One could also argue that homepages should be excluded. Current counts are:

  • Aliases: 2190
  • Homepages: 1732
  • Other: 13281
reply
Dieter: ((no subject)) (2008-08-02 21:12) [#4948]

I should show this to the people who admire me for not having a TV.

I hope you paint the smilies wherever I don't bother to.

 
Back to forum

New reply


[Welcome to Sensei's Library!]
RecentChanges
StartingPoints
About
RandomPage
Search position
Page history
Latest page diff
Partner sites:
Go Teaching Ladder
Goproblems.com
Login / Prefs
Tools
Sensei's Library