jMetalPy
jMetalPy copied to clipboard
How to set the seed in order to make repeatable solution?
Since these are stochastic algorithms, and every time I run it I obtain a different solution, how can I set the seed in order to make solution replicable?
Has there been any progress with this inquiry, is it possible to set the seed?
Thank you.
You can call random.seed(n) at the beginning of your implementation with n being some integer. This then fixes the seed for the rest of your program and all other modules.
See this answer.