Complete.Org: Mailing Lists: Archives: freeciv-dev: May 1999:
[Freeciv-Dev] fast hack for an easy AI.
Home

[Freeciv-Dev] fast hack for an easy AI.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] fast hack for an easy AI.
From: Nicolas Brunel <brunel@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 7 May 1999 18:57:04 +0000 (GMT)
Reply-to: Nicolas Brunel <brunel@xxxxxxxxxxxxxxxxxxxx>

Hello,

Here is a small patch which slow down ai expansion at easy level.
It seems to work well.
I choose a 200x100 world with a landmadd of 35 and generator 1.
At easy level, year 300 ad, AI has 12 towns.

With the same world at hard level, AI has 25 towns at year 1000bc.

--- brunel/freecvs/server/settlers.c    Sun Apr 25 17:14:16 1999
+++ freeciv/server/settlers.c   Fri May  7 17:03:14 1999
@@ -929,7 +929,9 @@
   /** Decide whether to build a new city:
    ** if so, modify: gx, gy, best_newv, best_act */
   
-  if (pplayer->ai.control) { /* don't want to make cities otherwise */
+  if ((pplayer->ai.control) &&
+         (myrand(4) < pplayer->ai.skill_level))
+        { /* don't want to make cities otherwise */
     if (punit->ai.ai_role == AIUNIT_BUILD_CITY) {
       remove_city_from_minimap(punit->goto_dest_x, punit->goto_dest_y);
     }

Regards,


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