Rockbox General > Rockbox General Discussion

Random folder advance on Clip+ may have insufficient entropy

(1/1)

Tor:
A subjective topic at best, but I've been observing some of this for a while, and just found another example that pushed me to ask.  I suspect that my 250+ line list has some effect on my finding this an issue.

For a while it has seemed like I get some folders (most of them with one song) playing more often than others - and that some songs would tend to show up more at some times of the day than others.  Subjective judgement, since I haven't kept detailed records.

Then, for several days I had set an alarm and started it with the same song from the same folder, and found that after a few folder changes it was playing the same thing at the same time of day.  Proof that time of day is the sole source of entropy (well, length of song just played could be added in without an observable difference, but from observation I doubt it), and indicative of an issue (IMO).  I also had looked for the starting song that showed this "issue" through the random advance, and then once about a half hour earlier in the day couldn't get it to come up.  At about the time I had been finding it I was easily able to get it to come up.

Since the last observation I have wondered at it, but not had anything I could pin down, until I just added a new album of 13 songs in 13 folders.  The player has played only about half the new songs so far, but has played every one of those at least twice and some of them more like five times.  I'll grant that I have not kept a detailed list, but the album is one I once listened to a lot, so I know it well, but had not listened to in a long time.

Not an easy one to pin down, and I make no claims to be an expert in randomness, but I hope I have produced enough documentation to make a good first report, at a minimum.

saratoga:
The random number generator is quite strong so your subjective impressions are probably not correct. The random folder advance feature does use the current tick as a seed though so if you hit insert at the same millisecond you will get the same list every time.

Tor:
Ah.  Figured it had to be based on current time to some precision based on the same start point by alarm being repeatable.  Means there are only 288 possible random alarm playlists for a given folder list and starting position.  Arguably low, but I think sufficient for most (maybe all) practical purposes.

Only my observations since adding the last album gave me anything that seemed like actual data, since I know humans are terrible at assessing randomness.  I simply included it since I had something that seemed worth at least asking about.  Interestingly, in the eight hours or so of playing since my post I've gotten one new song from that album, a repeat of one of the most repeated songs from it, and a third rendition of another song.  No sufficient for proof, but it seemed odd to get such piles of some songs from a subset without hitting others in the subset at all.  Either that or the Random Number God is toying with me:)

Given a 1ms tick, though, that suggests that each of my songs should have just shy of four chances of playing per second.  I'll agree that that should be enough that any decent PRNG should be able to produce good randomness.  Of course proving this either way is confounded by the extreme instability of the RFA playlist, changing any time the player is paused.

On another, possibly related note, I've experienced my player locking up when I've (randomly) moved ahead across folders using next track a few times.  Never happened with only a single skip, and only occasionally with a series.  Other longer series are fine.  I do have a few bad directories in my list though that could use to be pruned, if this is a possible cause.

Navigation

[0] Message Index

Go to full version