Package org.encog.ml.ea.genome

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


public class TestMinimizeScoreComp {
  @Test
  public void testCompare() {
   
    BasicGenome genome1 = new IntegerArrayGenome(1);
    genome1.setAdjustedScore(10);
    genome1.setScore(4);
   
    BasicGenome genome2 = new IntegerArrayGenome(1);
    genome2.setAdjustedScore(4);
    genome2.setScore(10);

    MinimizeScoreComp comp = new MinimizeScoreComp();
   
    Assert.assertTrue(comp.compare(genome1, genome2)<0);
  }
View Full Code Here


public class TestMaximizeAdjustedScoreComp {
 
  @Test
  public void testCompare() {
   
    BasicGenome genome1 = new IntegerArrayGenome(1);
    genome1.setAdjustedScore(10);
    genome1.setScore(4);
   
    BasicGenome genome2 = new IntegerArrayGenome(1);
    genome2.setAdjustedScore(4);
    genome2.setScore(10);

    MaximizeAdjustedScoreComp comp = new MaximizeAdjustedScoreComp();
   
    Assert.assertTrue(comp.compare(genome1, genome2)<0);
  }
View Full Code Here

public class TestMaximizeScoreComp {
  @Test
  public void testCompare() {
   
    BasicGenome genome1 = new IntegerArrayGenome(1);
    genome1.setAdjustedScore(10);
    genome1.setScore(4);
   
    BasicGenome genome2 = new IntegerArrayGenome(1);
    genome2.setAdjustedScore(4);
    genome2.setScore(10);

    MaximizeScoreComp comp = new MaximizeScoreComp();
   
    Assert.assertTrue(comp.compare(genome1, genome2)>0);
  }
View Full Code Here

public class TestMinimizeAdjustedScoreComp {
  @Test
  public void testCompare() {
   
    BasicGenome genome1 = new IntegerArrayGenome(1);
    genome1.setAdjustedScore(10);
    genome1.setScore(4);
   
    BasicGenome genome2 = new IntegerArrayGenome(1);
    genome2.setAdjustedScore(4);
    genome2.setScore(10);

    MinimizeAdjustedScoreComp comp = new MinimizeAdjustedScoreComp();
   
    Assert.assertTrue(comp.compare(genome1, genome2)>0);
  }
View Full Code Here

TOP

Related Classes of org.encog.ml.ea.genome.BasicGenome

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.