Checking the state of panmixy.
In such a population, there is a relation between various genotypes and allelic frequencies.
For instance:
f(homozygous 1)= f(allele 1)2 , f(heterozygous)=2 x f(allele 1) x f(allele 2) , f(homozygous 2) = f(allele 2)2
The software checks panmictic state by computing the following sum.
[f(homozygous 1) - f(allele 1)2]2+ [f(heterozygous) -2 x f(allele 1) x f(allele 2)]2 + etc...
a null total means actual panmixy.
The software way of building the population respects panmictic premises (couples randomly formed) but luck may result in people with a given genotype choosing the same genotype as mate. As usual, this is more likely to appear in small populations.
Random number generator.
All random choices are based upon a pseudo random number generator.
This is not truly random, but the difference should not matter here.