Examples of Genome


Examples of org.digibots.genetique.Genome

       
        try {
           
            app.getUI().getStats().notifyCopulation();
           
            Genome childGen = new Genome();
           
            childGen.alleleB1 = rnd.nextBoolean() ? partner.genome.alleleB1
                    : this.genome.alleleB1;
            childGen.alleleB2 = rnd.nextBoolean() ? partner.genome.alleleB2
                    : this.genome.alleleB2;
View Full Code Here

Examples of org.encog.ml.ea.genome.Genome

    adjustCompatibilityThreshold();

    // assign genomes to species (if any exist)
    for (final Genome g : genomes) {
      Species currentSpecies = null;
      final Genome genome = g;

      if (!Double.isNaN(genome.getAdjustedScore())
          && !Double.isInfinite(genome.getAdjustedScore())) {
        maxScore = Math.max(genome.getAdjustedScore(), maxScore);
      }

      for (final Species s : speciesCollection) {
        final double compatibility = getCompatibilityScore(genome,
            s.getLeader());

        if (compatibility <= this.compatibilityThreshold) {
          currentSpecies = s;
          addSpeciesMember(s, genome);
          genome.setSpecies(s);
          break;
        }
      }

      // if this genome did not fall into any existing species, create a
View Full Code Here

Examples of org.encog.ml.genetic.genome.Genome

      calculateScore(genome);
    }

    getPopulation().sort();

    final Genome genome = getPopulation().getBest();
    final double currentBest = genome.getScore();

    if (getComparator().isBetterThan(currentBest, this.bestEverScore)) {
      this.bestEverScore = currentBest;
      this.bestEverNetwork = ((NEATNetwork) genome.getOrganism());
    }

    this.bestEverScore = getComparator().bestScore(getError(),
        this.bestEverScore);
  }
View Full Code Here

Examples of org.encog.ml.genetic.genome.Genome

    }

    // set the species leader links
    for (Species species : leaderMap.keySet()) {
      int leaderID = leaderMap.get(species);
      Genome leader = genomeMap.get(leaderID);
      species.setLeader(leader);
      ((BasicSpecies)species).setPopulation(result);
    }

    return result;
View Full Code Here

Examples of org.encog.ml.genetic.genome.Genome

  public class NeuralGeneticAlgorithmHelper extends BasicGeneticAlgorithm {
    /**
     * @return The error from the last iteration.
     */
    public final double getError() {
      final Genome genome = getPopulation().getBest();
      return genome.getScore();
    }
View Full Code Here

Examples of org.encog.ml.genetic.genome.Genome

     * Get the current best neural network.
     *
     * @return The current best neural network.
     */
    public final MLMethod getMethod() {
      final Genome genome = getPopulation().getBest();
      return (BasicNetwork) genome.getOrganism();
    }
View Full Code Here

Examples of org.encog.ml.genetic.genome.Genome

   *
   * @return The parent.
   */
  @Override
  public final Genome chooseParent() {
    Genome baby;

    // If there is a single member, then choose that one.
    if (this.members.size() == 1) {
      baby = this.members.get(0);
    } else {
View Full Code Here

Examples of org.encog.ml.genetic.genome.Genome

    final TaskGroup group = EngineConcurrency.getInstance()
        .createTaskGroup();

    // mate and form the next generation
    for (int i = 0; i < countToMate; i++) {
      final Genome mother = getPopulation().getGenomes().get(i);
      final int fatherInt = (int) (Math.random() * matingPopulationSize);
      final Genome father = getPopulation().getGenomes().get(fatherInt);
      final Genome child1 = getPopulation().getGenomes().get(
          offspringIndex);
      final Genome child2 = getPopulation().getGenomes().get(
          offspringIndex + 1);

      final MateWorker worker = new MateWorker(mother, father, child1,
          child2);

View Full Code Here

Examples of org.encog.ml.genetic.genome.Genome

      String prefix = dialog.getPrefix().getValue();
      int count = dialog.getGenomesToExtract().getValue();
     
      for(int i=0;i<count;i++)
      {
        Genome genome = this.population.getGenomes().get(i);
        genome.decode();
        NEATNetwork network = (NEATNetwork)genome.getOrganism();
        String name = FileUtil.forceExtension( prefix + i, "eg" );
        File path = new File(EncogWorkBench.getInstance().getProjectDirectory(),name);
        EncogWorkBench.getInstance().save(path, network);
       
      }
View Full Code Here

Examples of org.encog.ml.genetic.genome.Genome

   
    String type = "Unknown";
   
    if( population.getGenomes().size()>0 )
    {
      Genome genome = population.getGenomes().get(0);
      if( genome instanceof NEATGenome )
      {
        type = "Neat";
      }
      else if( genome instanceof NeuralGenome )
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.