1
vote
3answers
357 views

When calling for a random integer from 1-6, how can I make it gradually get less likely to pick a number the bigger it is? [duplicate]

Like having 1 be the most common number and 6 be the least common number. And everything else just leveling out.
1
vote
2answers
129 views

What should I use as a random seed in a Brainfuck?

As I understand it, most pseudo-random algorithms work by taking one or more truly random longs, such as the date, time, MAC-Address, serial-number, etc., passing them through a complex series of ...
-4
votes
1answer
143 views

What's the algorithm of “Shuffle Mode” in audio/music players [closed]

I was researching on how is the "Shuffle mode" in music players implemented and what is the algorithm behind this. How it makes sure that any songs won't repeat? What's the most efficient algorithm ...
0
votes
0answers
159 views

Performance of a Skip-List algorithm

Here is a simple code for a randomized skip-list: Coin_Side flip() { if ( random() % 2 == 0 ) return HEADS; else return TAILS; } Note: random() returns an integer that uses ...
44
votes
4answers
2k 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
531 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 ...
3
votes
4answers
818 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 ...
2
votes
6answers
754 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 ...
3
votes
5answers
705 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 ...
5
votes
3answers
1k 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 ...