- Timestamp:
- 08/21/17 11:33:53 (7 years ago)
- Location:
- branches/PushGP/HeuristicLab.PushGP
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP
- Property svn:ignore
-
old new 1 1 *.user 2 packages 3 TestResults
-
- Property svn:ignore
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Problem/DeterministicTests.cs
r15289 r15334 44 44 var currentAverageQuality1 = GetDoubleResult(ga1, "CurrentAverageQuality"); 45 45 var currentAverageQuality2 = GetDoubleResult(ga2, "CurrentAverageQuality"); 46 Assert.AreEqual(currentAverageQuality1, currentAverageQuality2, 0.0 001);46 Assert.AreEqual(currentAverageQuality1, currentAverageQuality2, 0.01); 47 47 48 48 var currentWorstQuality1 = GetDoubleResult(ga1, "CurrentWorstQuality"); -
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Problem/IndividualMapperTests.cs
r15289 r15334 11 11 using HeuristicLab.Problems.ProgramSynthesis.Push.Configuration; 12 12 using HeuristicLab.Problems.ProgramSynthesis.Push.Data.Pool; 13 using HeuristicLab.Problems.ProgramSynthesis.Push.Encoding; 14 using HeuristicLab.Problems.ProgramSynthesis.Push.Expressions; 13 15 using HeuristicLab.Problems.ProgramSynthesis.Push.Individual; 14 16 using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter; 17 using HeuristicLab.Problems.ProgramSynthesis.Push.Parser; 15 18 using HeuristicLab.Problems.ProgramSynthesis.Push.Stack; 16 19 using HeuristicLab.Random; … … 53 56 var random = new MersenneTwister(); 54 57 var config = new PushConfiguration { 55 ParenthesesCloseBiasLevel = 458 CloseBiasLevel = 4 56 59 }; 57 60 … … 75 78 Assert.AreEqual(vector.Length, program.TotalExpressionCount); 76 79 } 80 81 [TestMethod] 82 [TestProperty("Time", "Short")] 83 [TestCategory("Individual")] 84 public void PlushToPushProgram() { 85 var plushGenome = new PlushVector(); 86 87 plushGenome.Add(new PlushEntry { Instruction = new ExecDoTimesExpression(), Close = 0 }); 88 plushGenome.Add(new PlushEntry { Instruction = new IntegerPushExpression(8), Close = 0 }); 89 plushGenome.Add(new PlushEntry { Instruction = new IntegerPushExpression(11), Close = 3 }); 90 plushGenome.Add(new PlushEntry { Instruction = new IntegerAddExpression(), Close = 3, Silent = true }); 91 plushGenome.Add(new PlushEntry { Instruction = new ExecIfExpression(), Close = 1 }); 92 plushGenome.Add(new PlushEntry { Instruction = new IntegerPushExpression(17), Close = 0 }); 93 plushGenome.Add(new PlushEntry { Instruction = new BooleanPushExpression(false), Close = 0 }); 94 plushGenome.Add(new PlushEntry { Instruction = new CodeQuoteExpression(), Close = 0 }); 95 plushGenome.Add(new PlushEntry { Instruction = new FloatMultiplyExpression(), Close = 2 }); 96 plushGenome.Add(new PlushEntry { Instruction = new ExecRotateExpression(), Close = 0 }); 97 plushGenome.Add(new PlushEntry { Instruction = new FloatPushExpression(34.44), Close = 0 }); 98 99 var expected = PushParser.ParseProgram("( EXEC.DO*TIMES ( 8 11 ) EXEC.IF ( ) ( 17 false CODE.QUOTE ( FLOAT.* ) ) EXEC.ROT ( 34.44 ) ( ) ( ) )"); 100 101 Assert.AreEqual(expected, plushGenome.PushProgram); 102 } 77 103 } 78 104 }
Note: See TracChangeset
for help on using the changeset viewer.