Changeset 15189 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Generators/CodeGenerator
- Timestamp:
- 07/10/17 21:36:03 (7 years ago)
- Location:
- branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Generators/CodeGenerator
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Generators/CodeGenerator/CodeGeneratorUtils.cs
r15017 r15189 38 38 IRandom random, 39 39 IReadOnlyErcOptions ercOptions) { 40 var x = random.NextDouble();41 Expression expression = null;40 //var x = random.NextDouble(); 41 //Expression expression = null; 42 42 43 if (x < ercOptions.ErcProbability) {44 var expressionType = ExpressionTable.NameToTypeTable[expressionName];45 expression = CreateRandomErcExpression(46 ExpressionTable.TypeToAttributeTable[expressionType].StackType,47 random,48 ercOptions);49 }43 //if (x < ercOptions.ErcProbability) { 44 // var expressionType = ExpressionTable.NameToTypeTable[expressionName]; 45 // expression = CreateRandomErcExpression( 46 // ExpressionTable.TypeToAttributeTable[expressionType].StackType, 47 // random, 48 // ercOptions); 49 //} 50 50 51 if (expression == null || expression is ExecNoopExpression) { 52 expression = ExpressionTable.GetExpression(expressionName); 53 } 51 //if (expression == null || expression is ExecNoopExpression) { 52 // expression = ExpressionTable.GetExpression(expressionName); 53 //} 54 55 //return expression; 56 57 var expression = ExpressionTable.GetExpression(expressionName); 54 58 55 59 return expression; -
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Generators/CodeGenerator/RecursiveCodeGenerator.cs
r14834 r15189 23 23 var code = RandomCode(maxPoints, random, pushGpConfiguration, customExpressions); 24 24 25 return PushProgram.Create(pool, code.To Array());25 return PushProgram.Create(pool, code.ToList()); 26 26 } 27 27 … … 29 29 var code = RandomCode(maxPoints, random, pushGpConfiguration, customExpressions); 30 30 31 return new PushProgram(code.To Array());31 return new PushProgram(code.ToList()); 32 32 } 33 33
Note: See TracChangeset
for help on using the changeset viewer.