goldenseed
Deterministic entropy streams for reproducible testing and procedural generation. Perfect 50/50 statistical distribution with hash verification. Not cryptographically secure - use for testing, worldgen, and scenarios where reproducibility matters more than unpredictability.
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
Deterministic entropy streams for reproducible testing and procedural generation. Perfect 50/50 statistical distribution with hash verification. Not cryptographically secure - use for testing, worldgen, and scenarios where reproducibility matters more than unpredictability.
How to use
Zainstaluj pakiet poleceniem pip install golden-seed w swoim środowisku Python.
Zaimportuj klasę UniversalQKD z modułu gq: from gq import UniversalQKD.
Utwórz generator z domyślnym ziarnem, wpisując gen = UniversalQKD(). Każde nowe wywołanie UniversalQKD() tworzy generator z tym samym ziarnem, co gwarantuje identyczne wyniki.
Generuj 16-bajtowe porcje danych poleceniem chunk = next(gen). Powtórz to tyle razy, ile potrzebujesz bajtów. Każde wywołanie next() zwraca kolejny blok z deterministycznego strumienia.
Weryfikuj powtarzalność, tworząc dwa niezależne generatory i porównując ich wyjścia: gen1 = UniversalQKD() i gen2 = UniversalQKD(), a następnie assert next(gen1) == next(gen2). Asercja zawsze przejdzie, ponieważ oba generatory mają identyczne ziarna.
Do testów statystycznych (np. rzutu monetą) wyciągnij poszczególne bity z bajtów – na przykład byte & 1 zwraca najmniej znaczący bit, który możesz użyć jako wyniku rzutu (0 lub 1). Powtórz dla milionów iteracji, aby potwierdzić rozkład 50/50.