Relative Content

Tag Archive for random

idquantique .vs. rdrand

We are currently looking at using the idquantique random number generator device to provide random numbers. There are some issues though. We would only be using one device and we have at least 5 servers that would need to use it and this number will probably increase in the future. This implies that blocks of random numbers would have to be sent to the servers in some way. All the servers are running Linux.

Randomness of wrapped RNG

There are plenty of questions around regarding random number generation, but I couldn’t find anything that exactly matched my question. Apologies if I missed one.

python random with a skew

I am trying to create a very simple evolution algorithm for a creature simulator, what I would like to have is, both creatures have a trait and a dominance level, both noted by ints. their child’s trait will be a random number between creature A’s trait and creature B’s trait then skewed to the more dominant. So if A has a trait of 5 and dominance of 2 and B has a trait of 10 and a dominance of 7, the skew will be -5 so it skews more towards B. Their child is more likely to have a trait of 8 than 6. Is there a good way to do this?
I visualise it ending up like this:
A5-6–7—8—-9—–10B

I’d like to write an “ultimate shuffle” algorithm to sort my mp3 collection

I’m looking for pseudocode suggestions for sorting my mp3 files in a way that avoids title and artist repetition. I listen to crooners – Frank Sinatra, Tony Bennett, Ella Fitzgerald etc. singing old standards. Each artist records many of the same songs – Fly Me To The Moon, The Way You Look Tonight, Stardust etc. My goal is to arrange the songs (or order the playlist) with the maximum space between artists and song titles. So if I have 2000 songs and 20 are by Ella I’d like to hear her only once in every 100 songs. If 10 artists sing Fly Me To The Moon I’d like to hear it once in every 200 songs. Of course I want to combine these two requirements to create my “ultimate shuffle”.

How to generate random numbers with a (negative) sloping distribution?

Given a maximum integer value M, I want to generate N integer values that are distributed with a lower frequency when approaching M (preferably M should still have a non-zero probability).
I don’t really care much about the probability function, let’s assume (half of) a normal distribution.

How to generate random numbers with a (negative) sloping distribution?

Given a maximum integer value M, I want to generate N integer values that are distributed with a lower frequency when approaching M (preferably M should still have a non-zero probability).
I don’t really care much about the probability function, let’s assume (half of) a normal distribution.

Guid collisions

I have a product that lets game developers create games. Inside of their games they are required to give all the elements of their games GUIDs. I’ve told them that they need to generate their guids using a specific mechanism, but they seem to think that it won’t cause any issues. What I’m concerned about is GUID collisions between games.