Complete.Org: Mailing Lists: Archives: freeciv-ai: January 2003:
[freeciv-ai] Re: (PR#2477) Improved Auto-Explore
Home

[freeciv-ai] Re: (PR#2477) Improved Auto-Explore

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Cameron Morland via RT <rt@xxxxxxxxxxxxxx>
Cc: Freeciv AI development <freeciv-ai@xxxxxxxxxxx>
Subject: [freeciv-ai] Re: (PR#2477) Improved Auto-Explore
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Tue, 7 Jan 2003 16:29:37 +0000 (GMT)

I didn't test your patch, but I have a couple of questions.


+  square_iterate(x, y, range, x1, y1) {
+    int ocean = likely_ocean(x1,y1, pplayer);
+
+    if (!map_get_known(x1, y1, pplayer)) {
+      unknown++;
+      desirable += (ocean >= 50 ? ocean_score : land_score);
+    } else {
+      desirable += (ocean >= 50 ? known_ocean_score : known_land_score);
+    }
+  } square_iterate_end;
+
+  if (is_within_own_city_radius(pplayer, x, y)) {
+    /* Friendly city is not quite the same as own city, but... */

The comment is a bit obsolete (I guess I left it there...)
Also, I feel it should be moved few lines up, right after, unknown++
(x->x1 and y->y1, obviously).  We don't care for explored city tiles, do 
we?

+    desirable += OWN_CITY_SCORE;
+  }
+
+  if (map_has_special(x, y, S_HUT)) {
+    /* we want to explore huts whenever we can. */
+    desirable += HUT_SCORE;

What if we cannot see tile (x, y) ?

I think AI explorer would go straight for an invisible hut here :(
That's a big cheating which can be easily avoided!


G.



[Prev in Thread] Current Thread [Next in Thread]