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

[Freeciv-Dev] [PATCH] 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] [PATCH] Re: AI questions
From: Petr Baudis <pasky@xxxxxxxxxxx>
Date: Sat, 24 Nov 2001 20:18:17 +0100

> > > 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.
> 
> Really? How did I miss that? 
35 lines are easy to miss ;-).

> Do we try to sell wonders currently? I strongly suspect you are wrong on this
> point.
We don't, overlooked one test :-).

> > > > > > - 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 :|. 
> 
> All units except for caravan, diplo and settler are military. Explorers are
> almost certainly military.
At least in the default units ruleset, it has NonMil flag.

> > Also somewhat confusing for newcomer, one would say ai_manage_explorer() is
> > explorer-specific.
> 
> Would you prefer a comment? Maybe rename the func ai_manage_explorer_unit.
ai_manage_exploring(), done. Comment accompanied ;-).

Do we need to re-generate warmap in part three? I would remove it, as it looks
only as wasting CPU time for me, the map shouldn't change while executing
that function. What do you think?

Patch is attached. Ok, I reformat one small part of one condition there, but
only because I removed the part of it and it really hurted my eyes otherwise.
And I negated one if condition and switched statements in order to keep it
uniform in both first and third part.

-- 

                                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/

Attachment: aicleanup-exploring.diff
Description: Text document


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