[Freeciv-Dev] Patch: changing AI evaluations of buildings.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
In the games that I have watched the AI play, they almost never
build Marketplaces, Banks, or Stock Exchanges. These are some of the most
useful buildings in the game.
These equations give a higher and more realistic valuation to the
buildings. This causes the AI to build them somewhat more often, but still
only in cities with circa 20+ trade.
Index: ai/advdomestic.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/advdomestic.c,v
retrieving revision 1.34
diff -u -r1.34 advdomestic.c
--- advdomestic.c 1999/01/30 03:36:44 1.34
+++ advdomestic.c 1999/02/08 23:20:14
@@ -177,6 +177,7 @@
int est_food = pcity->food_surplus + 2 * pcity->ppl_scientist + 2 *
pcity->ppl_taxman;
struct player *pplayer = city_owner(pcity);
int needpower;
+ int wwtv = worst_worker_tile_value(pcity);
a = get_race(city_owner(pcity))->attack;
t = pcity->ai.trade_want; /* trade_weighting */
@@ -223,7 +224,7 @@
if (could_build_improvement(pcity, B_BANK))
- values[B_BANK] = tax>>1;
+ values[B_BANK] = (tax + 3*pcity->ppl_taxman + pcity->ppl_elvis*wwtv)/2;
j = 0; k = 0;
city_list_iterate(pplayer->cities, acity)
@@ -307,7 +308,8 @@
values[B_LIBRARY] = sci>>1;
if (could_build_improvement(pcity, B_MARKETPLACE))
- values[B_MARKETPLACE] = tax>>1;
+ values[B_MARKETPLACE] = (tax + 3*pcity->ppl_taxman +
+ pcity->ppl_elvis*wwtv)/2;
if (could_build_improvement(pcity, B_MFG))
values[B_MFG] = ((city_got_building(pcity, B_HYDRO) ||
@@ -343,7 +345,7 @@
}
if (could_build_improvement(pcity, B_STOCK))
- values[B_STOCK] = tax>>1;
+ values[B_STOCK] = (tax + 3*pcity->ppl_taxman + pcity->ppl_elvis*wwtv)/2;
if (could_build_improvement(pcity, B_SUPERHIGHWAYS))
values[B_SUPERHIGHWAYS] = railroad_trade(pcity) * t;
--
Anthony J. Stuckey stuckey@xxxxxxxxxxxxxxxxx
"When I was young, the sky was filled with stars.
I watched them burn out one by one." -Warren Zevon
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Patch: changing AI evaluations of buildings.,
Tony Stuckey <=
|
|