Keeping individuals unique after crossover, mutating etc.

75 views
Skip to first unread message

Jake Cowton

unread,
Jan 4, 2015, 1:20:10 PM1/4/15
to deap-...@googlegroups.com
I have implemented the eaSimple algorithm that comes packaged in DEAP; using cxPartialyMatched(), mutShuffleIndexes() and selTournament().

The individuals looks something like this:

[1, 3, 2, 0, -1, -1]

-1s can occur a multiple amount of times, but positive indexes must only occur once!

When I crossover and mutate my individuals, I often get duplicate positive integers (for obvious reasons), is there a way I can stop this?

So to clarify, I'm looking for a way to crossover and mutate individuals without creating any duplicates of positive integers (but negatives can be duplicated).

François-Michel De Rainville

unread,
Jan 7, 2015, 8:52:09 PM1/7/15
to deap-...@googlegroups.com

I never seen anything like this. You will surely have to create your own custom crossover. It is certainly not standard GA ;)


--
You received this message because you are subscribed to the Google Groups "deap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deap-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jake Cowton

unread,
Jan 8, 2015, 3:05:25 PM1/8/15
to deap-...@googlegroups.com
I managed to overcome this by using another objective to maximise the number of values >= 0.
Reply all
Reply to author
Forward
0 new messages