| Algorithm 3: Knowledge Transfer of GA |
|
Input: pa: a parent from target task. pb: a parent randomly selected from source task. |
| Output: c: the offspring generated. |
| Begin |
| 1: pa and pb crossover and mutate to give offspring ca and cb. |
| 2: If rand < 0.5: |
| 3: c = ca |
| 4: Else |
| 5: c = cb |
| 6: End If |
| End |