ParaPhraseAGH/erlang — pull request #8 by mpmiszczyk (2014-10-06 17:02:57+00:00)
Title: Random inside skel

New function that allows process to be seeded **only once**.

This is necessary due to fact, that one can not initialize any process inside Skel, which might be crucial for some part of computation. And of course creating new seed with each function call will bring too much overhead on system. Solution to this problem is achieved by interacting with process dictionary (just like random), by storing information if process was already seeded or not. With such approach overhead is reduced to one `if` (function _should_ be inline locally).

In our case we use random both for deciding if they should be migrated, shuffling, and amount of evolution introduced in reproduction. On one hand those are exactly the same in each run, but are executed on _truly randomized_ agent, since initial population is created in properly seeded process. This might make additional seeding inside skel redundant; or not. It's more of algorithm decision, than actual bug.