From 71beee220de3524bbcd0260016e6db839ef6bc5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Babi=C4=8D?= Date: Mon, 30 Mar 2015 19:04:55 +0200 Subject: [PATCH] MIT license --- LICENSE | 22 +++++++++++++++++++ hello_lol.png | 3 +++ hello_unshifted.png | 3 +++ src/neural/BattlefieldParameterEvaluator.java | 6 +++-- 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 LICENSE create mode 100644 hello_lol.png create mode 100644 hello_unshifted.png diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..43be48f --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 delmadord + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/hello_lol.png b/hello_lol.png new file mode 100644 index 0000000..ed7e023 --- /dev/null +++ b/hello_lol.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce3ef0a7172958af3c54840321e8ad4dd107139288f1c9b2527aa3c3e70f4c10 +size 9725 diff --git a/hello_unshifted.png b/hello_unshifted.png new file mode 100644 index 0000000..c91f8e7 --- /dev/null +++ b/hello_unshifted.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85377e74dabdd38d856e96af420ab6faeafbefc4f007cc31998fbf355b5e1be1 +size 12155 diff --git a/src/neural/BattlefieldParameterEvaluator.java b/src/neural/BattlefieldParameterEvaluator.java index 39230cb..bd70ce1 100644 --- a/src/neural/BattlefieldParameterEvaluator.java +++ b/src/neural/BattlefieldParameterEvaluator.java @@ -159,7 +159,8 @@ public class BattlefieldParameterEvaluator { final MLData output = network.compute(input.clone()); double MyResult = output.getData()[0]; // 2 * fix introduced to shift the top gradient more down to se whole ColorMap spectrum - MyValue = ClipColor(MyResult * 2); +// MyValue = ClipColor(MyResult * 2); + MyValue = ClipColor(MyResult); // MyColor = new Color((float) MyValue, (float) MyValue, (float) MyValue); MyColor = palette.getColor(MyValue); OutputRGBint[NdxCooling + NdxBattleSize * NUMCOOLINGRATES] = MyColor.getRGB(); @@ -172,7 +173,8 @@ public class BattlefieldParameterEvaluator { 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); +// MyValue = ClipColor(2 * FinalScore1[NdxSample] / BATTLE_MAX_SCORE); + MyValue = ClipColor(FinalScore1[NdxSample] / BATTLE_MAX_SCORE); // 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