<?xml version="1.0" encoding="windows-1252"?>
<node id="1007328" title="Re: How do I make a random shuffle deterministic?" created="2012-12-05 11:37:19" updated="2012-12-05 11:37:19">
<type id="11">
note</type>
<author id="281137">
davido</author>
<data>
<field name="doctext">
&lt;p&gt;It seems that you should be able to seed using the integer representation of the host's IP address, or an integer representation of the characters from the hostname, and end up with stable results.&lt;/p&gt;
&lt;p&gt;An aside: I was just reading this last night, for no good reason: [http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Pseudorandom_generators:_problems_involving_state_space.2C_seeding.2C_and_usage|Fisher Yates Shuffle: Pseudoraondom Generators: Problems involving state space, seeding, and usage].  I'm not convinced that Perl's randomness generator is free from this issue, which would make your Fisher Yates shuffle (as well as the one included with [mod://List::Util] suspect.&lt;/p&gt;
&lt;p&gt;Hopefully someone can settle this concern.  But reading [mod://Algorithm::Numerical::Shuffle]'s POD confirms that implementations using [doc://rand] may have a flaw.&lt;/p&gt;

&lt;div class="pmsig"&gt;&lt;div class="pmsig-281137"&gt;
&lt;br /&gt;&lt;p&gt;Dave&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1007319</field>
<field name="parent_node">
1007319</field>
</data>
</node>
