Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Page 1 of 4 1 2 3 4 >
Topic Options
#165593 - 13/06/2003 12:37 Strange randomization
xanatos
enthusiast

Registered: 08/03/2001
Posts: 202
Loc: Denver, CO
One thing I've noticed since I've gotten the player, is that just about always one particular group in general is always grouped extremely close together on random play. "Verve Pipe". I don't know if something with the random seed creates it, but in just about every instance fo playing all songs in the play list puts all 7 or 8 songs I have of them very close. Typically playing 3 in a row, having a random song, 2 more of their songs, a few random sonds and then the last couple after that. Is there anything that would cause this? I haven't noticed it with any other artists, pretty much just with this one, and it's happened ever since I got the player way back in version 1.01 software.

Just thought I would mention the quirk to see if anyone else has noticed something similar to this.
_________________________
- Damien - Mk2a 24G Blue SN: 120001043

Top
#165594 - 13/06/2003 12:40 Re: Strange randomization [Re: xanatos]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
EVERYONE has reported this, and the empeg guys keep insisting that it's ordinary statistical clustering and there's nothing wrong with the randomization code.

I see it happen so often that I'm convinced there's some kind of a bug or weakness in the randomization code that no one's caught yet.
_________________________
Tony Fabris

Top
#165595 - 13/06/2003 12:44 Re: Strange randomization [Re: xanatos]
robricc
carpal tunnel

Registered: 30/10/2000
Posts: 4931
Loc: New Jersey, USA
There are two bands that I notice the empeg plays more than any others. Collective Soul and Verve Pipe.

Collective Soul used to be a lot bigger problem, but since 2.00b13, it seems to have become more random. For only having one Verve Pipe CD on the empeg, they do get an awful lot of play though. I usually only get 200 tracks into a "full suffle" playlist.

I would have to say you're on to something.
_________________________
-Rob Riccardelli
80GB 16MB MK2 090000736

Top
#165596 - 13/06/2003 13:12 Re: Strange randomization [Re: xanatos]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
Ok, I touched on this in another thread but here's my take: I'm betting this is totally random. I admit that I had doubts in the beginning before I took over the program I work with now. I can’t get into specifics, but it basically does randomly picks from a fixed list of available items. Every time it selects it does a completely isolated selection, but I get calls every day from users complaining that it isn’t random (that it “favors” certain items). I have tested the program, examined the random number generator, and written lengthy papers to explain the behavior, and yet I still get the calls. The truth is that I can plug all of the numbers into an excel spreadsheet and every time the numbers that the users report are well within expectations. The problem is the perception of non-randomness, not the program. True randomness does not yield an even distribution, though that’s what we expect. If it did, however, that would be an indication that it isn’t in fact random.

Now my program is a little different than the Empeg and I can’t say for sure that the randomizer on the Empeg is accurate. All I know is that I still get calls at least once a week complaining, and during some parts of the month (when program usage is high) I’ll get them every day. So Empeg guys, I feel your pain.

One example I remember from this community is the same song title coming up three times in a row (3 different version of the same song). I don’t remember if this was alleging a problem or not, but I know we discussed the randomizer in that thread. If you think about it much, this clearly wasn’t the randomizer at fault. The reason? The randomizer certainly isn’t taking song title into account; in fact I believe that if the randomizer were broken the only information that would affect how often a song was selected would be the song “position” (ie where it resides in the “list” of songs). Since I believe this particular song was three cuts off of three different albums, clearly the randomizer wasn’t at fault, as the songs were not located right next to each other. The only correlation between the three songs was incidental to the randomizer, but we perceived a correlation.

The only thing I can say is that perhaps the randomizer could be “de-randomize” since it seems that’s the behavior we all want. I think, though, that that’s what the parameterized shuffles are for.
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165597 - 13/06/2003 13:31 Re: Strange randomization [Re: JeffS]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
I agree that this is a red herring, and is basically a result of peoples' distorted perceptions of what randomness is. In order to give people what they want, the shuffle algorithm would have to go through on a second pass and "de-cluster" any songs from same artists/albums/whatever.
_________________________
- Tony C
my empeg stuff

Top
#165598 - 13/06/2003 13:40 Re: Strange randomization [Re: tfabris]
msaeger
carpal tunnel

Registered: 23/09/2000
Posts: 3608
Loc: Minnetonka, MN
Just tell yourself it's a feature and the empeg has artificial intelligence.

Today I was playing all my punk stuff and it would play three songs from each artist it picked it was pretty cool.
_________________________

Matt

Top
#165599 - 13/06/2003 13:44 Re: Strange randomization [Re: tonyc]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
the shuffle algorithm would have to go through on a second pass and "de-cluster" any songs from same artists/albums/whatever.
The first post I ever made here was to request this feature. In the end I "beat the system" by setting up a complex series of playlists that achieves this. (which only goes to show how flexable the playlist system is on the Empeg). One thing the Empeg guys may want to think about is how average consumers will react to this "pure" radomization in their other products. I'd guess that most aren't going to care whether the process is totally random or not, they'll want something closer to what you just described.
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165600 - 13/06/2003 13:51 Re: Strange randomization [Re: JeffS]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Well, the main thing I'm noticing seems to defy even the statistical normals that you'd expect in a true random shuffle.

I'm not talking about a few songs by the same band coming close together.

I'm also not talking about a few variations of the same song coming close together.

I'm not talking about a certain band who dominate my playlist with sheer numbers (say, Rush) coming up excessive amounts.

All of the above I would expect from a random shuffle, and pretty frequently.

No, I'm talking about a consistent and regular "comb" of a LARGE NUMBER of closely-grouped FIDs coming up on EVERY SINGLE RESHUFFLE, usually noticeable within the first couple dozen tracks or so.

Case in point:

- My player has about 3000 songs on it now, of which 2759 are not ignored-as-child on a "down down down" shuffle.

- Of those songs, there are exactly 13 by Madonna. The album "Ray of Light" is the only album of hers I own.

- I do a down-down-down shuffle in purely Random mode.

- The beginning of the playlist looks like this:

Some song
Some song
Some song
A song from Ray of Light
Some song
A song from Ray of Light
Some song
A song from Ray of Light
Some song
Some song
Some song
Some song
Some song
Some song
A song from Ray of Light
Some song
Some song
A song from Ray of Light
Some song
A song from Ray of Light
Some song
A song from Ray of Light
Some song
Some song
Some song
A song from Ray of Light
Some song
Some song
Some song
Some song
A song from Ray of Light
Some song
Some song
Some song
Some song
Some song
Some song
(etc...)


Now, I could imagine this once in a while. But I see this happening at least once somewhere in every single full-player-shuffle.

I will admit that each time it's not "Ray of light" but it's something, some album or artist who I don't have a lot of compared to the rest of my collection.

Are you saying that in a truly random shuffle, that this behavior is still within the realm of statistical distribution?
_________________________
Tony Fabris

Top
#165601 - 13/06/2003 14:10 Re: Strange randomization [Re: tfabris]
xanatos
enthusiast

Registered: 08/03/2001
Posts: 202
Loc: Denver, CO
I totally agree with you Tony. I'm not much complainging, but I have noticed it specifically with Virve Pipe, and always with all of the songs on a "down-down-down" shuffle. Typically Verve Pipe comes up somewhere in the middle, but it's always every single one of the songs they have within a block of about 20 songs, with multiple ones next to each other. Currently I have 2161 songs, and it varys between 1300 and 2600 depending on my current "playlist" mood and what I have on it. But in every case, Verve Pipe always comes up in almost the exact same "pattern".

