GMUEClab / ecj

ECJ Evolutionary Computation Toolkit
http://cs.gmu.edu/~eclab/projects/ecj/
123 stars 42 forks source link

ListCrossoverPipeline: report second parent only if actually used #79

Open ZvikaZ opened 3 years ago

ZvikaZ commented 3 years ago

If using misc to keep parents' indices, it used to always keep the indices of both parents even if if the reproduction failed, and the individual is just a copy of a single parent. Now it always keep the index of the first parent, and adds the index of the second parent only if it's really used.

ZvikaZ commented 3 years ago

Hi. Any updates with this?

eclab commented 3 years ago

Okay, I'm not convinced this is a good idea. The point of the parents mechanism is to give you access to the parents that produced children during an operation. That is, you have a breeding pipeline operation op(parent1, parent2) -> { children }. Now it may be the case that children has only one child. But you still may want to know what the two parents were in order to understand why the operation did what it did. IIRC, it should generally be the case that the first parent generated the child if there's only one, so it should be clear which parent is which in the one-child situation, right?