Package org.encog.ml.genetic

Examples of org.encog.ml.genetic.GeneticError


      final Genome child2) {
    final int motherChromosomes = getChromosomes().size();
    final int fatherChromosomes = father.getChromosomes().size();

    if (motherChromosomes != fatherChromosomes) {
      throw new GeneticError(
          "Mother and father must have same chromosome count, Mother:"
              + motherChromosomes + ",Father:"
              + fatherChromosomes);
    }
View Full Code Here


   */
  public void addSpeciesMember(final Species species, final Genome genome) {

    if (this.owner.isValidationMode()) {
      if (species.getMembers().contains(genome)) {
        throw new GeneticError("Species already contains genome: "
            + genome.toString());
      }
    }

    if (this.owner.getSelectionComparator().compare(genome,
View Full Code Here

    taskExecutor.shutdown();
    try {
      taskExecutor.awaitTermination(Long.MAX_VALUE, TimeUnit.MINUTES);
    } catch (final InterruptedException e) {
      throw new GeneticError(e);
    }

    // just pick a leader, for the default species.
    defaultSpecies.setLeader(defaultSpecies.getMembers().get(0));
  }
View Full Code Here

   * @param phenotype Not used.
   * @return Not used.
   */
  @Override
  public Genome encode(final MLMethod phenotype) {
    throw new GeneticError(
        "Encoding of a NEAT network is not supported.");
  }
View Full Code Here

      this.taskExecutor.shutdown();
      try {
        this.taskExecutor.awaitTermination(Long.MAX_VALUE,
            TimeUnit.MINUTES);
      } catch (final InterruptedException e) {
        throw new GeneticError(e);
      } finally {
        this.taskExecutor = null;
        Encog.getInstance().removeShutdownTask(this);
      }
    }
View Full Code Here

      EncogLogging.log(e);
    }

    // handle any errors that might have happened in the threads
    if (this.reportedError != null && !getShouldIgnoreExceptions()) {
      throw new GeneticError(this.reportedError);
    }

    // validate, if requested
    if (isValidationMode()) {
      if (this.oldBestGenome != null
View Full Code Here

    taskExecutor.shutdown();
    try {
      taskExecutor.awaitTermination(Long.MAX_VALUE, TimeUnit.MINUTES);
    } catch (InterruptedException e) {
      throw new GeneticError(e);
    }
  }
View Full Code Here

  }

  @Override
  public Genome encode(final MLMethod phenotype) {
    throw new GeneticError(
        "Encoding of a HyperNEAT network is not supported.");
  }
View Full Code Here

        taken.add(trial);
        return trial;
      }
    }

    throw new GeneticError("Ran out of integers to select.");
  }
View Full Code Here

TOP

Related Classes of org.encog.ml.genetic.GeneticError

Copyright © 2018 www.massapicom. 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.