Of course, there is no such thing as true randomization, just a close aproximation to it. At least it isn't like WinAMP. On more than one Occasion I can start guessing the next few songs based on the previous few. I also have to agree that the randomization has gotten "better" as time has gone on. In the 1.x version of the software it was also pretty predictable depending on the seed the down-down-down shuffle got. Now it just happens to be with the few Verve Pipe songs I have that I always notice it on.

Sorry to bring up such a heated topic!
_________________________
- Damien - Mk2a 24G Blue SN: 120001043

Top
#165602 - 13/06/2003 14:21 Re: Strange randomization [Re: xanatos]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
Sorry to bring up such a heated topic!
Heh, didn't mean to get defensive. It really isn't a heated topic for me, at least not where the Empeg is concerned. It is heated when it comes to my application though, cause I'm so tired of wasting development time trying to answer the same question over and over again (and yes, it's in our FAQ). For all I know the Empeg randomizer could be messed up, I'm just trying to offer a defense because I know how tiring this battle can be for the developer!
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165603 - 13/06/2003 14:53 Re: Strange randomization [Re: tfabris]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
Are you saying that in a truly random shuffle, that this behavior is still within the realm of statistical distribution?
I was going to say that it was, but I decided to write a program to try and prove it. Anyway, the program generates a random list of "songs" grouped by tens into albums. You can set the total number of tracks. It will then tell you how much "combing" it found within the sample by looking for songs on the same album that are 1 apart, 2 apart, 3 apart, etc. I also chopped the stats at the first 30, as this is where you'd normally perceive the problem. What I found is that the combing effect seems to be relatively low. Much lower than what I've seen on the Empeg.

As I conceived this test and coded it in under a half hour I'm not sure how accurate it is (or bug free). I'll have to take the weekend to think it over. Anyway, the program is attached if you care to look at it.


Attachments
163899-RandomNumbers.exe (116 downloads)

_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165604 - 13/06/2003 14:56 Re: Strange randomization [Re: JeffS]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
And here is the Delphi source (if anyone can still read Pascal) in case anyone wants to point out an error I made. Remember, be nice. I coded this in thirty mins.


Attachments
163900-RandNumMain.pas (206 downloads)

_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165605 - 13/06/2003 15:12 Re: Strange randomization [Re: tfabris]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
Are you saying that in a truly random shuffle, that this behavior is still within the realm of statistical distribution?

