]> ruin.nu Git - icfp05.git/commitdiff
commented out debug output
authorMichael Andreen <harv@ruin.nu>
Sun, 10 Jul 2005 21:34:40 +0000 (21:34 +0000)
committerMichael Andreen <harv@ruin.nu>
Sun, 10 Jul 2005 21:34:40 +0000 (21:34 +0000)
icfp05.pro
newrobber/robber.cpp

index 361cdb1f72b7a4c6742efc7f62f013c4a56071ac..e798b5eead884a3ab48c8c3d2ef1f6c055101d51 100644 (file)
@@ -4,4 +4,4 @@
 
 TEMPLATE = subdirs
 
-SUBDIRS = robbersrc copsrc
+SUBDIRS = robbersrc copsrc newrobber
index f2a32416a6b9f42c7afc31e605c895b8217f4d2c..46ca6404808a395bfbec94a372df2fbe44a30065 100644 (file)
@@ -12,19 +12,19 @@ string Robber::turn(){
        //Ignore bribing for now
        cout << "nobribe:" << endl;
        string input;
-       cerr << "New turn" << endl;
+       //cerr << "New turn" << endl;
        getline(cin,input);
        _time = clock();
 
-       cerr << "Starting to calculate shortest path" << endl;
+       //cerr << "Starting to calculate shortest path" << endl;
        list<string> l = shortestPath(_location, robber,*this, *this);
        _oldLocation = _location;
        if (l.size() > 0){
-               cerr << "Found a route" << endl;
+               //cerr << "Found a route" << endl;
                list<string>::iterator i = l.begin();
                _location = *++i;
        }
-       cerr << "Moving to: " << _location << endl;
+       //cerr << "Moving to: " << _location << endl;
        return _location;
 }
 
@@ -51,16 +51,16 @@ int Robber::cost(const std::string& from, const std::string& to) const{
        list<string> closestFootCop = shortestPath(to, cop_foot, FindPlayer(_players, cop_foot, max), true);
        unsigned int closestCop = closestFootCop.size();
        bool copInCar = false;
-       cerr << "Cop on fot " << closestCop << " intersections away: ";
-       copy(closestFootCop.begin(), closestFootCop.end(), ostream_iterator<string>(cerr, " : "));
-       cerr << endl;
+       //cerr << "Cop on fot " << closestCop << " intersections away: ";
+       //copy(closestFootCop.begin(), closestFootCop.end(), ostream_iterator<string>(cerr, " : "));
+       //cerr << endl;
 
        if (closestCop > 0)
                max = closestCop;
 
        if (max > 1){
                list<string> closestCarCop = shortestPath(to, cop_car, FindPlayer(_players, cop_car, max - 1), true);
-               cerr << "Cop in car " << closestCarCop.size() << " intersections away." << endl;
+               //cerr << "Cop in car " << closestCarCop.size() << " intersections away." << endl;
 
                if (closestCarCop.size() > 0){
                        closestCop = closestCarCop.size();
@@ -72,12 +72,12 @@ int Robber::cost(const std::string& from, const std::string& to) const{
        if (closestCop > 0 && closestCop < 4)
                return 100;
 
-       cerr << "cost before cop: " << cost << endl;
+       //cerr << "cost before cop: " << cost << endl;
        if (closestCop > 2){
-               cerr << "Cop " << closestCop << " intersections away." << endl;
+               //cerr << "Cop " << closestCop << " intersections away." << endl;
                cost += 12 - (copInCar ? closestCop : closestCop - 1);
        }
-       cerr << "cost after cop: " << cost << endl;
+       //cerr << "cost after cop: " << cost << endl;
 
        if (conInter->second.type == bank){
                //cerr << "FOUND A BANK" << endl;
@@ -91,7 +91,7 @@ int Robber::cost(const std::string& from, const std::string& to) const{
 
        if (to == _oldLocation)
                cost *= 2;
-       cerr << "Street: " << to << " cost: " << cost << endl;
+       //cerr << "Street: " << to << " cost: " << cost << endl;
 
        return cost;
 }