Crossover Operations

Crossover Operations#

Summary#

|

RandTrCrv

Perform the crossover operation on the two choiced programs.

Methods#

|

class RandTrCrv[source]#

Perform the crossover operation on the two choiced programs.

In this method, A random subtree of one program is selected to replace a random subtree of the other program.

__call__(prog_1, prog_2, prob=1)[source]#

Call RandTrCrv method.

Parameters:
  • prog_1 – The first program

  • prog_2 – The second program

  • prob – The probability to perform the crossover between prog_1 and prog_2.

Returns:

A new prog