Thanks for the tips. It is acceptable if some hosts have the same seed. Still, lessening those occurrences is a good thing. How about this:
sub seed { my $string = shift; my $seed; my @ascii = map ord, split //, $string; my $product = pop @ascii; for ( @ascii ) { $seed += $_ }; $seed = $seed * $product; srand $seed; }
In reply to Re^5: How do I make a random shuffle deterministic?
by Anonymous Monk
in thread How do I make a random shuffle deterministic?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |