|
|
|
@ -148,6 +148,9 @@ public class BattlefieldParameterEvaluator { |
|
|
|
|
MyTestData[NdxCooling + NdxBattleSize * NUMCOOLINGRATES][1] = 0.1 + 0.9 * ((double) NdxCooling) / NUMCOOLINGRATES; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Palette palette = new Palette(); |
|
|
|
|
|
|
|
|
|
// Simulate the neural network with the test samples and fill a matrix
|
|
|
|
|
for (int NdxBattleSize = 0; NdxBattleSize < NUMBATTLEFIELDSIZES; NdxBattleSize++) { |
|
|
|
|
for (int NdxCooling = 0; NdxCooling < NUMCOOLINGRATES; NdxCooling++) { |
|
|
|
@ -157,17 +160,21 @@ public class BattlefieldParameterEvaluator { |
|
|
|
|
double MyResult = output.getData()[0]; |
|
|
|
|
// 2 * fix introduced to shift the top gradient more down to se whole ColorMap spectrum
|
|
|
|
|
MyValue = ClipColor(MyResult * 2); |
|
|
|
|
MyColor = new Color((float) MyValue, (float) MyValue, (float) MyValue); |
|
|
|
|
// MyColor = new Color((float) MyValue, (float) MyValue, (float) MyValue);
|
|
|
|
|
MyColor = palette.getColor(MyValue); |
|
|
|
|
OutputRGBint[NdxCooling + NdxBattleSize * NUMCOOLINGRATES] = MyColor.getRGB(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
System.out.println("Testing completed."); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Plot the training samples
|
|
|
|
|
for (int NdxSample = 0; NdxSample < NUMSAMPLES; NdxSample++) { |
|
|
|
|
// MyValue = ClipColor(FinalScore1[NdxSample] / BATTLE_MAX_SCORE);
|
|
|
|
|
// 2 * fix introduced to shift the top gradient more down to se whole ColorMap spectrum
|
|
|
|
|
MyValue = ClipColor(2 * FinalScore1[NdxSample] / BATTLE_MAX_SCORE); |
|
|
|
|
MyColor = new Color((float) MyValue, (float) MyValue, (float) MyValue); |
|
|
|
|
// MyColor = new Color((float) MyValue, (float) MyValue, (float) MyValue);
|
|
|
|
|
MyColor = palette.getColor(MyValue); |
|
|
|
|
int MyPixelIndex = (int) (Math.round(NUMCOOLINGRATES * ((GunCoolingRate[NdxSample] / MAXGUNCOOLINGRATE) - 0.1) / 0.9) + Math |
|
|
|
|
.round(NUMBATTLEFIELDSIZES * ((BattlefieldSize[NdxSample] / MAXBATTLEFIELDSIZE) - 0.1) / 0.9) |
|
|
|
|
* NUMCOOLINGRATES); |
|
|
|
|