Hi,
On Sat, Jul 16, 2011 at 11:09, Erik Huelsmann ehuels@gmail.com wrote:
It looks - also given Mark's reaction - like we may need to implement this in Lisp to achieve the behaviour we need: readable random states. Possibly, we can also offer a (non-printable) wrapper around the java Random object... Thanks for your feedback! I'll save the link to see if that solution or the algorithms in SBCL can help us out here.
The algorithm implemented in SBCL is the Mersenne Twister (http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html) and it is a fast and very good random number generator. The implementation in SBCL is a good one and provides readable random states. I believe having a similar implementation in ABCL would be very nice since the generator that comes with Java is a low-quality one (it's a Linear Congruential Generator). SBCL also provides a specific feature to set a seed with a number: sb-ext:seed-random-state. It's a useful addition.
As a side note, not long ago I've used the MT in SBCL as a starting point for a small portable library of random number generators. Unfortunately I still was not able to put it in a decent state for release...
Best, Jorge