Package com.heatonresearch.aifh.genetic.genome

Examples of com.heatonresearch.aifh.genetic.genome.IntegerArrayGenomeFactory


        // Create a random number generator
        GenerateRandom rnd = new MersenneTwisterGenerateRandom();

        // Create a new population.
        Population pop = new BasicPopulation();
        pop.setGenomeFactory(new IntegerArrayGenomeFactory(5));

        // Create a trainer with a very simple score function.  We do not care
        // about the calculation of the score, as they will never be calculated.
        EvolutionaryAlgorithm train = new BasicEA(pop, new ScoreFunction() {
            @Override
View Full Code Here


        defaultSpecies.setPopulation(result);
        for (int i = 0; i < POPULATION_SIZE; i++) {
            final IntegerArrayGenome genome = randomGenome();
            defaultSpecies.add(genome);
        }
        result.setGenomeFactory(new IntegerArrayGenomeFactory(cities.length));
        result.getSpecies().add(defaultSpecies);

        return result;
    }
View Full Code Here

        // Create a random number generator
        GenerateRandom rnd = new MersenneTwisterGenerateRandom();

        // Create a new population.
        Population pop = new BasicPopulation();
        pop.setGenomeFactory(new IntegerArrayGenomeFactory(10));

        // Create a trainer with a very simple score function.  We do not care
        // about the calculation of the score, as they will never be calculated.
        EvolutionaryAlgorithm train = new BasicEA(pop, new ScoreFunction() {
            @Override
View Full Code Here

        // Create a random number generator
        GenerateRandom rnd = new MersenneTwisterGenerateRandom();

        // Create a new population.
        Population pop = new BasicPopulation();
        pop.setGenomeFactory(new IntegerArrayGenomeFactory(10));

        // Create a trainer with a very simple score function.  We do not care
        // about the calculation of the score, as they will never be calculated.
        EvolutionaryAlgorithm train = new BasicEA(pop, new ScoreFunction() {
            @Override
View Full Code Here

TOP

Related Classes of com.heatonresearch.aifh.genetic.genome.IntegerArrayGenomeFactory

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.