Skip to content
Browse files

Renamed GetConstructorParametersAsString to GetConstructorParameters;…

… it was too long.
  • Loading branch information...
1 parent b119914 commit 3c5c45ba04e5c963bd3a1e58d02c9a100bbb7391 @primaryobjects committed Feb 5, 2013
View
2 AIProgrammer.Compiler/BrainPlus.cs
@@ -24,7 +24,7 @@ public static class BrainPlus
/// <param name="includeHeader">True to display the header (Brainfuck .NET Compiler 1.0, Created by ...).</param>
public static void Compile(string program, string pathName, IFitness fitness, bool includeHeader = true)
{
- Compile(program, pathName, fitness.GetType().Name, fitness.GetCompilationParameters());
+ Compile(program, pathName, fitness.GetType().Name, fitness.GetConstructorParameters());
}
/// <summary>
View
2 AIProgrammer.Fitness/Base/FitnessBase.cs
@@ -80,7 +80,7 @@ public string RunProgram(string program)
return _console.ToString();
}
- public abstract string GetCompilationParameters();
+ public abstract string GetConstructorParameters();
#endregion
View
2 AIProgrammer.Fitness/Concrete/AddCleanFitness.cs
@@ -158,7 +158,7 @@ protected override void RunProgramMethod(string program)
}
}
- public override string GetCompilationParameters()
+ public override string GetConstructorParameters()
{
return _maxIterationCount + ", " + _trainingCount;
}
View
2 AIProgrammer.Fitness/Concrete/AddFitness.cs
@@ -155,7 +155,7 @@ protected override void RunProgramMethod(string program)
}
}
- public override string GetCompilationParameters()
+ public override string GetConstructorParameters()
{
return _maxIterationCount + ", " + _trainingCount;
}
View
2 AIProgrammer.Fitness/Concrete/AddToCharFitness.cs
@@ -161,7 +161,7 @@ protected override void RunProgramMethod(string program)
}
}
- public override string GetCompilationParameters()
+ public override string GetConstructorParameters()
{
return _maxIterationCount + ", " + _trainingCount;
}
View
2 AIProgrammer.Fitness/Concrete/HelloUserFitness.cs
@@ -183,7 +183,7 @@ protected override void RunProgramMethod(string program)
}
}
- public override string GetCompilationParameters()
+ public override string GetConstructorParameters()
{
return _maxIterationCount + ", \"" + _targetString + "\", " + _trainingCount;
}
View
2 AIProgrammer.Fitness/Concrete/MultiplyFitness.cs
@@ -153,7 +153,7 @@ protected override void RunProgramMethod(string program)
}
}
- public override string GetCompilationParameters()
+ public override string GetConstructorParameters()
{
return _maxIterationCount + ", " + _trainingCount;
}
View
2 AIProgrammer.Fitness/Concrete/StringFitness.cs
@@ -68,7 +68,7 @@ protected override void RunProgramMethod(string program)
}
}
- public override string GetCompilationParameters()
+ public override string GetConstructorParameters()
{
return _maxIterationCount + ", \"" + _targetString + "\"";
}
View
2 AIProgrammer.Fitness/Concrete/StringOptimizedFitness.cs
@@ -72,7 +72,7 @@ protected override void RunProgramMethod(string program)
}
}
- public override string GetCompilationParameters()
+ public override string GetConstructorParameters()
{
return _maxIterationCount + ", \"" + _targetString + "\"";
}
View
2 AIProgrammer.Fitness/Concrete/SubtractFitness.cs
@@ -153,7 +153,7 @@ protected override void RunProgramMethod(string program)
}
}
- public override string GetCompilationParameters()
+ public override string GetConstructorParameters()
{
return _maxIterationCount + ", " + _trainingCount;
}
View
2 AIProgrammer.Types/Interface/IFitness.cs
@@ -49,6 +49,6 @@ public interface IFitness
/// HelloUserFitness: _maxIterationCount + ", \"" + _targetString + "\", " + _trainingCount
/// </summary>
/// <returns></returns>
- string GetCompilationParameters();
+ string GetConstructorParameters();
}
}
View
2 AIProgrammer/Program.cs
@@ -51,7 +51,7 @@ class Program
/// <returns>IFitness</returns>
private static IFitness GetFitnessMethod()
{
- return new AddFitness(_ga, _maxIterationCount, 1);
+ return new StringOptimizedFitness(_ga, _maxIterationCount, _targetString);
}
#region Worker Methods

0 comments on commit 3c5c45b

Please sign in to comment.
Something went wrong with that request. Please try again.