Variable Name Changes
This commit is contained in:
parent
29da090c99
commit
c6e96d71a8
13
Genetic.cpp
13
Genetic.cpp
|
@ -914,14 +914,15 @@ int main()
|
||||||
FILE *inputFile;
|
FILE *inputFile;
|
||||||
FILE *outputFile;
|
FILE *outputFile;
|
||||||
int decision;
|
int decision;
|
||||||
double currentError;
|
|
||||||
int trainCounter;
|
|
||||||
|
|
||||||
|
int trainCounter;
|
||||||
int inputCounter;
|
int inputCounter;
|
||||||
int doubleCounter;
|
int doubleCounter;
|
||||||
int groupSize;
|
int groupCounter;
|
||||||
|
|
||||||
double trainInputs[30][5];
|
double trainInputs[30][5];
|
||||||
double testInputs[120][5];
|
double testInputs[120][5];
|
||||||
|
double currentError;
|
||||||
Generation generation(50, 5);
|
Generation generation(50, 5);
|
||||||
|
|
||||||
inputFile = fopen("Data/train.data", "r");
|
inputFile = fopen("Data/train.data", "r");
|
||||||
|
@ -977,11 +978,11 @@ int main()
|
||||||
for (inputCounter = 0; inputCounter < 10; inputCounter++)
|
for (inputCounter = 0; inputCounter < 10; inputCounter++)
|
||||||
{
|
{
|
||||||
generation.ResetScores();
|
generation.ResetScores();
|
||||||
for (groupSize = 0; groupSize < 3; groupSize++)
|
for (groupCounter = 0; groupCounter < 3; groupCounter++)
|
||||||
{
|
{
|
||||||
for (doubleCounter = 0; doubleCounter < 4; doubleCounter++)
|
for (doubleCounter = 0; doubleCounter < 4; doubleCounter++)
|
||||||
generation.SetInput(trainInputs[inputCounter * 3 + groupSize][doubleCounter], doubleCounter);
|
generation.SetInput(trainInputs[inputCounter * 3 + groupCounter][doubleCounter], doubleCounter);
|
||||||
generation.SetTarget(trainInputs[inputCounter * 3 + groupSize][4]);
|
generation.SetTarget(trainInputs[inputCounter * 3 + groupCounter][4]);
|
||||||
generation.Fire();
|
generation.Fire();
|
||||||
generation.UpdateScores();
|
generation.UpdateScores();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue