org.uncommons.watchmaker.framework.islands
Class RingMigration
java.lang.Object
org.uncommons.watchmaker.framework.islands.RingMigration
- All Implemented Interfaces:
- Migration
public class RingMigration
- extends Object
- implements Migration
Migrates a fixed number of individuals from each island to the adjacent island.
Operates as if the islands are arranged in a ring with migration occurring in a
clockwise direction. The individuals to be migrated are chosen completely at random.
- Author:
- Daniel Dyer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RingMigration
public RingMigration()
migrate
public <T> void migrate(List<List<EvaluatedCandidate<T>>> islandPopulations,
int migrantCount,
Random rng)
- Migrates a fixed number of individuals from each island to the adjacent island.
Operates as if the islands are arranged in a ring with migration occurring in a
clockwise direction. The individuals to be migrated are chosen completely at random.
- Specified by:
migrate
in interface Migration
- Type Parameters:
T
- The type of entity being evolved.- Parameters:
islandPopulations
- A list of the populations of each island.migrantCount
- The number of (randomly selected) individuals to be moved on from
each island.rng
- A source of randomness.