Package org.uncommons.watchmaker.framework.operators

Examples of org.uncommons.watchmaker.framework.operators.IntegerAdjuster


{
    @Test
    public void testOnePlusOneEvolutionStrategy()
    {
        EvolutionStrategyEngine<Integer> engine = new EvolutionStrategyEngine<Integer>(new StubIntegerFactory(),
                                                                                       new IntegerAdjuster(-1),
                                                                                       new IntegerEvaluator(),
                                                                                       true,
                                                                                       1,
                                                                                       FrameworkTestUtils.getRNG());
        @SuppressWarnings("unchecked")
View Full Code Here


    @Test
    public void testOneCommaOneEvolutionStrategy()
    {
        EvolutionStrategyEngine<Integer> engine = new EvolutionStrategyEngine<Integer>(new StubIntegerFactory(),
                                                                                       new IntegerAdjuster(-1),
                                                                                       new IntegerEvaluator(),
                                                                                       false,
                                                                                       1,
                                                                                       FrameworkTestUtils.getRNG());
        @SuppressWarnings("unchecked")
View Full Code Here

        final int generationCount = 5;

        IslandEvolution<Integer> islandEvolution = new IslandEvolution<Integer>(islandCount,
                                                                                new RingMigration(),
                                                                                new StubIntegerFactory(),
                                                                                new IntegerAdjuster(2),
                                                                                new DummyFitnessEvaluator(),
                                                                                new RouletteWheelSelection(),
                                                                                FrameworkTestUtils.getRNG());
        final int[] observedEpochCount = new int[1];
        final int[] observedGenerationCounts = new int[islandCount];
View Full Code Here

     */
    @Test
    public void testIncrementalEvolution()
    {
        SteadyStateEvolutionEngine<Integer> steadyState = new SteadyStateEvolutionEngine<Integer>(new StubIntegerFactory(),
                                                                                                  new IntegerAdjuster(5),
                                                                                                  new NullFitnessEvaluator(),
                                                                                                  new RouletteWheelSelection(),
                                                                                                  1,
                                                                                                  true,
                                                                                                  FrameworkTestUtils.getRNG());
View Full Code Here

    public void testInterrupt()
    {
        IslandEvolution<Integer> islandEvolution = new IslandEvolution<Integer>(2,
                                                                                new RingMigration(),
                                                                                new StubIntegerFactory(),
                                                                                new IntegerAdjuster(2),
                                                                                new DummyFitnessEvaluator(),
                                                                                new RouletteWheelSelection(),
                                                                                FrameworkTestUtils.getRNG());
        final long timeout = 1000L;
        final Thread requestThread = Thread.currentThread();
View Full Code Here

     */
    @Test
    public void testForcedSingleCandidateUpdate()
    {
        SteadyStateEvolutionEngine<Integer> steadyState = new SteadyStateEvolutionEngine<Integer>(new StubIntegerFactory(),
                                                                                                  new IntegerAdjuster(5),
                                                                                                  new NullFitnessEvaluator(),
                                                                                                  new RouletteWheelSelection(),
                                                                                                  2,
                                                                                                  true, // Force single update.
                                                                                                  FrameworkTestUtils.getRNG());
View Full Code Here

    public void testGetSatisfiedTerminationConditionsBeforeStart()
    {
        IslandEvolution<Integer> islandEvolution = new IslandEvolution<Integer>(3,
                                                                                new RingMigration(),
                                                                                new StubIntegerFactory(),
                                                                                new IntegerAdjuster(2),
                                                                                new DummyFitnessEvaluator(),
                                                                                new RouletteWheelSelection(),
                                                                                FrameworkTestUtils.getRNG());
        // Should throw an IllegalStateException because evolution hasn't started, let alone terminated.
        islandEvolution.getSatisfiedTerminationConditions();
View Full Code Here

    @Test
    public void testElitism()
    {
        SteadyStateEvolutionEngine<Integer> steadyState = new SteadyStateEvolutionEngine<Integer>(new StubIntegerFactory(),
                                                                                                  new IntegerAdjuster(10),
                                                                                                  new NullFitnessEvaluator(),
                                                                                                  new RouletteWheelSelection(),
                                                                                                  1,
                                                                                                  true,
                                                                                                  FrameworkTestUtils.getRNG());
View Full Code Here

TOP

Related Classes of org.uncommons.watchmaker.framework.operators.IntegerAdjuster

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.