X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=intelligence.cc;h=558be7ad75325f09ef304b7befdda0c3731bd637;hb=24b702cd5e7623bd4f427814cdaec748f8f27074;hp=1f7968d033906cf76b5aafa928c802beb7a6029a;hpb=5c68b9412710739cc0562ab296a9c8af13e9e71c;p=universe.git diff --git a/intelligence.cc b/intelligence.cc index 1f7968d..558be7a 100644 --- a/intelligence.cc +++ b/intelligence.cc @@ -1,17 +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 // -//////////////////////////////////////////////////////////////////////////////// +// Written and (C) by Francois Fleuret +// Contact for comments & bug reports #include "intelligence.h" @@ -189,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);