- Timestamp:
- 07/15/20 00:19:52 (4 years ago)
- Location:
- cpp/frams/_demos
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/_demos/evol_test.cpp
r1008 r1009 127 127 //TODO add b - bounding box volume (from Model), s - surface area (from geometry), v - volume (from geometry), h,w,d - three consecutive dimensions (from geometry) 128 128 129 printf("\nThe output con tains7 columns separated by the TAB character.\n");129 printf("\nThe output consists of 7 columns separated by the TAB character.\n"); 130 130 printf("The first column is the number of mutated or crossed over and evaluated genotypes.\n"); 131 131 printf("The remaining columns are triplets of min,avg,max (in the population) of fitness, Parts, Joints, Neurons, Connections, genotype characters.\n"); … … 192 192 if (i % population.size() == 0 || i == nr_evals - 1) 193 193 { 194 printf("Evaluation %d \t", i);194 printf("Evaluation %d", i); 195 195 for (char c : string("!PJNCL")) 196 196 { 197 printf("\t"); 197 198 print_stats(population, c); 198 printf("\t");199 199 } 200 200 printf("\n"); … … 204 204 { 205 205 printf("%.1f\t", ind.fitness); 206 printf("%s\n", ind.geno.getGenes ().c_str());206 printf("%s\n", ind.geno.getGenesAndFormat().c_str()); 207 207 } 208 208 -
cpp/frams/_demos/full_props.cpp
r999 r1009 63 63 { 64 64 case 'r': reverse = true; break; 65 case 'h': puts(" usage: full_props [-r[everse]] [genotype_or_stdin]\n"); break;65 case 'h': puts("Usage: full_props [-r[everse]] [genotype_or_stdin]\n"); break; 66 66 } 67 67 else … … 79 79 if (!m.isValid()) 80 80 { 81 logPrintf(" ", "full_props", LOG_ERROR, "Cannot build Model from the supplied genotype\n");81 logPrintf("full_props", "main", LOG_ERROR, "Cannot build Model from the supplied genotype.\n"); 82 82 return 2; 83 83 } … … 88 88 Neuro *n = m.getNeuro(i); 89 89 SyntParam p = n->classProperties(reverse); 90 p.update();// ...so everyone reading the source can recognize that p was created to update the neuro d field 91 // but actually, calling update() here is not necessary, because ~SyntParam() would do it anyway90 p.update();// ...so everyone reading the source can recognize that p was created to update the neuro d field; 91 // but actually, calling update() here is not necessary, because the ~SyntParam() destructor would do it anyway. 92 92 } 93 93 m.close(); 94 94 95 // normal f0 (omitting default values) would be retrieved using m.getF0Geno()96 // the following form allows for more control:95 // Normal f0 (omitting default values) would be retrieved using m.getF0Geno(). 96 // The following form allows for more control: 97 97 Geno f0_g; 98 m.makeGeno(f0_g, NULL, reverse);// third argis "handle_defaults" == whether f0 should omit default property values98 m.makeGeno(f0_g, NULL, reverse);//The third argument is "handle_defaults" == whether f0 should omit default property values 99 99 puts(f0_g.getGenesAndFormat().c_str()); 100 100 101 101 return 0; 102 102 } 103 -
cpp/frams/_demos/genomanipulation.cpp
r999 r1009 378 378 " need to uncomment srand(time(0)) in genomanipulation.cpp.\n" 379 379 " 3. This application will use custom genotype passed as\n" 380 " a commandline parameter: genomanipulation XX\n"380 " a commandline parameter: genomanipulation \"/*9*/FULU\"\n" 381 381 "\n"); 382 382 return 0;
Note: See TracChangeset
for help on using the changeset viewer.