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 16:05:12 +0100

> > 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.
Ok, will add it to my TODO :-).

> 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.
And poor little and totally empty advtrade.c.

> > 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.
Yeah, true. So let's check it against original value from ruleset.

> > 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.
Yes, but they are taken as 'duplicate', de-facto obsoleted, even if you still
can build them. This would make that more universal, and even save few cpu
cycles not vainly trying to sell wonders. We should imho move AI less
default ruleset dependent, and this would help it.

> 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.
I took City walls as obsoleted by Great wall, ok, they aren't. However they
frequently acts in such a way.

> > > > - 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.
http://www.freeciv.org/lxr/source/ai/aiunit.c#L408
It only works for exploring military units however :|. Also somewhat confusing
for newcomer, one would say ai_manage_explorer() is explorer-specific.
Apologies.

>                               Petr "Pasky" Baudis
>  
>  UN*X programmer, UN*X administrator, hobbies = IPv6, IRC
> 
> I have to mention this. Userfriendly has a char named Petr. Autobiograhical?
;-)))

-- 

                                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]