Description Usage Arguments Class Fields and Methods Author(s) References See Also Examples
Represents a set of nices for the genetic algorithm. Because the niches
are “closed populations”, it is sometimes needed exchange information
bewteen niches (or “islands”). The World
object implements the exchange
of chromosomes between niches, and to be compatible, it also implements the needed
methods than an usual niche but considering the immigration property.
Thus, the Galgo
object can receive a list of Niches, a list of
Worlds, or a list of any mixture of them.
1 2 3 4 5 6 7 8 9 | World(id=0,
niches=list(),
immigration=0,
maxFitness=0,
bestFitness=0,
maxChromosome=NULL,
bestChromosome=NULL,
generation=0,
...)
|
id |
A way to identify the object. |
niches |
A list of defined niches composing the world. However, it can be a list containing even |
immigration |
It can be |
bestFitness |
The best fitness ever visited. |
maxFitness |
The maximum fitness from the current chromosomes. It should be 0 initially, but it is included for generalization. |
maxChromosome |
The chromosome whose fitness is maximum from the current chromosomes. It should be NULL initially, but it is included for generalization. |
bestChromosome |
The chromosome whose fitness is maximum visited ever. It should be NULL initially, but it is included for generalization. |
generation |
For internal use only. |
... |
Other user named values to include in the object (like pMutation, pCrossover or any other). |
Package: galgo
Class World
Object
~~|
~~+--
World
Directly known subclasses:
public static class World
extends Object
Methods:
best | Returns the best chromosome. | |
bestFitness | Returns the fitness of the best chromosome. | |
clone | Clones itself and its niches. | |
evaluate | Evaluate all niches with a fitness function. | |
generateRandom | Generates random values for all niches in the world. | |
length | Gets the number of niches defined in the world. | |
max | Returns the chromosome whose current fitness is maximum. | |
maxFitness | Returns the fitness of the maximum chromosome. | |
newCollection | Generates a list cloning an object. | |
newRandomCollection | Creates a list of cloned object with its internal values generated by random. | |
plot | Plots information about world object. | |
print | Prints the representation of a world object. | |
progeny | Calls progeny method to all niches in the world object. | |
refreshStats | Updates the internal statistics from the current population. | |
reInit | Erases all internal values in order to re-use the world object. | |
summary | Prints the representation and statistics of the world object. | |
Methods inherited from Object:
as.list, unObject, $, $<-, [[, [[<-, as.character, attach, clone, detach, equals, extend, finalize, getFields, getInstanciationTime, getStaticInstance, hasField, hashCode, ll, load, objectSize, print, save
Victor Trevino. Francesco Falciani Group. University of Birmingham, U.K. http://www.bip.bham.ac.uk/bioinf
Goldberg, David E. 1989 Genetic Algorithms in Search, Optimization and Machine Learning. Addison-Wesley Pub. Co. ISBN: 0201157675
Gene
,
Chromosome
,
Niche
,
Galgo
,
BigBang
.
1 2 3 4 5 6 7 | cr <- Chromosome(genes=newCollection(Gene(shape1=1, shape2=100),5))
ni <- Niche(chromosomes=newRandomCollection(cr, 10))
wo <- World(niches=newRandomCollection(ni,2))
wo
progeny(wo) # returns the chromosomes indexes that were mutated
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.