title: C++ RNG (Mersenne Twister) needs seed
body: <p>I have written a RNG class which holds different algorithms, however it does not work as expected. Besides the fact that i want use normal (rather than uniform) distribution my code always returns either the same number (max) or just 2 numbers out of the interval [min,max]:</p>
  
  <pre><code>std::function&lt;int(int, int)&gt; mt19937 =
      [](int min, int max) -&gt; int {
          std::uniform_int_distribution&lt;int&gt; distribution(min, max);
          std::mt19937 engine;
          engine.seed(time(null));
          auto generator = std::bind(distribution, engine);
          return generator();
      };
  </code></pre>
  
  <p>Can anyone explain me what is missing to solve this puzzle? Furthermore, how can i implement normal distribution? Last time i tried out <code>std::normal_distribution</code> i was not able to enter bounds!</p>
  
  <p>EDIT: When i speak of a normal distribution i mean that the results of the RNG near the two bounds should not be generated as often as the mean of both. E.g. look at the graphical representation of the standard Gauss distribution. I am referring to it because it visualizes the probabilities of the resulting values which i want to implement/use this way, if you understand.</p>