• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

How does Music Select ACTUALLY Work?

Kankato

Smash Journeyman
Joined
Dec 5, 2013
Messages
239
Location
SoCal
Has anyone written a technical analysis of how Brawl decides which song to play? Because on the stages I play the bars signifying song preference are all even, yet whenever I play multiple games I get the same song a lot. This leads me to think the song choice isn't truly random. If it's not random, how does it work?
 

Espyo

Smash Apprentice
Joined
Nov 3, 2007
Messages
103
Location
Portugal
In short: Your friends really like the song, you're unlucky, it's just you, or Brawl is just too weird with its randomizations.

If you're talking online, then chances are it averages the preferences of all players. So if one of your friends REALLY likes a song, you'll be getting it loads of times, even though you set the same chance for all songs on your end.

Other than that, it shouldn't be too complex. It might do something like this: suppose you have 3 songs, and you set 50 for all of them; 100 is the max, 1 is the minimum (you can't set it to 0 (maybe you can with hacks?), because there are numerous reports of songs with minimum chance still being picked).

The game sums all values to 150 (50 + 50 + 50) and then obtains a random number in-between. Let's say it got 120. Then it goes through each song and finds which block the 120 belongs to. For song A, there's 50, but the number 120 isn't inside the initial 50. For B, 120 is not between 50 and 100. 120 is however inside the third block, which goes from 100 to 150, so it picks that song.

That technical bit of how I imagine the game works is out of the way, but here comes another one: Random numbers aren't truly random. You can't just obtain an unbiased number out of nowhere. I have no idea how Brawl's RNG works, but if it's simple, chances are it'll be biased towards some numbers. Let's forget for a moment that it needs an initial seed, which, as far as I can tell, seems really fair and diverse.

Suppose the game can only generate a random number between 0 and 255. For our previous example, we need a number between 0 and 150. The game will have to grab the generated random number and apply a modulus operation. In simple terms, this operation makes the number roll-back once it hits a limit. For instance, the modulus of 50 against 150 is still 50. 100 % 150 is still 100. 149 % 150 is still 149... But 150 % 150 is 0. 151 % 150 is 1, and so on, and so forth. Remember how our random number's limit ends in 255, somewhat close to our 150 limit? Let's try adding a modulus to the highest numbers. 253 % 150 = 103. 254 % 150 = 104. 255 % 150 = 105. After that, the next number the game could generate would be 0, and 0 % 150 = 0.

What this means is that song chance numbers between 0 and 105 have TWICE the chance of appearing compared to numbers between 106 and 150. (0 to 150 would appear when the RNG gives between 0 and 105, and 151 to 255; C would only be picked with the RNG between 106 and 150.) In our example, song C would get picked a lot less often.

Now, even the most basic RNG does NOT use a limit as short as 255 numbers, and if anything, this would decrease the chance of a song appearing, not increase. So... it could just be your impression, or you could just be very un/lucky. Or, you know, the online thing I mentioned above. Or maybe the game's just so crazy with its randomization that it does what it wants. For instance, in my 3+ years of playing online, I still can't understand what makes the game decide to include or reject an item from Item Switch, given every player's Item Switch settings.

(Disclaimer: some values I wrote for the examples need ironing out, but I don't have the time for that.)
 
Top Bottom