<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40453 >

 Accidentally sent this to Madeline only.

---------- Forwarded message ----------
From: Marko Lindqvist <[EMAIL PROTECTED]>
Date: 2008/9/2
Subject: Re: [Freeciv-Dev] (PR#40453) Random assertion failures in map
generation

2008/8/23 Marko Lindqvist:
>
> 2008/8/20 Madeline Book:
>>
>> Testing on S2_2 I get randomly occuring assertion failures
>> whenever I start a new game (5 players, all default settings):
>>
>> 1: The server appears to have gotten into an infinite loop in the
>> allocation of starting positions.
>> Maybe the number of players is too high for this map.
>
>  This might be triggered by separatepoles option fix (meaning poles
> are no longer connecting nearby islands to form huge polar continent).
> In that case S2_1 would be also affected.

 It seems that indeed all that polar oil was flagging these continents
connected to poles much better starting locations than they really
were. As a result requirements for starting position goodness was set
too high.

 Attached patch
 - Makes islands with less goodies (= smaller islands) acceptable
starting positions with generator 1
 - Tries starting position placement more persistently


 - ML

diff -Nurd -X.diff_ignore freeciv/server/generator/startpos.c 
freeciv/server/generator/startpos.c
--- freeciv/server/generator/startpos.c 2008-03-08 16:32:14.000000000 +0200
+++ freeciv/server/generator/startpos.c 2008-09-02 05:35:56.000000000 +0300
@@ -120,7 +120,7 @@
     return FALSE;
   }
 
-  /* Has to be native for tile for initial unit */
+  /* Has to be native tile for initial unit */
   if (!is_native_tile(pdata->initial_unit, ptile)) {
     return FALSE;
   }
@@ -207,7 +207,7 @@
   int k, sum;
   struct start_filter_data data;
   int tile_value_aux[MAP_INDEX_SIZE], tile_value[MAP_INDEX_SIZE];
-  int min_goodies_per_player = 2000;
+  int min_goodies_per_player = 1500;
   int total_goodies = 0;
   /* this is factor is used to maximize land used in extreme little maps */
   float efactor =  player_count() / map.size / 4; 
@@ -380,7 +380,7 @@
       data.count++;
 
     } else {
-      data.min_value *= 0.9;
+      data.min_value *= 0.95;
       if (data.min_value <= 10) {
        freelog(LOG_ERROR,
                _("The server appears to have gotten into an infinite loop "
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to