Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] CMA
Home

[Freeciv-Dev] CMA

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] CMA
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Tue, 25 Sep 2001 05:14:11 -0700 (PDT)

I've been reading the sma6.diff you sent me. The agents needed for a full ai

Manage_diplomacy
(subagent manage diplomat?)
Manage trade
How many caravans from which cities to which other cities
Manage techtree
manage city_improvements(goes into city management?)

Manage wonders

I have run into what I call the Great Library wonder problem as far as wonder
management goes.
You may recall that the Great library only gives you techs two other civs have
researched.
Therefore as number of players in the game goes down the value of this wonder
sharply decreases.
I've been trying to write a general function that computes the value of a
wonder for the AI

based on 

a) number of turns wonder is in effect
b) amount of techs req to get wonder
(if it is possible to build 3 wonders before you get one really great wonder)
c) no of players in game

and cannot think of a way to make it general enough. The wonders can be changed
via rulesets,
so if someone adds a new wonder that relies on the no of people in game:

how does the AI cope?

I think a few lines can be deleted from the function real_optimize_worker

if (missing[FOOD] < 0)
+      missing[FOOD] = 0;
+    if (missing[SHIELD] < 0)
+      missing[SHIELD] = 0;
+    if (missing[TRADE] < 0)
+      missing[TRADE] = 0;
+

Possible to delete the above lines entirely. Simply substitute

+    /*
+     * we satisfied the wish, but we need to put all workers 
+     */
+    if (missing[FOOD] <= 0 && missing[SHIELD] <= 0 && missing[TRADE] <= 0) {

for the current

+    /*
+     * we satisfied the wish, but we need to put all workers 
+     */
+    if (missing[FOOD] == 0 && missing[SHIELD] == 0 && missing[TRADE] == 0) {



__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. 
http://im.yahoo.com


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