X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=intelligence.cc;h=558be7ad75325f09ef304b7befdda0c3731bd637;hb=f5b2d5436a16166410d9e58c68b9bf5d6f8db389;hp=53bdab82ec743ae38e461a13f960bc9984ab7985;hpb=ba46b057f3e2613a86f2dea7fa8022990482c735;p=universe.git diff --git a/intelligence.cc b/intelligence.cc index 53bdab8..558be7a 100644 --- a/intelligence.cc +++ b/intelligence.cc @@ -1,19 +1,6 @@ -//////////////////////////////////////////////////////////////////////////////// -// This program is free software; you can redistribute it and/or // -// modify it under the terms of the GNU General Public License // -// version 2 as published by the Free Software Foundation. // -// // -// This program is distributed in the hope that it will be useful, but // -// WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // -// General Public License for more details. // -// // -// Written and (C) by François Fleuret // -// Contact for comments & bug reports // -//////////////////////////////////////////////////////////////////////////////// - -// $Id: intelligence.cc,v 1.34 2006-12-18 15:01:09 fleuret Exp $ +// Written and (C) by Francois Fleuret +// Contact for comments & bug reports #include "intelligence.h" @@ -191,7 +178,7 @@ void Intelligence::learn(scalar_t proportion_for_training) { int Intelligence::best_action() { int max_a = -1; - scalar_t q, max_q; + scalar_t q, max_q = 0; cout << "ACTION_SCORES"; for(int a = 0; a < _nb_actions; a++) { q = _q_predictors[a]->predict(_input->parameters);