I have an online radio station driven by AI that I am trying to expand upon:

<url snipped>

The AI in place works fine (on the most part - one or two bugs to still iron out) but will not be good enough for when I take the site to the next stage.

To make a long story short, I need to find an easy (non-CPU-expensive) way of taking let's say 100 or 100 000 tracks and scrambling their order in the same way a CD player would, without dropping a single track or making a repeat of the same track anywhere along the way.

I know there are a lot of great random generator strategies to deploy, but I have yet to find a solid solution (ideally built in c#.net) that would help me solve this particular problem. I have made an interim solution for myself but once again I would like to improve upon it. Any suggestions? Or does anyone have a good site that they can point me to?

Well make a 2 dimensional array wich has the same number of cells (or whatever I can't remember how you say it in english) as the number of songs you have on the list, and add a number to every entery cell randomly, and then arrange the cells in order by the numbers you have assigned to them. That would be a simple enough solution.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.