Permalink
Browse files

undo some accidental damage

  • Loading branch information...
1 parent 6d4e441 commit 7bbf6db214fa5f7917f9b1f66268e77b9328231a @a1k0n committed Nov 20, 2011
Showing with 10 additions and 6 deletions.
  1. +4 −2 bot/Ant.cc
  2. +6 −4 bot/Bot.cc
View
@@ -109,16 +109,18 @@ void Ant::MaximizeMove(State &s)
int dir_base = 0;
double bestvalue = -DBL_MAX;
int bestmove = 0, nbest = 0;
-#ifdef MULTIPASS
if(dependUp_) {
+#ifdef MULTIPASS
dependUp_->CommitMove(s);
+#endif
dir_base += 5*dependUp_->move_;
}
if(dependLeft_) {
+#ifdef MULTIPASS
dependLeft_->CommitMove(s);
+#endif
dir_base += 25*dependLeft_->move_;
}
-#endif
fprintf(stderr, "ant (%d,%d) (team %d): ",
origPos_.col, origPos_.row, team_);
fprintf(stderr, "maximizing dirichlet(dep=%c,%c, conv=%d)=[",
View
@@ -7,7 +7,7 @@
using namespace std;
-static const int kNMaximizePasses = 2;
+static const int kNMaximizePasses = 1;
//constructor
Bot::Bot()
@@ -56,10 +56,12 @@ static void AssignConditionalDependencies(vector<Ant*> &ants)
if(j == i)
continue;
int dx = (ants[j]->pos_.col -
- ants[i]->pos_.col + Location::cols) % Location::cols,
+ ants[i]->pos_.col),
dy = (ants[j]->pos_.row -
- ants[i]->pos_.row + Location::rows) % Location::rows;
- //fprintf(stderr, "ant(%d) <-> ant(%d): dx=%d dy=%d\n", i, j, dx, dy);
+ ants[i]->pos_.row);
+#if 0
+ fprintf(stderr, "ant(%d) <-> ant(%d): dx=%d dy=%d\n", i, j, dx, dy);
+#endif
int dist = dx*dx + dy*dy;
if(dx < 0 && dx < dy && dy <= -dx && dist < dist_left) {
closest_left = ants[j];

0 comments on commit 7bbf6db

Please sign in to comment.