Re "So my question is how to use MersenneTwister in the first line to generate different numbers each time it is evaluated?" Use SeedRandom with the Method option but without the seed.
BlockRandom[SeedRandom[Method->"MersenneTwister"];RandomReal[1,5]]
Update
Re you question in comment "my question is if the numbers are random, then how to tell when I am using the Method-> "MersenneTwister" as opposed to not using it later on?": You can use the fact that they are really pseudo random, i.e. deterministic! See next function:
getRandomMethod :=
Module[{val, range = 2^8,
methods = {"Congruential", "ExtendedCA", "MersenneTwister", "MKL",
"Rule30CA"}},
SeedRandom[1];
val = RandomInteger[range];
BlockRandom[
Do[
SeedRandom[1, Method -> m];
If[RandomInteger[range] == val, Return[m]],
{m, methods}
]
]
];
which allows you to do something like:
In[9]:= SeedRandom[45, Method -> "MKL"]; getRandomMethod
Out[9]= "MKL"
Beware that getRandomMethod affects the current generator as it resets the seed. If you don't like this and want to keep track of the current method, I would keep it in a local variable.
Also, as witnessed by the following
Do[SeedRandom[1, Method -> m];
Print[{m, RandomInteger[256], RandomInteger[256],
RandomInteger[256]}],
{m, {"Congruential", "ExtendedCA", "Legacy", "MersenneTwister",
"MKL", "Rule30CA"}}];
{Congruential,58,71,123}
{ExtendedCA,134,31,228}
{Legacy,237,146,124}
{MersenneTwister,201,255,235}
{MKL,214,42,10}
{Rule30CA,237,146,124}
Rule30CA and Legacy are really the same. That's why I omit legacy in implementation above.
RandomSeedeither. – m_goldberg Nov 19 '12 at 5:49SeedRandom.RandomSeedis obsolete. – István Zachar Nov 19 '12 at 8:42