Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: flying AI (PR#1162)
Home

[Freeciv-Dev] Re: flying AI (PR#1162)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: flying AI (PR#1162)
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Fri, 28 Dec 2001 22:40:18 -0800 (PST)

--- Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx> wrote:

Some additional titbits for you. Hope this makes the function clearer.
I strongly suspect you want me to explain the 

else b0 = ((b * a - f * d) * SHIELD_WEIGHTING / (a + d)) - 
1412 c * (unhap ? SHIELD_WEIGHTING + 2 * TRADE_WEIGHTING : SHIELD_WEIGHTING);

Sorry. I'm still trying to figure out the behaviour of amortise myself.
Will send in  a patch sometime next century when I figure out what the
hell Syela was thinking. Basic summary of amortise - we figure out what
the effect of unhappiness will be from building this unit, affect on trade(only
matters for caravans/freights), the shield weighting( to prevent cities
building
one more unit that exhausts all shields). Unfortunately, the devil is in the
details. 

Process_attacker_want 

l = shield_cost_of_tech

j = techs_req

m = unit_move_rate
replace some m's with unit_move_type

f = unit_build_cost

maxd = MIN(6, m) * THRESHOLD + 1;

This seems to set the threshold higher for some units.

if (ferryboat) boatspeed = (unit_flag(ferryboat, F_TRIREME) ? 6 : 12);
 else boatspeed = (get_invention(pplayer, game.rtech.nav) != TECH_KNOWN ? 6 :
12);


My fault. I missed this one. It should be

if (ferryboat) boatspeed = (unit_flag(ferryboat, F_TRIREME) ? 2 * SINGLE_MOVE :
4 * SINGLE_MOVE);
 else boatspeed = (get_invention(pplayer, game.rtech.nav) != TECH_KNOWN ? 2 *
SINGLE_MOVE : 4 * SINGLE_MOVE);

__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com


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