-
Data: 2016-10-07 02:58:28
Temat: Re: testowanie generatorów liczb losowych (kontynuacja)
Od: bartekltg <b...@g...com> szukaj wiadomości tego autora
[ pokaż wszystkie nagłówki ]On 06.10.2016 22:42, M.M. wrote:
> Trudno uwierzyć, ale widać czarno na białym, że mt19937_1998
> wg diehardera nie przechodzi testu birthdays. dieharder ma
> problem, MT, ja coś źle robię?
>
>
>
> time dieharder -d 0 -g 15 -m 1000
> #===================================================
==========================#
> # dieharder version 3.31.1 Copyright 2003 Robert G. Brown #
> #===================================================
==========================#
> rng_name |rands/second| Seed |
> mt19937_1998| 1.12e+07 | 502159522|
> #===================================================
==========================#
> test_name |ntup| tsamples |psamples| p-value |Assessment
> #===================================================
==========================#
> diehard_birthdays| 0| 100| 100000|0.00000458| WEAK
>
> real 31m42.178s
> user 31m31.855s
> sys 0m6.840s
>
>
>
> time dieharder -d 0 -g 15 -m 5000
> #===================================================
==========================#
> # dieharder version 3.31.1 Copyright 2003 Robert G. Brown #
> #===================================================
==========================#
> rng_name |rands/second| Seed |
> mt19937_1998| 4.32e+06 |2158334279|
> #===================================================
==========================#
> test_name |ntup| tsamples |psamples| p-value |Assessment
> #===================================================
==========================#
> diehard_birthdays| 0| 100| 100000|0.00000000| FAILED
>
> real 39m10.705s
> user 39m3.746s
> sys 0m4.479s
>
Jedna sptawa, to ta flaga:
-k ks_flag - ks_flag
0 is fast but slightly sloppy for psamples > 4999 (default).
//A Ty yżywasz p=100 000
...
2 is very slow and accurate to machine precision.
...
Druga opcja, którą mozęsz się zainteresować to testowanie do upadłego,
zwłąszczą uwagami. To nie musi być problem generatora, ale może być i
testu, bo niekoniecznie są one numerycznie stabilne z wystarczającą
dokłądnośćią, a nieraz i ich teoretyczny rozkład jest dla wersji
asymptotycznej (hmm, w sumie wtedy może zwiększenie -t ).
-Y Xtrategy - the Xtrategy flag controls the new 'test to failure' (T2F)
modes. These flags and their modes act as follows:
...
2 - 'test to destruction' (T2D) mode. Sometimes you just want to know
where or if a generator will .I ever fail a test (or test series).
-Y 2
causes psamples to be added 100 at a time until a test returns an
overall pvalue lower than the failure threshold or a specified maximum
number of psamples (see -P) is reached.
Note well! In this mode one may well fail due to the alternate
null hypothesis -- the test itself is a bad test and fails! Many
dieharder tests, despite our best efforts, are numerically unstable or
have only approximately known target statistics or are straight up
asymptotic results, and will eventually return a failing result
even for
a gold-standard generator (such as AES), or for the hypercautious the
XOR generator with AES, threefish, kiss, all loaded at once and xor'd
together. It is therefore safest to use this mode comparatively,
executing a T2D run on AES to get an idea of the test failure
threshold(s) (something I will eventually do and publish on the web so
everybody doesn't have to do it independently) and then running it on
your target generator. Failure with numbers of psamples within an
order
of magnitude of the AES thresholds should probably be considered
possible test failures, not generator failures. Failures at levels
significantly less than the known gold standard generator failure
thresholds are, of course, probably failures of the generator.
This option should only be used with -k 2.
MT nie jest też generatorem idealnym.
W dokumentacji, chyba nie ma online, jest w paczce w
.../dieharder-3.31.1/manual/ jako TeX (trzeba skompilować)
Jest tam rozdział o bracei tego generatora
7.0.1 A Good Generator: mt19937 1999
I po nastu stronach wyników jest omówienie. Czego nie przechodzi,
co przechodzi. I ejst tam też to:
We then begin on the Diehard tests. The test passes the birthday test,
but examining
the distribution produced we can see that the pass is a bit "marginal",
in the sense that
p isn't terribly uniformly distributed. When this happens, one may want
to rerun the
particular test a few times to see if the features in the histogram vary
or are systematic.
Alternatively, rerunning it with a larger value of KS samples with e.g.
-p 1000 or more
may push it into unambiguous failure and in fact it does. This is a
marginal result,
and a sample of random numbers far smaller than what would be used in
any numerical
simulation will unambiguously fail the Diehard birthdays test.
Zawalenie _już_ przy -p 1000 jest przewidywane (choć ten tekst jak i
cała ksiazeczka jest niewiele zmieniana od wielu wersji, może coś
poprawili w kodzie).
O co chodzi w ostatneim, wydaje się najważniejszym, zdaniu,
nie mam pojęćia.
Dokręciły się testy:
time dieharder -d 0 -g 15 -m 1000
#===================================================
==========================#
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown
#
#===================================================
==========================#
rng_name |rands/second| Seed |
mt19937_1998| 1.68e+07 |2613656395|
#===================================================
==========================#
test_name |ntup| tsamples |psamples| p-value |Assessment
#===================================================
==========================#
diehard_birthdays| 0| 100| 100000|0.00006613| WEAK
real 22m53.588s
user 22m48.928s
sys 0m0.884s
time dieharder -d 0 -g 15 -m 1000 -k 2
#===================================================
==========================#
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown
#
#===================================================
==========================#
rng_name |rands/second| Seed |
mt19937_1998| 1.71e+07 |3645920823|
#===================================================
==========================#
test_name |ntup| tsamples |psamples| p-value |Assessment
#===================================================
==========================#
diehard_birthdays| 0| 100| 100000|0.00000002| FAILED
real 39m30.472s
user 39m14.048s
sys 0m5.244s
time dieharder -d 0 -g 15 -m 5000 -k 2
#===================================================
==========================#
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown
#
#===================================================
==========================#
rng_name |rands/second| Seed |
mt19937_1998| 6.62e+06 |2144839991|
#===================================================
==========================#
test_name |ntup| tsamples |psamples| p-value |Assessment
#===================================================
==========================#
diehard_birthdays| 0| 100| 100000|0.00000012| FAILED
real 42m33.697s
user 42m25.048s
sys 0m4.516s
Za poradą z pdfa, ten sam test, twardszy generator,
chyba jednak to już wina testu/implementacji
time dieharder -d 0 -g 205 -m 1000 -k 2
#===================================================
==========================#
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown
#
#===================================================
==========================#
rng_name |rands/second| Seed |
AES_OFB| 5.17e+06 |3983713961|
#===================================================
==========================#
test_name |ntup| tsamples |psamples| p-value |Assessment
#===================================================
==========================#
diehard_birthdays| 0| 100| 100000|0.00003436| WEAK
real 34m53.133s
user 34m47.464s
sys 0m4.556s
time dieharder -d 0 -g 205 -m 5000 -k 2
#===================================================
==========================#
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown
#
#===================================================
==========================#
rng_name |rands/second| Seed |
AES_OFB| 1.98e+06 | 373043125|
#===================================================
==========================#
test_name |ntup| tsamples |psamples| p-value |Assessment
#===================================================
==========================#
diehard_birthdays| 0| 100| 100000|0.00000176| WEAK
real 56m56.810s
user 56m31.972s
sys 0m22.432s
pzdr
bartekltg
Następne wpisy z tego wątku
- 07.10.16 03:18 M.M.
- 07.10.16 15:00 Borneq
- 07.10.16 15:20 M.M.
- 07.10.16 16:39 bartekltg
- 07.10.16 16:47 bartekltg
- 07.10.16 16:51 M.M.
- 07.10.16 17:00 bartekltg
- 07.10.16 17:20 bartekltg
- 07.10.16 17:21 M.M.
- 07.10.16 17:23 Borneq
- 07.10.16 18:02 bartekltg
- 07.10.16 19:40 M.M.
- 07.10.16 19:58 bartekltg
- 08.10.16 00:25 M.M.
- 08.10.16 02:32 M.M.
Najnowsze wątki z tej grupy
- Xiaomi [Chiny - przyp. JMJ] produkuje w całkowitych ciemnościach i bez ludzi
- Prezydent SZAP/USONA Trump ułaskawił prezydenta Hondurasu Hernandeza skazanego na 45 lat więzienia
- Rosjanie chwalą się prototypem komputera kwantowego. "Najważniejszy projekt naukowy Rosji"
- A Szwajcarzy kombinują tak: FinalSpark grows human neurons from stem cells and connects them to electrode arrays
- Re: Najgorszy język programowania
- NOWY: 2025-09-29 Alg., Strukt. Danych i Tech. Prog. - komentarz.pdf
- Na grupie comp.os.linux.advocacy CrudeSausage twierdzi, że Micro$lop używa SI do szyfrowania formatu dok. XML
- Błąd w Sofcie Powodem Wymiany 3 Duńskich Fregat Typu Iver Huitfeldt
- Grok zaczął nadużywać wulgaryzmów i wprost obrażać niektóre znane osoby
- Can you activate BMW 48V 10Ah Li-Ion battery, connecting to CAN-USB laptop interface ?
- We Wrocławiu ruszyła Odra 5, pierwszy w Polsce komputer kwantowy z nadprzewodzącymi kubitami
- Ada-Europe - AEiC 2025 early registration deadline imminent
- John Carmack twierdzi, że gdyby gry były optymalizowane, to wystarczyły by stare kompy
- Ada-Europe Int.Conf. Reliable Software Technologies, AEiC 2025
- Linuks od wer. 6.15 przestanie wspierać procesory 486 i będzie wymagać min. Pentium
Najnowsze wątki
- 2026-01-15 Zawory termostatyczne
- 2026-01-15 Białystok => Solution Architect (Workday) - Legal Systems <=
- 2026-01-15 Proces KARNY Braunowi (KPP) POLITYCZNIE służy? [+0.7% miesięcznie 2 razy]
- 2026-01-15 Białystok => Frontend Developer React <=
- 2026-01-15 Konto na zdalnym NAS - jak zabezpieczyc pliki?
- 2026-01-15 Myślenice => Junior SAP CO Consultant <=
- 2026-01-15 Wyjaśnienie patologii opisanej w art. pt. "Przeciw bezkarności biznesu"
- 2026-01-15 Wyjaśnienie patologii opisanej w art. pt. "Przeciw bezkarności biznesu"
- 2026-01-15 "deficyt budżetowy [na 2026r. -przyp. JMJ] jest prognozowany na poziomie 271,7"Gzł, czyli 74.52G$
- 2026-01-15 Miliardy z podatków znów popłynęły do TVP
- 2026-01-14 #Motodziennik test - Jaecoo E5 - słabe auto, słaby elektryk. A ZIMĄ NAWET BARDZO
- 2026-01-14 Piaseczno cd
- 2026-01-14 Robert do ciebie
- 2026-01-14 Prątki to zawalidrogi
- 2026-01-14 Naruszenie immunitetu ZP-RE Romanowskiego bezkarne (umorzenie śledztwa żurkotury)




5 Najlepszych Programów do Księgowości w Chmurze - Ranking i Porównanie [2025]