|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.epochx.op.selection.RandomSelector<TYPE>
public class RandomSelector<TYPE>
A random selector is a program and pool selector which provides no selection pressure. No reference is made to the programs' fitness scores.
| Constructor Summary | |
|---|---|
RandomSelector(GPModel<TYPE> model)
|
|
| Method Summary | |
|---|---|
java.util.List<CandidateProgram<TYPE>> |
getPool(java.util.List<CandidateProgram<TYPE>> pop,
int poolSize)
Randomly chooses programs from the given population up to a total of poolSize and returns them as a list. |
CandidateProgram<TYPE> |
getProgram()
Randomly chooses and returns a program from the population with no bias. |
void |
setSelectionPool(java.util.List<CandidateProgram<TYPE>> pop)
This method should only be called by the GP system. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RandomSelector(GPModel<TYPE> model)
| Method Detail |
|---|
public void setSelectionPool(java.util.List<CandidateProgram<TYPE>> pop)
setSelectionPool in interface ProgramSelector<TYPE>pop - the current population for this generation.public CandidateProgram<TYPE> getProgram()
getProgram in interface ProgramSelector<TYPE>
public java.util.List<CandidateProgram<TYPE>> getPool(java.util.List<CandidateProgram<TYPE>> pop,
int poolSize)
poolSize and returns them as a list. The generated pool may
contain duplicate programs, and as such the pool size can be greater
than the population size.
getPool in interface PoolSelector<TYPE>pop - the population of CandidatePrograms from which the programs
in the pool should be chosen.poolSize - the number of programs that should be selected from the
population to form the pool. If poolSize is less than
zero then no selection takes place and the given
population is returned unaltered.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||