Of course it is. If you got _exactly_ the same running order from a ddd shuffle as one that you'd had before then _that_ wouldn't be within the realm. (Unless you'd shuffled somewhere in the order of n! times before).

But you have to remember that in a _purely_ random shuffle, there exists a chance that the resulting order is exactly the same as the unshuffled order. As there is also the chance that the resulting order is the same but with only the last 2 tracks swapped. Or only the first 2. Or only _any_ 2 tracks.
None of those would be considered as 'shuffled', but are totally valid in a _purely_ random shuffle.
What about when we consider the huge number of other running orders that are also similar to the unshuffled playlist? Starting with a playlist of 2000 tracks, I would suggest that if in the resulting running order the first 1000 tracks were exactly the same, and only the last 1000 tracks got moved around, everyone would cry foul. Yet there are 1000! ways that this could happen. Sure, the odds of it happening are still only approximately 1 in (2000!/1000!), but those 4x10^2567 possible results are still valid in a _purely_ random shuffle.
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#165606 - 13/06/2003 16:32 Re: Strange randomization [Re: JeffS]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
What I found is that the combing effect seems to be relatively low. Much lower than what I've seen on the Empeg.
Actually, if I'm reading the output of this program correctly, it's kind of showing me that a certain amount of combing is to be expected.

I didn't catch how it decides what an "album" is, I assume it's 10-15 sequential numbers? If so, does your algorithm count any number close to ANY 15th-or-less neighbor without considering album boundaries, or does it split the list up into discrete album segments and then decide from that list?

For example: If it sees two guys from the list "A B C D E F G H I " close together, say D and G close together, it counts that as a "hit", but what if the album boundary was between E and F? Then it shouldn't be considered a hit.

I know that from the point of view of a statistical sample, the album boundary is irrelevant. But from our perception of whether or not D and G are unnaturally paired, it's critical. And that's what we're testing: Is it normal for us to perceive that kind of clustering and combing in a random shuffle?

This discussion has been VERY enlightening so far! In fact, if we can fancy-up that Delphi program a bit more (make it more obvious what it's measuring), I'll do a FAQ entry on this topic and link the EXE from the FAQ.
_________________________
Tony Fabris

Top
#165607 - 13/06/2003 18:31 Re: Strange randomization [Re: JeffS]
rompel
stranger

Registered: 26/08/2000
Posts: 44
Loc: California
Jeff,

Other than being a bit inefficient (you're using an O(n^2) shuffle algorithm where a simple O(n) algorithm could be substituted), the code looks good. You might post an example output for those of us who don't run Windows (or have Kylix), though.

More to the point, it has long been my expert opinion that there is something broken in the Empeg's shuffle code. I've seen too many cases like the one Tony described to chalk it up to the normal pockets of order in truly random data.

--John

Top
#165608 - 13/06/2003 19:07 Re: Strange randomization [Re: rompel]
JBjorgen
carpal tunnel

Registered: 19/01/2002
Posts: 3584
Loc: Columbus, OH
I get exactly the same behavior as Tony. Many songs from the same artist that only has a few songs on the player with a song or two intersperced between them. This behavior is reproduceable nearly every time my empeg is played in shuffle. For instance, I'm in Richmond VA on business right now. I have one album from REO Speedwagon on my player... The Hits. In a two hour drive here from the airport in Raleigh-Durham, I easily heard 8 or 9 songs from that album, with one or two seemingly random tracks between each of them. This happens constantly.
_________________________
~ John

Top
#165609 - 13/06/2003 19:33 Re: Strange randomization [Re: JBjorgen]
Micman2b
addict

Registered: 27/12/2001
Posts: 441
Loc: Central, NC, USA
Two hours from RDU to Richmond huh. Boy, I am glad you did not get pulled by the NC Patrols.

Anyway. Drove from RDU airport area to Greensboro, NC this afternoon and the same thing happened with Collective Soul (v2.0f on the empeg) I have five Collective soul albums and 9500 songs on the empeg. I think i heard at least 5 Collective Soul songs in that drive... This is typical. Pick any band. Moby, Alison Krauss (AKUS), Zappa, Ween... This happens occasionally. I found the player loves to group Travis or Pink Floyd (or any member solo project). Is the shuffle/random slighted toward the british music???

Usually if I do not like the shuffle, shuffle again...

_________________________
_____________
Sean in NC
130gb MK2a w/ 32mb ram
80gb MK2a empeg spare

Top
#165610 - 13/06/2003 20:11 Re: Strange randomization [Re: tfabris]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
Actually, if I'm reading the output of this program correctly, it's kind of showing me that a certain amount of combing is to be expected.
What is very strange is that you always get about 80 or 90 "combed" songs no matter how many total tracks you have (unless you got down to 50 or less, duh!), which made me question the output, but I couldn't find any bugs at first glance.
I didn't catch how it decides what an "album" is, I assume it's 10-15 sequential numbers? If so, does your algorithm count any number close to ANY 15th-or-less neighbor without considering album boundaries, or does it split the list up into discrete album segments and then decide from that list?
It does discrete album segments, assuming 10 "songs" for every "album", except perhaps the last (if you have an odd number). Put another way, it does consider "boundries" of albums.
This discussion has been VERY enlightening so far! In fact, if we can fancy-up that Delphi program a bit more (make it more obvious what it's measuring), I'll do a FAQ entry on this topic and link the EXE from the FAQ.
I'll see what I can do. I've been very bored at work recently so I should be able to mess with it in my down time on Monday. I also want to give my brain some time to think this through, as I didn't expect the results I got at all (though I guess that might be a good thing).
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165611 - 13/06/2003 20:15 Re: Strange randomization [Re: rompel]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
Other than being a bit inefficient
Yes, well I wrote it in a hurry and I've never done a shuffle algorithm before (my other program does random "selections", which is slightly different), so that was a brute force attempt!

the code looks good

Excellent! Thanks for the sanity check.

You might post an example output for those of us who don't run Windows (or have Kylix), though.
I'll do that tomorrow (and I'll have to use my wife's machine as this is Linux I'm typing on right now).
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165612 - 13/06/2003 21:01 Re: Strange randomization [Re: JeffS]
rompel
stranger

Registered: 26/08/2000
Posts: 44
Loc: California
In reply to:


What is very strange is that you always get about 80 or 90 "combed" songs no matter how many total tracks you have (unless you got down to 50 or less, duh!), which made me question the output, but I couldn't find any bugs at first glance.




I don't find that strange. As you have more total tracks you have more places for "combed" songs to occur but the probability of a "combed" song at any one spot decreases. I could probably work out the math, but it's not surprising that these would cancel out.

--John

Top
#165613 - 13/06/2003 21:21 Re: Strange randomization [Re: JeffS]
rompel
stranger

Registered: 26/08/2000
Posts: 44
Loc: California

Yes, well I wrote it in a hurry and I've never done a shuffle algorithm before (my other program does random "selections", which is slightly different), so that was a brute force attempt!


Hey, at least your code was correct! That's a lot better than many attempts. Just for reference, a good shuffle algorithm looks something like this:


/* Shuffle x[1..n] in place */
for i=n downto 2
let j be uniform random from range [1..i]
swap x[i] and x[j]


--John

Top
#165614 - 14/06/2003 00:17 Re: Strange randomization [Re: rompel]
ricin
veteran

Registered: 19/06/2000
Posts: 1495
Loc: US: CA
Wine runs it fine.

_________________________
Donato
MkII/080000565
MkIIa/010101253
ricin.us

Top
#165615 - 14/06/2003 01:37 Re: Strange randomization [Re: msaeger]
matthew_k
pooh-bah

Registered: 12/02/2002
Posts: 2298
Loc: Berkeley, California
Just tell yourself it's a feature and the empeg has artificial intelligence.

Well tonight (after about six hours of uneventfull shuffling today) my empeg played Rocky Horror's Rose Tint My World followed directly by Arlo Guthrie's I'm Going Home. For those of you familiar with Rocky Horror, I'm Going Home is the following track in the musical. Arlo Guthrie's song by the same name shares no relation. I was impressed that my empeg was emulating the kind of jokes I make when I make mix CDs.

I do notice what people are pointing out however, that my empeg does seem to group songs by an artist together. For instance, I hadn't heard Aimee Mann in at least a month, when today I got three songs within an hour of driving. Probably just random coincidence.

Matthew

Top
#165616 - 14/06/2003 05:06 Re: Strange randomization [Re: rompel]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
a good shuffle algorithm looks something like this:
Thanks, I was going to ask! I suppose the fact that I was a CIS major not a computer science major is showing (since CIS was the closest thing my college offered). I never had a solid class that taught alogrithms.
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165617 - 14/06/2003 05:11 Re: Strange randomization [Re: JeffS]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
What is very strange is that you always get about 80 or 90 "combed" songs no matter how many total tracks you have
Actually I meant 60-90, just for accuracy's sake.
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165618 - 14/06/2003 05:27 Re: Strange randomization [Re: JeffS]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
Here's an image for the non-window folks. I should point out it doesn't as much detect "combing" as it does songs off the same album close together. In the test run I just did, only 86 pairs (in 3000) were close together, and many of these might have been couples rather than full-blow "combing". I should add that since each pair is only noted once, the number of actual songs involved is higher than 86 (172 if all songs were couples and not triples, etc.) In addition, in the first thirty songs (where I determined you'd probably most notice the effect) only two songs from the same album were close together. Clearly this program is limited in what it tells us, but my first feeling is that we are seeing more "combing" on the Empeg than we should.


Attachments
163970-Combing.jpg (221 downloads)

_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165619 - 14/06/2003 05:36 Re: Strange randomization [Re: JeffS]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
The changes I'm planning to make are

1. Fix my stupid misspelling in the caption! Actually, I might just change it to something else entirely. Maybe I should also check the font . . . (sorry, deja vu from my last project!)

2. Allow the user to set range for album sizes (ex: 10-15 tracks).

3. Allow the user to set maximum gap for considering a pair of songs to be "combed" (Ex: 10 or less).

4. Get rid of the current statistics and replace them with:

5. An actual display of the sorted tracks (AlbumID/ Track No.) with "combed" songs marked. A "find next" will allow the user to jump to the next "combed" song so all patterns can be observed.

Anybody have any other information they'd like to see?
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165620 - 14/06/2003 11:07 Re: Strange randomization [Re: JeffS]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
So FerretBoy, what you're saying is that the program is only reporting numbers of individual close pairs, rather than clustered groups.

I expect to hear pairs rather often. It's clustered groups that I'm interested in.

Here's another idea. Something I've toyed with the idea of making myself. A program that shows, by color graph, the distribution of a given album in the shuffle:



(Pictures are a 60x60 grid=3600 songs. Images doubled in size so you could see the red dots.)

What I'm interested in seeing is... in a truly random shuffle, how often the second thing actually should happen. Not just what we think we perceive if we happen to hear three Madonna songs on the same trip.


Attachments
163992-distribution.gif (237 downloads)

_________________________
Tony Fabris

Top
#165621 - 14/06/2003 11:15 Re: Strange randomization [Re: tfabris]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
So FerretBoy, what you're saying is that the program is only reporting numbers of individual close pairs, rather than clustered groups
Yeah, but with such a small number of pairs (80 or so) you have to think there's not much clustering, which was what I felt the program was revealing. However, the modifications I have in mind will point out exactly what you want, though I hadn't thought of putting a graph in the program. I might do it, depending on how bored I get at work.
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165622 - 14/06/2003 11:31 Re: Strange randomization [Re: JeffS]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Anybody have any other information they'd like to see?
How about this...

Allow the user to set the total number of songs on the player (default about 3600), how many songs per album (default about 12), and how many albums per band (default about 4).

Then, graph the results, allowing you to quickly scroll through a list of band1, band2, band3, etc., and as you scroll, show the dots on the graph. Each album within a band could be a different color, so you could see if there's any clustering effect of band X along with the album effect. You could also scroll through individual albums (band 7, album 3) and show only that album on the graph, like in my illustration.

Then we'd have a very clear picture of just how clustered a truly random distribution should look.
_________________________
Tony Fabris

Top
#165623 - 14/06/2003 12:37 Re: Strange randomization [Re: tfabris]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
You got it. Everyone is out from my office next week (getting new work from the client) and all I have to do is answer help calls. At least now I'll get to do some interesting coding!
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165624 - 14/06/2003 12:43 Re: Strange randomization [Re: JeffS]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Cool.
_________________________
Tony Fabris

Top
#165625 - 14/06/2003 12:47 Re: Strange randomization [Re: tfabris]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
I'm sorry if I offend anyone here, but this whole exercise is getting a little ridiculous. The empeg guys have said that their shuffle algorithm is random, even after repeated accusations of bugs and inaccuracies in it. What are you trying to prove with all this hocus pocus you're doing with random number generation and plotting things on graphs and such? What is the end game if you get results that say "the shuffle algorithm isn't as random as it should be." Are you asking them to take yet another look at the code? Do you want to implement some de-combing of related songs after the shuffle is done? I'm not sure I understand the point here. This Delphi program and all the postulates and the hypotheses... What are we after here?
_________________________
- Tony C
my empeg stuff

Top
#165626 - 14/06/2003 12:53 Re: Strange randomization [Re: tonyc]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
What is the end game if you get results that say "the shuffle algorithm isn't as random as it should be."
Actually, I'm expecting the end game to be "the empeg guys have been right all along, the clustering effects we are noticing are to be statistically expected".

If that's the case, I intend to make a FAQ entry to that effect and link the EXE file as proof for anyone who doesn't believe it.
_________________________
Tony Fabris

Top
#165627 - 14/06/2003 13:57 Re: Strange randomization [Re: tonyc]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
I'm not sure I understand the point here. This Delphi program and all the postulates and the hypotheses... What are we after here?
My point was to prove the empeg guys right. I'd like to put to bed all of these questions if possible. I was suprised with the outcome of the program (feeling that there were far less "pairs" that I would have expected), but what it was testing wasn't entirely on target. If the analysis Tony F has suggested comes out with "combing", then no one can argue that the Empeg randomizer is bad. If it doesn't, we have further research to do. In the end, I hope we can make this the last discussion on the subject.
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165628 - 14/06/2003 14:40 Re: Strange randomization [Re: JeffS]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
In-laws visiting this weekend, so I decided to give this a first hack. Haven't really looked at the results, so you can decide what it all means.


Attachments
164030-RandomNumbers.exe (113 downloads)

_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165629 - 14/06/2003 14:50 Re: Strange randomization [Re: JeffS]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Cool and interesting!

I'm not quite sure how the size of the window relates to the graph. If I change the size of the window, the way the graphed data is laid out changes in ways I don't understand. Can you explain it?
_________________________
Tony Fabris

Top
#165630 - 14/06/2003 14:59 Re: Strange randomization [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
If this is showing me what I think it's showing me, then I believe that the things I perceive as "combed clusters" come up relatively commonly. Example:



Attachments
164035-cluster.gif (286 downloads)

_________________________
Tony Fabris

Top
#165631 - 14/06/2003 15:27 Re: Strange randomization [Re: tfabris]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
I'm not quite sure how the size of the window relates to the graph.
The width of the blocks are always the same. When you resize the graph, it refigures how many blocks fit on a line, and therefore how to space the lines. So more tracks = more lines = less space between lines. Bigger window = more tracks per line = less lines = more space between lines. Does that help?
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165632 - 14/06/2003 15:33 Re: Strange randomization [Re: JeffS]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Yes, it helps. But it makes the graph not very clear, because that means that a large window with only a few lines makes it look like everything is clustered funny. For instance, if there are only ten lines of actual track data, but the window is 50 lines tall, it looks like the tracks are horribly clustered when they really aren't.

Maybe the graph should be a fixed height depending on the number of lines, and let the user change the graph's width by changing the window size. If the graph is too big to fit in the window, put a scroll bar or something.
_________________________
Tony Fabris

Top
#165633 - 14/06/2003 17:58 Re: Strange randomization [Re: tfabris]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
I'll see what I can do. The vertical axis shouldn't really be taken into account at all when looking for clustering (and isn't in your above picture), but I understand how it can mess with your perceptions.
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165634 - 14/06/2003 18:24 Re: Strange randomization [Re: JeffS]
Anonymous
Unregistered


I saw on tv once about this guy that wrote a program that could figure out a random number generator's algorithm by punching in numbers that it produces and predicting the next numbers. He went to Atlantic City and won the jackpot on some game. Does anyone want to help me write a program like this?

Top
#165635 - 14/06/2003 19:09 Re: Strange randomization [Re: ]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
I had a guy in college who wanted me to write a program to generate lottory picks for him, but he wanted me to make it get rid of the "obvious things that won't come up", such as "1, 2, 3, 4, 5". I told him that was silly, as 1, 2, 3, 4, 5 had the same probability as any other numbers. He just wouldn't listen to me. Finally I took his criteria and wrote him a program that generated the numbers, completely ignorning his "rules". I figured if 1, 2, 3, 4, 5 ever came out I could fix the program then.
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165636 - 14/06/2003 19:44 Re: Strange randomization [Re: JeffS]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
I figured if 1, 2, 3, 4, 5 ever came out I could fix the program then.
Heh.
_________________________
Tony Fabris

Top
#165637 - 14/06/2003 19:51 Re: Strange randomization [Re: ]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
I saw on tv once about this guy that wrote a program that could figure out a random number generator's algorithm by punching in numbers that it produces and predicting the next numbers. He went to Atlantic City and won the jackpot on some game.
This only works with pseudo-random generators. In order for this to have worked for a gambling machine, he'd have to have been (a) playing on a really old machine that used pseudo-random numbers, since all of the new ones use proper random algorithms, and (b) be intimately familiar with the inner code and hardware of the game in question, since the output of a pseudo-random generator is very hardware and code dependent. I seem to recall reading something about this in the documents at http://www.wizardofodds.com , but I don't remember exactly where it was. That's a great site, by the way, if you're interested in information about randomness and probability. I was tempted to consult this guy when we started talking about the car player's shuffle accuracy, but FerretBoy seems to have us covered already.
_________________________
Tony Fabris

Top
#165638 - 14/06/2003 20:00 Re: Strange randomization [Re: ]
rompel
stranger

Registered: 26/08/2000
Posts: 44
Loc: California
Certain pseudorandom number generators (e.g. linear congruential generators) can be reverse-engineered from their output. And for any generator with a small enough seed-space, if you know the generator used you can exhaustively search for the seed which produces the known output. On the other hand, there was a lot of work done on cryptographic generators which are provably as unpredictable as the underlying cipher is uncrackable. And various hardware generators have been proposed whose randomness is guaranteed by quantum mechanics. If I were designing something where real money was riding on the outcome being unpredictable, I'd go for something along those lines.

But for shuffling music, a decent LCG properly used really ought to be good enough.

--John

Top
#165639 - 14/06/2003 21:03 Re: Strange randomization [Re: rompel]
loren
carpal tunnel

Registered: 23/08/2000
Posts: 3826
Loc: SLC, UT, USA
okay, please excuse my blindness if this has been discussed before (esp. in this thread!), but here's how i'm percieving this whole thing:

1. "People" don't like how the empeg shuffles as it seems to group songs in ways that don't seem "random" enough.

2. In fact, they are truly random, and the grouping is to be expected. And that is what this program is trying to prove.

SO... the question i want to know the answer to, is why would we want a truly random shuffle? Don't we want it to be psuedo-random so that groups and clusters of bands or albums are filtered out, thus making it seem "random"?

_________________________
|| loren ||

Top
#165640 - 14/06/2003 21:20 Re: Strange randomization [Re: loren]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Yeah, I think that comes under the heading of "wouldn't it be cool if..."

I can think of some ways one might write an algorithm to make something appear more random than truly random, but they all have nasty "gotchas". Like, choosing the lesser of two evils when you've got too much of a given artist on the player: this conflicts with your ability to make other bands appear widely spaced. You end up getting forced to choose who gets a lot of twofers showing up in the shuffle.

Maybe others have already solved this algorithm in cool ways. Perhaps there's some prior art on this that can be referenced...
_________________________
Tony Fabris

Top
#165641 - 14/06/2003 22:53 Re: Strange randomization [Re: loren]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
SO... the question i want to know the answer to, is why would we want a truly random shuffle? Don't we want it to be psuedo-random so that groups and clusters of bands or albums are filtered out, thus making it seem "random"?


Hmm. Care to come up with an algorithm for that?!

_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#165642 - 14/06/2003 23:11 Re: Strange randomization [Re: tfabris]
rompel
stranger

Registered: 26/08/2000
Posts: 44
Loc: California

Maybe others have already solved this algorithm in cool ways. Perhaps there's some prior art on this that can be referenced...


People have done work on something called "quasi-random" sampling in the context of Monte-Carlo integration. The idea is that the integral should converge faster if the sample points are spread out more evenly than would happen by random. Numerical Recipies has a section on the subject or try the following Google searches:

http://www.google.com/search?q=quasi-random

http://www.google.com/search?q=sobol+sequence

http://www.google.com/search?q=halton+sequence

It doesn't really deal with random permutations, but I suspect that if you did a 2d quasi-random sequence and looked at the x-rank vs. the y-rank you'd get something interesting.

--John


Top
#165643 - 16/06/2003 09:01 Re: Strange randomization [Re: tfabris]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
Ok Tony, here's a new version. It looks sort of like a disk-defragmenter, but I suppose that's going to be best for what you're trying to see. Anyhow, I've color-coded the albums (with up to 6 distinct colors) so you can see artist combs and album combs. To help the eye I wrote an "outline" around combed albums/ artists, which you can switch between the album and artist via a checkbox. I added "find album comb" and "find artist comb" buttons to find the artist/ album with the most combs (a comb defined as a “run of songs separated by no more than 10 other tracks”). The "find artist" button is now automatically called after pushing the "Go" button. I decided not to put a scroll bar in, but you can re-size the blocks to make them all visible with a zoom in and zoom out feature.

Clearly, there is some combing in all random selections. What I'm not sure is if the amount of combing showing up in my program is the same as on the Empeg. It's hard to tell because ultimately we are perceiving this data in a different way than listening through the playlists. But here you have it anyway.


Attachments
164199-RandomNumbers.exe (115 downloads)



Edited by FerretBoy (16/06/2003 09:05)
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165644 - 16/06/2003 10:55 Re: Strange randomization [Re: JeffS]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
WOW that is so perfect. And yeah, from the looks of the output, it's normal to see clustering.

I will be doing the FAQ entry and linking this file when I get a moment today. Busy day for me...

_________________________
Tony Fabris

Top
#165645 - 16/06/2003 11:13 Re: Strange randomization [Re: tfabris]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
WOW that is so perfect.
Glad you like it. This is probably the most coding I’ve done in the last two weeks. I actually started feeling productive!
I will be doing the FAQ entry and linking this file when I get a moment today.
My program in the FAQ? I feel so . . . honored! Truly I'm glad to have finally done something "useful" here, though I have a feeling this won't end all discussions. As I said, it's still hard to tell if the clustering is the same between my program and on the Empeg. I'm just glad I didn't end up proving the Emepg guys wrong, as I began to fear on Friday.
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165646 - 16/06/2003 11:24 Re: Strange randomization [Re: JeffS]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
What the program shows me is that it's our perceptions that make it seems like we're getting clusters and/or combs of artists. When as few as three songs by the same artist or the same album come close enough together, we start thinking "Jeez, this player is playing nothing but Metallica today!".

But what this graph shows is that it's not only expected, but it's actually common for clusters of artists and even albums to appear. And when you see the boxed clusters on the screen (nicely done, by the way), you can see that it's just a brief concentration that's not much different than the other songs in the shuffle.

The only reason we all keep thinking it's something wrong with the shuffle is because the empeg is the first player we've owned that lets us hear this many different artists in one place. So we just assume that having that many artists means we won't hear the same artist close together. But when you look at the distribution graph, we see it's still inevitable.

Too cool. Great work, thank you SO much!
_________________________
Tony Fabris

Top
#165647 - 16/06/2003 11:27 Re: Strange randomization [Re: tfabris]
JBjorgen
carpal tunnel

Registered: 19/01/2002
Posts: 3584
Loc: Columbus, OH
<-- bends over and waits for the obligatory "I told you so" from team empeg
_________________________
~ John

Top
#165648 - 16/06/2003 11:32 Re: Strange randomization [Re: JeffS]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Quick question... In the program, what's the criteria for it considering something to be a cluster? (And I wonder if the wording in the program should be called "cluster" instead of "comb" but that's not important really.)

It seems to consider any group of songs that is more than two to be a cluster (which is reasonable), but what's the distance-between-songs criteria? It seems like you've chosen a reasonable criteria for this (it seems like I'd perceive the songs to be too close together based on the boxes you've drawn), I'm just wondering what that criteria is.
_________________________
Tony Fabris

Top
#165649 - 16/06/2003 11:34 Re: Strange randomization [Re: JBjorgen]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
bends over and waits for the obligatory "I told you so" from team empeg
Yeah, agreed.

Sorry I ever doubted you guys.
_________________________
Tony Fabris

Top
#165650 - 16/06/2003 11:44 Re: Strange randomization [Re: tfabris]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
And when you see the boxed clusters on the screen (nicely done, by the way),
Thanks. As with all good software features, I put this is because I was missing it. I’d already coded the “find the most clustered album” code and realized I was having trouble identifying the clusters.
And I wonder if the wording in the program should be called "cluster" instead of "comb" but that's not important really.
I can change it to whatever you like.
It seems to consider any group of songs that is more than two to be a cluster.
Correct. I thought about flagging “two-fers”, but decided against it.
What's the distance-between-songs criteria?
Ten songs max, though I could make this settable if you wanted. This seemed like a good number because it's shorter than most album lengths, so I'd think it'd really stand out.
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165651 - 16/06/2003 12:21 Re: Strange randomization [Re: JeffS]
trs24
old hand

Registered: 20/03/2002
Posts: 729
Loc: Palo Alto, CA
OK, I don't want to start another tangent on the random fxnality, but...

What I've noticed happening on my empeg in shuffle mode is not so much a clustering of a few songs by the same artist separated by some other songs, but rather a very distinct grouping of songs by artist (or songs just close together in my playlists) back to back. For example:

Random song
Random song
Collective Soul song
Collective Soul song
Dave Matthews song
Dave Matthews song
Random song
Tom Petty song
Tom Petty song
Random song
Random song
Random song
...

This really does happen quite a bit (often enough that I find it hard to be coincidence) and I've talked with other empeg owners on this bbs who have experienced it, too. So, maybe this can still be explained with what you two have been analyzing, but I do find it odd. I really don't mind it, though.

- trs
_________________________
- trs

Top
#165652 - 16/06/2003 12:24 Re: Strange randomization [Re: trs24]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
I really wish the empeg fellas would consider opening up just the shuffle algorithm's source code to put this issue to rest. That's obviously not something they can do, but it'd certainly save a lot of discussion on this very tired topic.
_________________________
- Tony C
my empeg stuff

Top
#165653 - 16/06/2003 12:34 Re: Strange randomization [Re: tonyc]
trs24
old hand

Registered: 20/03/2002
Posts: 729
Loc: Palo Alto, CA
it'd certainly save a lot of discussion on this very tired topic.
Well, this is a discussion forum, after all.

I'm sure the randomization code is perfectly fine. And I have no qualms with the randomization of my playlists on the empeg. BUT, this is a distinct anomaly that not only I have noticed. Clustering is one thing - but back-to-back pairing of songs repeatedly over years of use is more than just a false perception on my part, I'm sure of it.

I also stream my playlists randomly through winamp and have not noticed the back-to-back pairing happen at anywhere close to the same frequency.

Anyway, it's just an anomaly I wanted to chime in with.

- trs
_________________________
- trs

Top
#165654 - 16/06/2003 12:39 Re: Strange randomization [Re: tonyc]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
it'd certainly save a lot of discussion on this very tired topic.
I don't mean to be a jerk, Tony, but if you don't like the topic of this thread, don't read it.
_________________________
Bitt Faulk

Top
#165655 - 16/06/2003 12:59 Re: Strange randomization [Re: wfaulk]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
10-4.
_________________________
- Tony C
my empeg stuff

Top
#165656 - 16/06/2003 13:07 Re: Strange randomization [Re: trs24]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
I suppose my first question to you would have to be: how many albums do you have of Collective Soul, Dave Matthews, and Tom Petty? More albums means more of a chance of a back-to-back. Also, some "greatest hits" albums can be longer than others (IIRC, Tom Petty's Greatest Hits has far more than the 12 tracks Tony's been messing with). The other piece of information is how many total tracks are you shuffling when you get this behavior?

Just plaything the program a bit I do notice quite a few back to backs, though this is generally with artists who have more than one album. If you weren't shuffling too many tracks (we've been talking around 3000) this would also change the test. You might just want to play around with it and try plugging in some numbers you think represent your data. Though back-to-backs don't get highlighted, they are still easy to see. Of course, the program doesn't show back-to-backs from multiple artists on the same grid but I still think you might be able to tell what kind of behavior is reasonable.

As for me, I typically don’t see any of this behavior because of how I’ve structured my playlists. In fact, I hardly ever use “shuffling” at all. Instead I have a special playlist that picks a single song at random from 14 artists chosen at random, and then repeats the process a dozen times or so. This effectively circumvents the “clustering” and “back to back” behavior we’ve been talking about.
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165657 - 16/06/2003 13:13 Re: Strange randomization [Re: wfaulk]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
Seeing Bitt posting reminds me I should probably include a picture of what this looks like now for the non-windows folks.


Attachments
164246-Clustering.jpg (259 downloads)

_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165658 - 16/06/2003 13:21 Re: Strange randomization [Re: JeffS]
rompel
stranger

Registered: 26/08/2000
Posts: 44
Loc: California

Clearly, there is some combing in all random selections. What I'm not sure is if the amount of combing showing up in my program is the same as on the Empeg. It's hard to tell because ultimately we are perceiving this data in a different way than listening through the playlists. But here you have it anyway.


Not being content to judge things by eye, I have been running some statistics on actual Empeg generated shuffles.

To accomplish this, I took a virgin Mk IIa and loaded 1000 short (200ms) songs into a single playlist. Setting notify=1 in the config file allowed me to capture the player-generated shuffles off the serial port. And a little scripting in minicom allowed me to put it in an unattended loop.

I actually thought I had found some subtle, but statistically significant, anomalies based on a 30 shuffle sample. But when I tested them on a second 150 shuffle sample they disappeared.

As much as I hate to admit it, I think what we have all seen is really just our human instinct to see patterns even if they aren't really there.

--John

Top
#165659 - 16/06/2003 13:30 Re: Strange randomization [Re: JeffS]
trs24
old hand

Registered: 20/03/2002
Posts: 729
Loc: Palo Alto, CA
Instead I have a special playlist that picks a single song at random from 14 artists chosen at random, and then repeats the process a dozen times or so.
Wow - how the heck do you do that?

- trs
_________________________
- trs

Top
#165660 - 16/06/2003 13:46 Re: Strange randomization [Re: trs24]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
Wow - how the heck do you do that?
It’s been discussed before and it takes a little bit of time to set up, bet here’s how I’ve got mine set up:

-First you create your "weighted shuffle" playlist and create a single playlist underneath it that has “select X tracks” checked and set to 14 (or whatever number you like. 14 tends to be a solid hour if you don’t skip any songs).
-Copy and paste the new playlist into the “weighted shuffle” playlist a dozen or so times so that it’s repeated about a dozen times.
-Now under the new playlist you just copied create a separate playlist for each artist you like.
-For each artist set the “select 1 track” option so that for each artist that’s selected you’ll only get 1 track at random
-Copy the songs you like into each of the appropriate artist playlists. You can optionally make certain songs come up more often by using similar techniques with sub-playlists at this point.

This has the effect of selecting around a hundred and fifty relatively equally weighted songs. Sometimes you do get two songs by the same artist close together (like the end of one set of 14 and the beginning of the next set), but the more artists you have the more rare this becomes. Even when it does happen, I generally find it’s not undesirable and you don’t here the same artist for at least another 14 songs.

There actually is a way to take this to another level of ridiculousness so as to NEVER get songs by the same artist close together (by making yet another sub level with half of the artists in each) but I’ve found the method outlined above works just fine.

Other people I believe simply create on list with every artist set to select one song per artist, but my method feels more like a “radio station” to me so that’s what I do.


Edited by FerretBoy (16/06/2003 13:56)
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165661 - 16/06/2003 14:01 Re: Strange randomization [Re: JeffS]
trs24
old hand

Registered: 20/03/2002
Posts: 729
Loc: Palo Alto, CA
Wow! Thanks for the tip!

- trs
_________________________
- trs

Top
#165662 - 16/06/2003 14:12 Re: Strange randomization [Re: trs24]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Random song
Random song
Collective Soul song
Collective Soul song
Dave Matthews song
Dave Matthews song
Random song
Tom Petty song
Tom Petty song
Random song
Random song
Random song
...

This really does happen quite a bit
Yup, and if you look at the output of FerretBoy's program, you can see why this is normal and common in a truly random shuffle.

It's all about perception. I was (as you are) perceiving that this is unusual because you're sitting there, in "the moment", hearing two Tom Petty songs in a row. Or three in a group of ten, or whatever. And you're thinking to yourself that's gotta be a mistake. Because all you're hearing is "that moment", that short period of, say, ten songs, while you drive to work. So any statistical clustering is going to sound like a mistake. But what you're not seeing (and what FerretBoy's program clearly shows) is where all the other Tom Petty songs are in the shuffle. And how they releate to all the other songs on the player. And once you see it in that light, suddenly some statistical clustering makes perfect sense in a random sample of that size with the artist/album criteria which makes you consider something a cluster.

See, in order to hear and perceive the true distribution of an artist or an album in the shuffle, you have to listen to the whole shuffle. And with thousands of songs, that would take days. No one ever listens to their player for days at one sitting. You listen to it in short groups, as you're driving, or working. And your perception is colored by that sub-segment of the larger statistical sample.
_________________________
Tony Fabris

Top
#165663 - 16/06/2003 14:24 Re: Strange randomization [Re: tfabris]
maczrool
pooh-bah

Registered: 13/01/2002
Posts: 1649
Loc: Louisiana, USA
Although I am far from being a statistician, everything I've heard and read suggests that there is no true random number generator. They are only pseudo random, so there is some pattern to their operation. Hence not even the Empeg is immune, although I'm sure that is not what is causing everyone's aforementioned experiences.

Stu
_________________________
If you want it to break, buy Sony!

Top
#165664 - 16/06/2003 14:27 Re: Strange randomization [Re: tfabris]
trs24
old hand

Registered: 20/03/2002
Posts: 729
Loc: Palo Alto, CA
Yeah - I suppose you're right... I just wanted to go on thinking my peg was haunted.
_________________________
- trs

Top
#165665 - 16/06/2003 14:33 Re: Strange randomization [Re: maczrool]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
there is no true random number generator
Radioactive decay works pretty well.

All this aside, explaining why an annoying thing happens makes it no (or very little) less annoying.

It would be nice if a randomization algorithm could be implemented that minimized this sort of thing. Since the empeg is playing each song only once, though, that becomes harder and harder the further you get into the playlist. So maybe trying to do it would make the shuffle seem less repetitive toward the beginning; few people probably listen to a whole-empeg shuffle all the way through, anyway.

(The simple solution I see is to generate a random number modulo the number of songs, discard any number less than, say, 40, and use that as an offset from the currently playing song. Not perfect, but probably closer to it without creating much more CPU overhead.)
_________________________
Bitt Faulk

Top
#165666 - 16/06/2003 14:49 Re: Strange randomization [Re: maczrool]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
everything I've heard and read suggests that there is no true random number generator. They are only pseudo random, so there is some pattern to their operation.
Well, all random number generators nowadays are based on input that's different each time. For example, most use the system time clock as a seed, which is a very large number when you take into account that it includes whatever the smallest increment of time the clock measures (which is going to be different depending on the chip and the code).

Agreed, that two pseudo-random numbers based on the same seed will produce the same output, but when the seed numbers are based on a time clock, (and the start trigger time is based on a human input like pressing the "go" button, or heck, even what time of day they choose to turn on the computer) you'll never be able to predict the output and it'll be different every time.

although I'm sure that is not what is causing everyone's aforementioned experiences.
Right, exactly. Whether the number is truly random or only pseudo-random doesn't apply to our discussion here.
_________________________
Tony Fabris

Top
#165667 - 16/06/2003 16:40 Re: Strange randomization [Re: JeffS]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Added the FAQ entry. It'll probably get updated as this discussion continues.
_________________________
Tony Fabris

Top
#165668 - 16/06/2003 17:58 Re: Strange randomization [Re: tfabris]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
Guys, it is always a great pleasure to read you all. I had skipped this thead completely believing that it was useless to disucss about randomness since whatever pattern you would consider random was instead, as I said, a pattern, and therefore the only way to find out if the empeg was actually randomizing was to get the code.
Instead, this beautiful discussion was going on and I was missing it. Ok, I learned the lesson, never skip a thread on the empeg bbs.

So, just for the sake of the discussion, I think we should remember that randomness does not really exist in the universe. A random output is just the outcome of a number of causes and effects that are uncontrollable and impossible to track and calculate by us poor human beings.
I'm sure you remember the beautiful illustration of the chaos theory in Jurassic Park (book or movie): IF we let a drop of water fall on the back of our hand, there's no way to know on which side it will fall on the ground, unless we calculate the wind, blood pressure, pulses of the nervous system, our emotional status, rotation fo the earth, lights around, and all the billions of factors that determine the reasons why the drop choses this path rarher than another one.
IF we could calculate and compute everyhting, we would get rid of randomness and predict perfectly the outcome. But it is too difficult. we can't . So we have to face and accept "unpredictability" .

My point is that there's no such thing as a random number generator. There is just something that can give us the impression that there is no pattern, which is an illusion in the first place. And, as we could see here, i'st an illusion we tend not to believe in, since e see patterns everywhere!

Ok, that's it with my purely "academic" (and probably wrong) contribution to the discussion. Sorry if I bored you, but was just fascinated by the issue


Edited by taym (16/06/2003 18:03)
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#165669 - 16/06/2003 19:35 Re: Strange randomization [Re: tfabris]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
Added the FAQ entry.
Looks good and should make the empeg guys proud! Speaking of whom, have they been reading this or have they just been ignore it as another "random number generator bashing thread"?
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165670 - 16/06/2003 19:45 Re: Strange randomization [Re: Taym]
Anonymous
Unregistered


And even if could calculate all those factors, the act of us observing the drop of water changes the outcome.

Top
#165671 - 16/06/2003 20:25 Re: Strange randomization [Re: Taym]
blitz
addict

Registered: 20/11/2001
Posts: 455
Loc: Texas
randomness does not really exist in the universe

What about quantum mechanics?

Top
#165672 - 17/06/2003 02:02 Re: Strange randomization [Re: blitz]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
Well, presumably there are reasons behind random behavior in Quantum Mechanics as well. Problem in that case is, I guess, that what we consider time, and therefore the cause-effect relationship between events, totally needs to be reconsidered, and decidin what comes first and what next is quite meaningless if you can manipulate time as any other dimention... Hope I did not forget the little Quantum Mechanics I studied...

Anyway a Quantumpeg is not a bad Idea... MKIV? ;D


Edited by taym (17/06/2003 02:06)
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#165673 - 17/06/2003 02:18 Re: Strange randomization [Re: tonyc]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
I really wish the empeg fellas would consider opening up just the shuffle algorithm's source code to put this issue to rest.
OK, for the first time only, live on air, we're proud to present the entire of the shuffle algorithm source code! (For the non-custom-shuffle case, anyway.)

Here it is:
std::random_shuffle(running_order.begin() + from, running_order.begin() + to);
Good, isn't it?

Peter

Top
#165674 - 17/06/2003 02:19 Re: Strange randomization [Re: JeffS]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Speaking of whom, have they been reading this or have they just been ignore it as another "random number generator bashing thread"?
Quietly confident, mate, quietly confident.

Peter

Top
#165675 - 17/06/2003 03:47 Re: Strange randomization [Re: peter]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
std::random_shuffle(running_order.begin() + from, running_order.begin() + to);
There! That oughtta shut up all of those doubters!

_________________________
- Tony C
my empeg stuff

Top
#165676 - 17/06/2003 05:49 Re: Strange randomization [Re: peter]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
OK, for the first time only, live on air, we're proud to present the entire of the shuffle algorithm source code!
Would you believe I did this very thing to one of our more "persistent" users? I actually copied and pasted the source into an email and sent it to him. Last I heard from him too, though this had more to do with massively confusing him than anything else!
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165677 - 17/06/2003 06:33 Re: Strange randomization [Re: Taym]
bonzi
pooh-bah

Registered: 13/09/1999
Posts: 2401
Loc: Croatia
Although there were many attempts to postulate 'hidden variables' behind quantum mechanical observations, and Einstein's dislike for the idea of 'God playing dice', current thinking is that the nature of events at atomic level (e.g. polarization of paticles resulting from radioactive decay) is genuinely random.
_________________________
Dragi "Bonzi" Raos Q#5196 MkII #080000376, 18GB green MkIIa #040103247, 60GB blue

Top
#165678 - 17/06/2003 06:35 Re: Strange randomization [Re: tfabris]
frog51
pooh-bah

Registered: 09/08/2000
Posts: 2091
Loc: Edinburgh, Scotland
In reply to:

Agreed, that two pseudo-random numbers based on the same seed will produce the same output, but when the seed numbers are based on a time clock, (and the start trigger time is based on a human input like pressing the "go" button, or heck, even what time of day they choose to turn on the computer) you'll never be able to predict the output and it'll be different every time.




This may seem like a good idea, but in my line of work, anyone who uses this method to generate a random number is asking for trouble. This is one of the easiest to break. We have a selection of exploits to break TCP sequence numbers so we can hijack sessions - most of which depend on system time as a seed.

See here for an amusing demonstration of the lack of randomness in computers.
_________________________
Rory
MkIIa, blue lit buttons, memory upgrade, 1Tb in Subaru Forester STi
MkII, 240Gb in Mark Lord dock
MkII, 80Gb SSD in dock

Top
#165679 - 17/06/2003 06:46 Re: Strange randomization [Re: frog51]
bonzi
pooh-bah

Registered: 13/09/1999
Posts: 2401
Loc: Croatia
This may seem like a good idea, but in my line of work, anyone who uses this method to generate a random number is asking for trouble. This is one of the easiest to break. We have a selection of exploits to break TCP sequence numbers so we can hijack sessions - most of which depend on system time as a seed.

True, but we don't need cryptograhically strong random number generator on Empeg.

Of course, the main trouble with Empeg shuffle is human propensity for pattern recognition at any cost, so to say (take, for example, Rorschach test or constelations).
_________________________
Dragi "Bonzi" Raos Q#5196 MkII #080000376, 18GB green MkIIa #040103247, 60GB blue

Top
#165680 - 17/06/2003 06:54 Re: Strange randomization [Re: bonzi]
frog51
pooh-bah

Registered: 09/08/2000
Posts: 2091
Loc: Edinburgh, Scotland
Another interesting corollary springs to mind - has anyone tried measuring how long it takes for a track by a specified artist to come up (assuming a DDD random shuffle and a reasonable similarity between numbers of albums for each artist?)

The reason I ask is that since February I have not heard a single track by Pantera, although I have 5 Pantera albums on my empeg. I have, however, heard 3 by Madonna and 3 by System of a Down.



I like Ferretboy's special playlist, though. Might take a while to do for each artist I like!
_________________________
Rory
MkIIa, blue lit buttons, memory upgrade, 1Tb in Subaru Forester STi
MkII, 240Gb in Mark Lord dock
MkII, 80Gb SSD in dock

Top
#165681 - 17/06/2003 06:55 Re: Strange randomization [Re: frog51]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
See here for an amusing demonstration of the lack of randomness in computers

That link doesn't work (trailing quote). Try this one.
_________________________
-- roger

Top
#165682 - 17/06/2003 07:39 Re: Strange randomization [Re: frog51]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
Yeah, you're right; the empeg guys should cryptographically hash the time and use _that_ as the seed. I would say "Hah! Proof that the empeg random shuffle isn't as random as it should be!", but nowhere has anyone stated that they _don't_ hash the time. Since the empeg has more than it's fair share of 'little details that make all the difference' I wouldn't like to bet against it!
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#165683 - 17/06/2003 08:40 Re: Strange randomization [Re: JeffS]
rob
carpal tunnel

Registered: 21/05/1999
Posts: 5335
Loc: Cambridge UK
Speaking of whom, have they been reading this or have they just been ignore it

I've found it vaguely entertaining. I'm not sure how many other user communities would go to the lengths of writing statistical distribution simulations

Rob

Top
#165684 - 17/06/2003 09:42 Re: Strange randomization [Re: rob]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
I'm not sure how many other user communities would go to the lengths of writing statistical distribution simulations
We are sort of unique, aren't we? Sometimes I code better than I argue (a good thing for my pocketbook), so add that to curiosity and boredom and that's what you get. Oh, and there’s probably a high statistical probability that some community somewhere would have someone who'd write a statistical analysis program to make a point!
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165685 - 18/06/2003 13:22 Re: Strange randomization [Re: tfabris]
tms13
old hand

Registered: 30/07/2001
Posts: 1115
Loc: Lochcarron and Edinburgh
In reply to:

I'm just wondering what that criteria is.


What the criteria are, Fabris! Or what the criterion is, more likely.

Now write out one hundred times, "Romani ite domum" - if it's not done by sunrise, I'll cut your balls off.
_________________________
Toby Speight
030103016 (80GB Mk2a, blue)
030102806 (0GB Mk2a, blue)

Top
#165686 - 18/06/2003 13:42 Re: Strange randomization [Re: JeffS]
tms13
old hand

Registered: 30/07/2001
Posts: 1115
Loc: Lochcarron and Edinburgh
The "obvious things that won't come up" are probably the best combinations to pick for a lottery. The reasoning being that most people shy away from these combinations, so there are likely to be fewer winners sharing the payout (assuming that's how your lottery works - it is here in the UK).

For the record, I'd like to say that I've never bought a lottery ticket (but sadly I can't, as I was once sent to buy one for someone else).
_________________________
Toby Speight
030103016 (80GB Mk2a, blue)
030102806 (0GB Mk2a, blue)

Top
#165687 - 18/06/2003 13:57 Re: Strange randomization [Re: tms13]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Now write out one hundred times, "Romani ite domum" - if it's not done by sunrise, I'll cut your balls off.
Oh, thank you, sir. Thank you, sir. Hail Caesar and everything, sir!
_________________________
Tony Fabris

Top
#165688 - 18/06/2003 14:02 Re: Strange randomization [Re: tms13]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
The reasoning being that most people shy away from these combinations, so there are likely to be fewer winners sharing the payout
Actually, the guy at Wizardofodds.com says precisely the opposite, and I think I agree with him. It only takes a handful of jokers playing "1 2 3 4 5 6 7" to really ruin the payout for you. And among all of the people playing our state lottery, I'm sure there's a lot more than just a handful of jokers. You also have the people running wheeling systems where that combination (or something similar) is one of the wheeled patterns.

For the record, I'd like to say that I've never bought a lottery ticket (but sadly I can't, as I was once sent to buy one for someone else).
I forget who first said, "the lottery is a tax on people who are bad at math." Course, I still buy the occasional ticket for the hell of it. Cheaper than dropping hundreds at blackjack. Hey, wait, I do that, too. Argh, I have too much discretionary income.
_________________________
Tony Fabris

Top
#165689 - 18/06/2003 14:06 Re: Strange randomization [Re: tfabris]
JeffS
carpal tunnel

Registered: 14/01/2002
Posts: 2858
Loc: Atlanta, GA
It only takes a handful of jokers playing "1 2 3 4 5 6 7" to really ruin the payout for you.
I was about to say this. However, picking a non-obvious run might do it for you, say 22, 23, 24, 25, 26, 27, 28. This sort of skirts the obvious runs but still is something the average person won't pick. At least I'd think so. I'm no lottery wizard or anything.
_________________________
-Jeff
Rome did not create a great empire by having meetings; they did it by killing all those who opposed them.

Top
#165690 - 18/06/2003 16:26 Re: Strange randomization [Re: tfabris]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
I forget who first said, "the lottery is a tax on people who are bad at math."


I used to think so too. I used to work for a large ISP, full of engineers and computer scientists. It's probably fair to say that the average mathematical ability there was above the national average. I changed my mind the day that one of the cafeteria girls quit.
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#165691 - 18/06/2003 22:16 Re: Strange randomization [Re: tfabris]
rob
carpal tunnel

Registered: 21/05/1999
Posts: 5335
Loc: Cambridge UK
Cheaper than dropping hundreds at blackjack. Hey, wait, I do that, too.

They have a couple of tables on the ferry to Hook of Holland... we should start practicing our two up counting technique

Top
#165692 - 19/06/2003 09:55 Re: Strange randomization [Re: rob]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Heh, you'll have to help my family restrain me from the table. The last thing we need is for me to be blowing wads of cash in unfamiliar denominations when we're oceans away from home.

Hmmm. Single deck or shoe?
_________________________
Tony Fabris

Top
#165693 - 19/06/2003 12:01 Re: Strange randomization [Re: tfabris]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
Argh, I have too much discretionary income.


If that's causing you a problem then just send it my way.
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
Page 1 of 4 1 2 3 4 >