Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: AI questions
Home

[Freeciv-Dev] Re: AI questions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: AI questions
From: Petr Baudis <pasky@xxxxxxxxxxx>
Date: Sat, 24 Nov 2001 11:32:37 +0100

> > - advisors - unimplemented mostly, will their tech. advise ever be
> > implemented?  Is it needed? If so, should we implement it now? Doesn't seem
> > to be too difficult to me. Shouldn't them all advise both buildings and
> > technologies? (almost all, well :) It looks to me we should implement them,
> > to help AI start trading etc sooner and evolve more carefully.
> > 
> 
> The ai currently seems to use the rulesets to decide what techs to shoot for.
> It does have code in there to evaluate techs, based on flags like Defend
> good.  Go ahead and implement one, it can't hurt.
AFAIK it decides accordingly to how many other techs it will make available to
it, but with many modifications from other parts of code, currently i know
about changing in code deciding what unit to build in order to defend the city,
there must be others as well. I can imagine trade advisor suggesting
researching trade, science advisor suggesting to research
writing/university/computers etc.. However maybe this is already done
somewhere, i still have read only part of the code.

> > - buildings - when city has nothing to build and settlers seem too
> > dangerous, shouldn't it try coinage?
> >
> No. Currently the ai still trys to buy coinage. That is pretty hairy to fix,
> good luck to you.
Will give a try to it..

Also it looks we can try to sell palace when we need money (we only won't sell
city walls), which may lead to big problems (as mentioned in another thread
;-). Maybe we shouldn't try to sell anything with upkeep 0, as it won't drain
us anyway and we can get into problems w/o it, as it is usually something
special.

Selling palace doesn't threaten in ai_sell_obsolete_unit(), however i would
modify that too, as we can keep obsolete buildings there, if they don't cost us
anything, because who knows, wonder which obsoletes them may get obsoleted
etc..

> > - 13th city - in the README.AI, it's told it is unlucky. just a joke? ;-)
> >
> There is a threshold, after a certain no of cities the next city has more
> unhappiness, more corr etc.
Strange I can't find that anywhere in the code.

> > - explorers - they say they don't use ferryboats to explore new land,
> > however glancing on the code it looks they do.
> >
> Just plain wrong comments.
Aha.. after careful reading it looks it will travel to another continent only
in order to return to their home city. Strange..

> > - spaceship - shouldn't we launch spaceship also if our capital is in
> > danger and we have reasonable reliability (>50%) or if someone already
> > launched it and we would get sooner there and have reasonable reliability
> > (>75%).. kinda:
> >          
> > launched_spaceships*(our_traveltime*our_reliability/avg_traveltime*avg_reliability)
> >
> Your change seems good. Have you read all of advspacehip.c though?
(advspace.c ;-) I wouldn't write this otherwise. Actual code is however in
aihand.c in ai_manage_spaceship(), called each turn. Anyway, it will be better
to make some function like ai_can_launch_spaceship() in advspaceship.c and ask
it in ai_manage_spaceship().

-- 

                                Petr "Pasky" Baudis

UN*X programmer, UN*X administrator, hobbies = IPv6, IRC
Real Users hate Real Programmers.
Public PGP key, geekcode and stuff: http://pasky.ji.cz/~pasky/


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