From 8ffff5e6a082d4197d67d51789826ac3371e8bf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=2E=20Urba=C5=84czyk?= Date: Thu, 31 May 2012 22:16:03 +0000 Subject: [PATCH] [programming challenge, SSN] Final touches. --- Odpalarka/main.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Odpalarka/main.cpp b/Odpalarka/main.cpp index e027f8e6d..90fb0c08d 100644 --- a/Odpalarka/main.cpp +++ b/Odpalarka/main.cpp @@ -726,11 +726,11 @@ SSN::ParameterSet SSN::getBestParams() SSN::ParameterSet params; - params.actSteepHidden = 1.18; - params.actSteepnessOutput = 1.26; + params.actSteepHidden = 0.784; + params.actSteepnessOutput = 0.713; params.hiddenActFun = FANN::SIGMOID_STEPWISE; - params.outActFun = FANN::SIGMOID_SYMMETRIC; - params.neuronsInHidden = 47; + params.outActFun = FANN::SIGMOID_SYMMETRIC_STEPWISE; + params.neuronsInHidden = 14; return params; } @@ -869,6 +869,10 @@ struct SSN_Runner } else if(command == "ask") { + if(ad.empty()) + { + throw std::runtime_error("Army needs to be set first!"); + } int artid = boost::lexical_cast(secondWord); CArtifact *art = VLC->arth->artifacts.at(artid);