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

[Freeciv-Dev] Re: AI questions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Petr Baudis <pasky@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: AI questions
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Sat, 24 Nov 2001 06:32:29 -0800 (PST)

--- Petr Baudis <pasky@xxxxxxxxxxx> wrote:
> > > - 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.

It is done in many small bits of the AI code, over a lot of functions. Your
science advisor would concentrate all these bits into one place where it would
be a lot more obvious.

There is no such thing as a trade advisor. There is some crude code for
stockpiling caravans for wonder building, and if there are surplus caravans
creating trade routes, but that's it.

> > > - 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.

This is harder than it looks. Adam Smith matters, barracks matter etc.

> 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..

No I don't think so. Any building which is obsoleted by a wonder, is never
built again. City walls are an exception, but they are not obsoleted by
the Great Wall.

What obsolete buildings cost us nothing? Only improvs that get obsoleted are
barracks. Barracks always cost us something, and until we get the last 
bunch of barracks, they can always be obsoleted.

> > > - 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.

Reinier posted where it is 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..

This can't be right. GB, what is the behavior of explorer units? I have
seen in AI only games explorers get off ships and check out an island.

> > > - 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:
> > >        
> > >
> > >
> > 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().

If that's the way you want to go.
                                Petr "Pasky" Baudis
 UN*X programmer, UN*X administrator, hobbies = IPv6, IRC

I have to mention this. Userfriendly has a char named Petr. Autobiograhical?

Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.

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