Understanding M. E. O'Neill’s PCG generator. Part 3

This is the third and final part of a three-part article about my attempt to understand the PCG generator. If you haven't read the previous one then it may be a good idea to do so (assuming you want to read this one, that is). The previous part looked at the structure of the various output functions that are described in O'Neill’s report and paper. This part looks at the so-called ‘named generators’ that are provided by the C++ implementation and tries to reconstruct one of them.

ONeill (2014) says:

‘… although the generators are presented with mnemonic names based on the permutations they perform, users of the PCG library should rarely select family members by these mnemonics. The library provides named generators based on their properties, not their underlying implementations …’

The file ‘/include/pcg_random.hpp’ in the archive pcg-cpp-0.98.zip contains 42 such ‘named generators’, but a single article only has enough space to to look at one. The question is, which one?

Read more

Understanding M. E. O'Neill’s PCG generator. Part 2

This is the second part of a three-part article about my attempt to understand the PCG generator. If you haven't read the first one then it may be a good idea to do so (assuming you want to read this one, that is). In particular, you may find yourself needing to refer to the descriptions of O'Neill’s creative new symbols, which are located at the end. The previous part looked at the underlying ideas that motivated the development of the method, and this one begins to delve into the details by looking at the various output functions that are described in O'Neill’s report and paper. The next and final one will try to reconstruct one of ‘named generators’ that are provided by the C++ implementation.

Read more

Understanding M. E. O'Neill’s PCG generator. Part 1

Since it was first made public in 2014 M. E. O'Neill’s ‘permuted congruential generator’ (PCG) has become very popular and has been adopted by several high profile projects. For example the ‘Numpy’ package for the Python programming language and the ‘dqrng’ package for the ‘R’ programming language both include a PCG generator.

O'Neill describes its origin thus:

… Thanksgiving break of 2013. Looking for an escape from a stack of midterms I had to grade, … I saw a fun programming challenge …
(O'Neill, 2017)

Not bad for a holiday diversion!

Read more