Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: How to evolve a permutation?

by jrtayloriv (Pilgrim)
on Feb 14, 2008 at 22:45 UTC ( #668053=note: print w/replies, xml ) Need Help??

in reply to How to evolve a permutation?

You might find the following two articles helpful:

Cultured Perl: Genetic Algorithms With Perl

Genetic Algorithms With Perl

Your question wasn't very clear, but if I understood, you want to make sure that each element is unique in the set resulting from recombination. How about just keeping an ordered array containing all of the 100 possible values that a randomly selected element could take, and as you use each one during recombination, set the array element to undef. Then just test to see if the array element is defined before you use it....

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://668053]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2020-11-30 14:16 GMT
Find Nodes?
    Voting Booth?

    No recent polls found