Skip to main content
2 votes
1 answer
125 views

I was going through this article https://www.ambionics.io/blog/php-mt-rand-prediction which claims that if we use mt_rand(), we can get the seed value using two values instead of brute forcing. In the ...
Johnny's user avatar
  • 1,765
1 vote
0 answers
281 views

Recently, I came across this article which seemed pretty interesting and it talks about ways to crack Mersenne Twister. Essentially, at the end of the article we have an binary and Assembly source ...
Sergej Zivkovic's user avatar
1 vote
0 answers
108 views

I have this algorithm for shuffling, I am trying to replace the Rand with Mersenne as an enhancement since Mersenne is more efficient and produces much randomness compared to rand according to what I'...
Shom's user avatar
  • 11
0 votes
0 answers
148 views

I wrote and tested the following program (i.e. timed it using strace -c command) and there was no meaningful difference between the execution times of the one that fully seeds the engine and the other ...
digito_evo's user avatar
  • 3,735
0 votes
0 answers
278 views

How can I get the current seed from the current RNG state in R? For instance, a <- 1987 set.seed(a) b <- .Random.seed How can I retrieve a (i.e., 1987) from b? Thank you.
jsbach's user avatar
  • 101
3 votes
0 answers
305 views

Issue: On R, running the function below leads to different seeds generation (and different set of random number) on 2 different machines but with the same starting seed with Mersenne-Twister algorithm:...
Florimond's user avatar
0 votes
1 answer
1k views

I have some code that I use a (old) Mersenne Twister header file with to get a good pseudo-random number generator. The problem is that that code uses the register keyword which (as far as I ...
villaa's user avatar
  • 1,269
0 votes
1 answer
108 views

I've often heard that you should never mod the result of your random number generator if you want a uniform distribution. However, I've seen that using a std::uniform_int_distribution makes no ...
Trevor Hickey's user avatar
0 votes
1 answer
303 views

I found this snippet online along with this Stackoverflow post which converts it into a TypeScript class. I basically copy and pasted it verbatim (because I am not qualified to modify this sort of ...
Ryan Peschel's user avatar
0 votes
1 answer
357 views

I read that in version by Python 2.3 https://stackless.readthedocs.io/en/2.7-slp/library/random.html the Mersenne twister replaced the Wichmann-Hill method as default generator. I was wondering if ...
Viktor Jeppesen's user avatar
0 votes
0 answers
82 views

I am trying to translate the book Game Coding Complete by Mike McShaffry 4E to modern C++17 standard and faced with the code of Mersenne Twister by Takuji Nishimura and Makoto Matsumoto. Is it right ...
Greck's user avatar
  • 189
0 votes
0 answers
182 views

I have a Monte Carlo code and need to run many simulations in parallel using MPI. I would like to be sure that the numbers that are generated in each simulation belong to a different sequence. Here is ...
Angelos's user avatar
  • 199
2 votes
2 answers
733 views

int generator I currently generate deterministic pseudo-random ints using this code: #include <chrono> #include <ctime> #include <random> #include <stdint.h> const uint32_t ...
0liveradam8's user avatar
1 vote
1 answer
331 views

I have the following generic C++ generic URNG function: template<class URNG> void TestURNG(URNG& urng) { // Uniform distribution used with vector // Distribution is [-5, 5] ...
khteh's user avatar
  • 4,280
0 votes
0 answers
104 views

On C++, I am using random_device to seed my 64-bit mersenne twister as follows: random_device rand_dev; mt19937_64 mersenne_generator(rand_dev()); And then calling the distribution function inside ...
jeremy.ebg's user avatar

15 30 50 per page
1
2 3 4 5
12