Changeset 61
- Timestamp:
- 02/08/10 20:20:00 (15 years ago)
- Location:
- java/ecj/framsticks
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/ecj/framsticks/FramsticksUtils.java
r59 r61 169 169 new RealValuedResult(testResult)); 170 170 } 171 172 private static float chasingBest = 2.0f; 173 private static float chasedBest = 2.0f; 171 174 172 175 public Pair<? extends InteractionResult> coevolutionaryEvaluate(String candidate, String test, … … 180 183 settingsFile, filePath)); 181 184 String evaluation = readFromFile(scriptsOutputPath); 185 186 float candidateResult = 0; 187 float testResult = 0; 182 188 183 // TODO: parse output from eval 184 // e.g. candidateResult = Float.parseFloat(evaluation.split("\t")[1]); 185 float candidateResult = 0; 186 float testResult = 0; 189 try { 190 191 String[] str = evaluation.split("\n"); 192 candidateResult = Float.parseFloat(str[0].split("\t")[1]); //chasing 193 testResult = Float.parseFloat(str[1].split("\t")[1]); //chased 194 195 chasingBest = ((candidateResult < chasingBest)?(candidateResult):(chasingBest)); 196 chasedBest = ((chasedBest < testResult )?(chasedBest ):(testResult)); 197 198 System.out.printf("%7.4f %7.4f --> %7.4f %7.4f\n", candidateResult, chasingBest, testResult, chasedBest); 199 } 200 catch(Exception ex) { 201 202 System.out.println(scriptsOutputPath + " in bad format. There must be 2 lines with results."); 203 } 187 204 188 205 return new Pair<RealValuedResult>(new RealValuedResult(candidateResult),
Note: See TracChangeset
for help on using the changeset viewer.