Randomize seeds for chain states better
Randomize seeds for chain states better

shell/main.py initializes the crosscat engine with args.seed, which in
EngineTemplate.__init__ generates a general_utils.int_generator, which
at the moment generates consecutive integers. These are used by
LocalEngine.get_initialize_arg_tuples to generate seeds for the States
which are used to store the MCMC states at each iteration.

This potentially seems like a pretty serious problem: Suppose I start
bayesdb --seed=0, and run a calculation with 60 chains. Then I rerun the
calculation with --seed=1. All but one of the 60 new chains will have
been initialized with a seed used in the prior run.

The same issue applies to programmatic use of crosscat/bayeslite.

This patch corrects that issue by having int_generator yield values from
an RNG instead.

mit-probabilistic-computing-project/crosscat,probcomp/crosscat,mit-probabilistic-computing-project/crosscat,mit-probabilistic-computing-project/crosscat,probcomp/crosscat,probcomp/crosscat,mit-probabilistic-computing-project/crosscat,probcomp/crosscat,mit-probabilistic-computing-project/crosscat,probcomp/crosscat,probcomp/crosscat,probcomp/crosscat,probcomp/crosscat,mit-probabilistic-computing-project/crosscat,mit-probabilistic-computing-project/crosscat