Complete.Org: Mailing Lists: Archives: freeciv-ai: July 2003:
[freeciv-ai] Re: AI Diplomacy v11 (PR#2413)

[freeciv-ai] Re: AI Diplomacy v11 (PR#2413)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [freeciv-ai] Re: AI Diplomacy v11 (PR#2413)
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Mon, 21 Jul 2003 07:14:02 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Sun, 20 Jul 2003, Gregory Berkolaiko wrote:

> Here are some comments to the code (note that I haven't tried compiling 
> it, but spent about 1,5 hours reading the code):
> 1. Comment to aisupport_distance_to_player.


> 12. Assumption that we should wage war at least on one other civ is
> inherent in the code.  In the future it should change IMO.  If the civ has
> decent (or the best) research rate, it should consider getting a tech
> advantage first.

13. In ai_diplomacy11.diff

@ -220,29 +230,42 @@
   for (i = 0; i < MAX_NUM_PLAYERS; i++) {
     struct player *aplayer = get_player(i);

-    ai->diplomacy.player_intel[i].is_allied_with_enemy = FALSE;
-    ai->diplomacy.player_intel[i].at_war_with_ally = FALSE;
-    ai->diplomacy.player_intel[i].is_allied_with_ally = FALSE;
+    ai->diplomacy.player_intel[i].is_allied_with_enemy = NULL;
+    ai->diplomacy.player_intel[i].at_war_with_ally = NULL;
+    ai->diplomacy.player_intel[i].is_allied_with_ally = NULL;

I can see why it's not players_iterate (although I would prefer it this 
way).  But maybe you can skip the players that are dead or not there at 

14. It would be good to have a nice all-in-one printout function for a 
player diplomacy state.  Would be very useful for behaviour debugging.

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