Removed generate from the Makefile.
[universe.git] / intelligence.cc
index 1f7968d..558be7a 100644 (file)
@@ -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 <francois.fleuret@epfl.ch> for comments & bug reports              //
-////////////////////////////////////////////////////////////////////////////////
+// Written and (C) by Francois Fleuret
+// Contact <francois.fleuret@idiap.ch> for comments & bug reports
 
 #include "intelligence.h"
 
 
 #include "intelligence.h"
 
@@ -189,7 +178,7 @@ void Intelligence::learn(scalar_t proportion_for_training) {
 
 int Intelligence::best_action() {
   int max_a = -1;
 
 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);
   cout << "ACTION_SCORES";
   for(int a = 0; a < _nb_actions; a++) {
     q = _q_predictors[a]->predict(_input->parameters);