Complete.Org: Mailing Lists: Archives: freeciv-ai: May 2002:
[freeciv-ai] Re: Generalised improvements AI support

[freeciv-ai] Re: Generalised improvements AI support

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>, Freeciv-ai <freeciv-ai@xxxxxxxxxxx>
Subject: [freeciv-ai] Re: Generalised improvements AI support
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Wed, 8 May 2002 04:42:57 -0700 (PDT)

--- "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx> wrote:
> On Wed, 8 May 2002, Raahul Kumar wrote:
> > I didn't say compute flags. I said compute the best unit! That means
> instead of checking if a unit has F_NUCLEAR, select it based on its
> attack damage. I hope this is more explicit.
> You do _not_ want to build a nuclear unit based on its attack power.

It might not work right for nukes, because there is no good way of representing
their ability to destroy surrounding units. Actually, why not? The AI would
certainly build lots of nuke units. Who cares about pollution if you conquer
the world! As long as they were smart enough to target cities it's all good.

> The ruleset authors don't always do a good job. Is it true that tank is
> attack_good, or is maybe a howitzer far better against cities? Also,
> conversely, isn't a tank much better outside cities. A single tank could 
> kill three howitzers. One howitzer cannot kill three tanks.
> AFAIK, attack_good is ignored anyway.

Exactly. We have a useless role that no one cares enough to remove. I think
there are a few other roles that look dodgy. 
> > > The gen-unit approach is more general. The questions are: how much
> > > generality do we need and how much does it cost us.
> >
> > We need all the generality we can possibly get. Unfortunately, we also need
> all the performance we can possibly get.
> Exactly.
> Increased generality also leads to increased complexity in the code. The
> gen. impr. code is frightening in complexity compared to unit flags. I'll
> grant you that generalised combat bonuses might be something we should
> add, but I don't think we should replace the entire flags system in favour
> of generalised units attributes like gen. impr. generalises buildings.

Explain your viewpoint. I'm not sure why you don't like generalised buildings.
I would have thought you'd like the idea of making Freeciv like a game engine.
Plug in the right ruleset, and you transform it from Civ 1,2,3 or SMAC.

If it's performance you're worried about, you can be sure once the patches are
in CVS some serious work will be done to wring the last cpu cycle out of them.
And talk to Ben about performance. He knows much more about it than I do.

And performance is not the holy grail. 

> > You're missing a big drawback with the current approach. As far as
> possible, I always thought our goal was to make Freeciv configurable via 
> rulesets. I want to keep modpack authors out of the code.
> Yes.
> > Consider: If someone wanted to add the proper Civ 2 air combat to Freeciv
> > before my changes. If the land of AC patches, I could have opened a
> tileset, added some unit_defend changes, and I would have been done.
> >
> > Time taken: 5 minutes, and that's being generous. Includes testing time.
> You are giving much too little time to testing!

Guilty. But I had a savegame pre-generated.

> > Current system: I have to find the parts of the code that deal that matter,
> > combat.c, which is easy to find/understand. Not a fair test. There's lots
> of other freeciv code which is much harder to grok. Now that I've changed the
> > flags system, I have to compile, fix any compile errors, and finally I'm
> ready to test my patch. Time taken: 15 mins, without testing.
> And not counting time-to-cvs ;)

True, but that would be the same for both options. But a maintainer could rest
easy knowing that my first patch would not wreak any insidious damage. But
patch 2, using the current method, could have any number of unknown bugs.

Consider : It would make your life or that of any other maintainer easier.
It would not necessarily make the developers life easier I admit. But
considering there's only two devs actively working on F_flags and roles,
I think that's ok ;-). 50% of the pop is convinced. Come to the dark side Per.

> Yours,
> Per
> "There are 10 types of people in the world. Those who understand binary
> and those who don't."


I love deadlines. I like the whooshing sound they make as they fly by.
Douglas Adams

Do You Yahoo!?
Yahoo! Health - your guide to health and wellness

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