gambitproject / gambit

Gambit: The package for computation in game theory
http://www.gambit-project.org
GNU General Public License v2.0
400 stars 150 forks source link

ENH: Add random seed parameter to command-line tools #448

Open tturocy opened 7 months ago

tturocy commented 7 months ago

After commit 6c239f1 closing issue #295, we now have a clean way in C++ of passing random-number generation engines into the new functions that handle creating mixed profiles which are properly distributed uniformly.

Although the best way to generate starting points for the algorithms that make use of them - namely gambit-liap, gambit-simpdiv, gambit-ipa, and gambit-gnm at present - would be to generate them oneself, nevertheless it is quite a convenience for users to have the command-line tools generate these for them, and indeed Gambit offers that feature.

In order to control this better, it would be useful to allow users to control via command-line arguments this process.

Therefore, to the above tools, we should add:

(1) A command-line option which allows users to specify a seed; (2) If a seed is not specified, then use std::random_device to seed the RNG.