Table of Contents
Preface
Acknowledgements
Part 1. Preliminaries
Chapter 1. Introduction
1.1 On Randomness
1.1.1 A General Idea
1.1.2 Ontic Randomness
1.1.3 Epistemic Randomness
1.1.4 Pseudo-Randomness
1.1.5 Telescopic Randomness
1.2 Entropy and Randomness
1.2.1 Discussion
1.2.2 An Example
1.3 The Macroscopic View
1.4 Applications of Randomness
1.4.1 Cryptography
1.4.2 Law
1.4.3 Scientific Computing
1.4.4 Generative Art
1.4.5 Interactive Entertainment
Chapter 2. Pseudorandom Number Generation
2.1 Early Algorithms
2.2 The Era of LCGs
2.2.1 Algorithms and Illustrations
2.2.2 Getting the Maximum Cycle Length
2.2.3 Drawback of LCGs
2.3 Fibonacci Generators
2.4 Paradigm Shift
2.5 The Mersenne Twister
2.5.1 An Overview of the Algorithm
2.5.2 Explanation of Algorithm 2.6
2.5.3 State of the Art
2.6 Bitwise XORs, Shifts, and Rotations
2.7 Java’s SplitMix
2.8 Permuted Congruential Generator
2.9 Pseudorandom Hash Functions
Chapter 3. The V Programming Language
3.1 About V
3.2 Installing V
3.3 Sample Project Workflow
3.3.1 Creating a New Project
3.3.2 Formatting the Source Code
3.3.3 Running the Project
3.4 The Rand Module
3.5 “Why not [X]?”
Part 2. Concrete Experiments
Chapter 4. Methodology
4.1 Implementing an RNG in V
4.1.1 The Nothing Baseline Generator
4.2 Primary Experiment
4.2.1 An Overview
4.2.2 Organisation
4.2.3 Multi-threading using Contexts
4.3 Measuring Quality
4.3.1 Overview
4.3.2 The Ent Tool
4.3.3 The dieharder Utility
4.3.4 Classical Statistical Tests
4.4 Measuring Performance
4.4.1 Caveats
4.4.2 The Burn Period
4.5 Reporting
4.5.1 Aggregatio
4.5.2 Logging
4.5.3 Notification
4.6 Test Machines
4.7 Running the Test Bench
4.8 Secondary Experiments
4.8.1 Cycle Length Detection
4.8.2 Checking for Improper Seeds
Chapter 5. Observations
5.1 Statistical Quality
5.2 Performance
5.3 Cycle Length Detection
5.4 Improper Seed Detection
Part 3. Lessons and Advice
Chapter 6. Conclusion
6.1 The Generators
6.1.1 Baseline – nothing
6.1.2 System RNG
6.1.3 MT19937
6.1.4 Musl
6.1.5 XOROSHIRO128++ and XOSHIRO256++
6.1.6 PCG32
6.1.7 SplitMix
6.1.8 WyRand
6.2 Modelling a Generator
6.2.1 State of the Art
6.2.2 The Bigger Picture
6.2.3 A Better Generator
6.3 Advice for Future Explorers
6.3.1 Increasing Period Length
6.3.2 Choosing between Performance and Quality
About the Authors
Author’s ORCID iD
Soubhik Chakraborty – 0000-0003-3530-9027
Subhomoy Haldar – 0000-0001-7458-8685