Homestar Runner Wiki Forum

A companion to the Homestar Runner Wiki
It is currently Mon Sep 18, 2023 12:01 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Rando sucks now
PostPosted: Thu Jan 08, 2009 5:41 am 
Offline
User avatar

Joined: Fri May 18, 2007 11:44 pm
Posts: 338
I tried rando multiple times and alls I got was sbemails, one answering machine, and a Cheat Commandos. I tried it maybe ten times.


Top
 Profile  
 
 Post subject: Re: Rando sucks now
PostPosted: Thu Jan 08, 2009 12:37 pm 
Offline

Joined: Mon Sep 15, 2008 6:45 pm
Posts: 45
It doesn't seems that Rando is really that random. My impression that it is choosing a random element from the Servers History Log. I understand getting a lot of SBEmails from rando. Because there are 200 of them. And are the biggest section on the site. As well there are about 10 answering machines The rest of the toons are more spread out. However because people go to SBEmails more often and sometimes goes threw a bunch of them for about a half hour (like watching a TV show) or the Answering machines in order they are tracked more in the system log thus increasing the chances it will be picked. As well more popular emails tend to come up more then the more obscure ones.


Top
 Profile  
 
 Post subject: Re: Rando sucks now
PostPosted: Fri Jan 09, 2009 10:53 am 
Offline
User avatar

Joined: Wed Dec 22, 2004 6:18 am
Posts: 682
Location: Don't look behind you.
It's getting them from a list. There's a xml file or something that lists every toon on the site I think. It just randomly picks stuff. I've noticed that randomizers I've used on webpages and such things in the past, seem to not always be as "random" as they're supposed to be. But technically it is.


Top
 Profile  
 
 Post subject: Re: Rando sucks now
PostPosted: Mon Jan 12, 2009 10:26 pm 
Offline

Joined: Fri Dec 26, 2008 10:27 pm
Posts: 79
It's called pseudo-random numbers.
Obligatory Wikipedia link
On the Roblox Wiki, they used to have a script for truly random numbers, but the script has been since... DELETED! For some reason, I couldn't find it in the Page History either. I think it was along the lines of:

Code:
function DoSomeSortOfWhatsit(part)
     if game.Players:findFirstChild(part.Parent.Name) ~= nil then --Is the button-toucher a Player or an NPC?
          players = game.Players:GetChildren()
          wait(math.random(1, #players)) --Random wait randomizes the Randomizer because #players is truly random.
          thisplayer = game.Players:findFirstChild(part.Parent.Name)
          thisplayer.Coins.Value = thisplayer.Coins.Value + math.random(1, 9001)
     end
end

script.Parent.Touched:connect(DoSomeSortOfWhatsit)


Edit: Not that it's relevant to rando, but I found the real script. It's a standalone that constantly randomizes the math.random() function, which is global.
Code:
while true do
     players = game.Players:getChildren()
     wait(math.random(1, #players)) --Though this would technically break if no one's on the server.
     if #players > 0 then math.random(1, #players) end
end

Maybe TBC could set it up so that (and I have no idea how the crap HTML and Flash work on the inside) it rerandomizes the rando button by doing, say,
math.random(1, numberOfUsersConnectedToServer).

But by probabilities of getting something from a particular category, it is almost guaranteed that you will see more sbemails than Toons, Marzipan's Answering Machines, etc. in a given test set. But each sbemail, Toon, etc. in a category has the same probablity of being picked: 1 in however many HTMLs and SWFs are listed by rando.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Rando sucks now
PostPosted: Tue Jan 13, 2009 9:33 am 
Offline
User avatar

Joined: Fri Apr 01, 2005 1:10 am
Posts: 677
Location: Australia
That's all well and good when you're doing the randomisation on a server somewheres, which makes sense for a multiplayer game of some kind, but less sense for H*R. And it's overkill anyways, pseudorandomness is plenty enough. And anyways, that code wouldn't help at all with the actual problem.

It's important to note that true random numbers will clump in strange ways. A random distribution is very rarely evenly spread... clumping is much more likely. There's currently 352 toons in the rando... if you hit rando 352 times, it's extremely unlikely that you'll get each toon once... it's much more likely that you'll some toons more often than the others (even with just 10 toons, clicking the rando 10 times, the chance you'd see each toon once is under 0.04%). And with 352 toons, if you just hit rando a bunch, it'd only take on average around 23 clicks before you get your first repeat (it could be more or less than that on an individual attempt, of course, it's random after all).

Many so-called "random" shuffle modes in media players and the like will actually intentionally bias the random number generation to avoid repeats... because you as a listener typically don't want a uniformly random distribution, you want it to be much less likely than chance to get repeats, much more likely than chance that you get a large selection. Many will just take the playlist, shuffle it once, and then play through... so while the order's random, you'll get each one once each, before you'll get any repeats. Even though this is technically less random, it's better at doing what you actually want it to do.

Unfortunately, such a solution would be much more complicated to build in Flash... because each time the rando Flash file loads, it picks one toon, and then you watch that... if you click it again, it's a different instance of the rando Flash file. Keeping track of which toons you've seen, so it can check for repeats, is made much more complicated, you'd need to throw in all the code used for persistence (typically used for saves in Flash games), and if you wanted both the "R" on the main pages and the "rando" in the navbar to share the history (which you would), then the complications go through the roof.

In short: there's more to randomness than you think, be happy with what you've got.

_________________
<link rel="signature" type="text/hilarious" href="/signature.txt" />


Top
 Profile  
 
 Post subject: Re: Rando sucks now
PostPosted: Tue Jan 13, 2009 9:58 pm 
Offline

Joined: Fri Dec 26, 2008 10:27 pm
Posts: 79
Phlip wrote:
[ Longexplanation Content Deleted ]

In short: there's more to randomness than you think, be happy with what you've got.


Good grief, you didn't have to make a wall-o-text about it. I just got back from school, and today's lesson almost made my head brain a splode. Not to mention, Sensei assigned a long paragraph for translating, and it's due tommrow, and I gotta "work my computer over with a two-by-four" and get it to use kanji for the assignment. (yes im taking a japanese class)
Like I said, I don't know how the crap the system works on the inside. I just posted the two Roblox Lua scripts because Awexome said that rando sucked and it wasn't random enough.

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group