The tag has no wiki summary.

learn more… | top users | synonyms

38
votes
4answers
1k views

How do functional languages handle random numbers?

What I mean about that is that in nearly every tutorial I've read about functional languages, is that one of the great things about functions, is that if you call a function with the same parameters ...
3
votes
3answers
331 views

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 ...
-1
votes
2answers
115 views

Algorithm to increase odds of matching when randomly selecting [closed]

I am building a mobile game loosely based on dual n-back http://brainworkshop.sourceforge.net/tutorial.html Now with the game I have 9 squares (numbered 1 through 9) and 9 letters (A through K) In ...
0
votes
2answers
243 views

Can an 81 digit number generator lead to copyright infringement? [closed]

I'm looking to write a program that will generate valid sudoku puzzles. Essentially, a sudoku puzzle is just an 81 digit number. (The blanks are zeroes.) I would then like to use these puzzles in an ...
0
votes
4answers
282 views

Is there such a thing as truly random? [closed]

I saw a video about random numbers and how the programmer in that video was talking about computers generating pseudo random numbers and that they are not really random. I knew about this. Then he ...
3
votes
2answers
123 views

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. Most random number generators in ...
2
votes
4answers
153 views

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 ...
1
vote
6answers
304 views

Randomly select from list with increased odds

I have a list of entities. Every entity contains a number that holds how many times the entity has been selected. I need to make a function that selects n (say 25%) of the entities, randomly. What I ...
4
votes
2answers
137 views

Determinism of functions using PRNG in Clojure and functional languages

I'm a bit surprised by a sentence found in the book "Clojure Programming" (1st [and only as I write this!?] edition), page 78: It should be obvious that it's impossible to deterministically test a ...
2
votes
3answers
211 views

is Microsoft LC random generator patented?

I need a very simple pseudo random generator (no any specific quality requirements) and I found Microsoft's variant of LCG algorithm used for rand() C runtime library function fit my needs (gcc's one ...
2
votes
5answers
420 views

How to create a random generator

How could a random generator be implemented? I'm not speaking about the invocation of a language mathRandom() method, but the implementation of the routines that lead to generate numbers totally ...
19
votes
3answers
1k views

Can you use Pi as a crude random number generator?

I recently saw this question over at math.SE. It got me thinking. Could Pi be used as a crude random number generator? I mean the results are well known(how long has pi been computed to now?) but, Pi ...
10
votes
4answers
273 views

What are best practices for testing programs with stochastic behavior?

Doing R&D work, I often find myself writing programs that have some large degree of randomness in their behavior. For example, when I work in Genetic Programming, I often write programs that ...
4
votes
2answers
822 views

How to generate random numbers without making new Random objects?

I'm using this as part of a game, but it's not really a game development question, so I'm putting it on this more general Stack Exchange. The goal is to generate "random" outputs for a fixed integer ...
41
votes
10answers
3k views

How should I test randomness?

Consider a method to randomly shuffle elements in an array. How would you write a simple yet robust unit test to make sure that this is working? I've come up with two ideas, both of which have ...
26
votes
12answers
2k views

Unit-testing of inherently random/non-deterministic algorithms

My current project, succinctly, involves the creation of "constrainably-random events". I'm basically generating a schedule of inspections. Some of them are based on strict schedule constraints; you ...
8
votes
5answers
3k views

UUID collisions

Has anybody done any real research on the probability of UUID collisions, especially with version 4 (random) UUIDs, given that the random number generators we use aren't truly random and that we might ...
27
votes
10answers
3k views

Why is it impossible to produce truly random numbers?

I was trying to solve a hobby problem that required generating a million random numbers. But I quickly realized, it is becoming difficult to make them unique. I picked up Algorithm Design Manual to ...
3
votes
1answer
637 views

PHP rand function (or not so rand)

I was testing PHP rand function to write on a image. Of course the output shows that it's not so random. The code I used: <?php header('Content-Type: image/png'); $lenght = 512; $im = ...
3
votes
1answer
955 views

How does minecraft use a seed to generate a completely unique world?

In minecraft, before creating a world you have an option to input a seed. The algorithm takes the seed and creates a completely unique world. How does this work?
1
vote
1answer
85 views

Random number for HTTPS MAC

Recently I found that Netscape used quite simple algorithm to generate random number for Message Authentication Code to establish an HTTPS connection (Nestscpe used time, process identification ...
7
votes
5answers
3k views

I need a true random number generator web service

I need a way to get non-deterministic random numbers on demand for my application. However i do not wish/have the capabilities to build the hardware myself, thus I'm looking for a web service which ...
14
votes
3answers
2k views

Predicting the output of PHP's rand()

I've read in numerous sources that the output of PHP's rand() is predictable as its a PRNG, and I mostly accept that as fact simply because I've seen it in so many places. I'm interested in a ...
24
votes
11answers
2k views

Random number generation algorithm for human brains?

Are you aware of, or have you devised, any practical, simple-to-learn "in-head" algorithms that let humans generate (somewhat "true") random numbers? By "in-head" I mean.. preferrably without any ...