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

[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: Tue, 7 May 2002 17:58:43 -0700 (PDT)

--- "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx> wrote:
> On Tue, 7 May 2002, Raahul Kumar wrote:
> If I'm the one finally implementing AI diplomacy, I won't allow my code
> to be sullied by such idiocy. To allow buildings to influence AI players and
> AI players only, is crap. I'd be glad to see those go.
>
> If you're the only one? I don't see any other working implementations. Let
> me ask you to change your mind. Civ II was originally a single player game
> only whereas Freeciv is multiplayer. In a single player game, it makes sense 
> to have wonders that can affect the AI.
> >
> > If I ever want to achieve 100% Civ 2 compatibility, I'll need those
> effects. Toss me a bone here Per.
> 
> Ok. If you really want to implement lame AIs, be my guest ;)

;-). You love the idea, I can tell. Deep deep down inside. And if you hate the
lame AI idea, you'll loathe this far more. I'll have to try and implement a
great wall effect, that all players have to offer peace when asked by the
owner. This applies for AI and human!

> Aargh! My worst Civ II playing memories consist of the senate overriding my
> bloodthirsty desires. If you want this annoying misfeature, people will
> have to demand it. I intend to quietly ignore it in the hopes that it will go
> away.
> >
> > I certainly don't see anyone wanting it.
> 
> The Senate was mostly annoying, yes. But without, we should try to balance
> Republic and Democracy in another way, because they are too powerful
> (comparatively) as is.

I sort of see your point. But I consider fundamentalism to be far more powerful
once you have the techs for howitzer and battleship. But if you combine
democracy with happiness wonders/ science they are a monster.
 
The unhappiness problems with having a lot of military units, shield upkeep,
more than one turn in disorder leads to anarchy, democracy and republic have
enough handicaps. Now if you talk about a spacerace, there is no doubt what the
only gov to choose is.

It's really the rapture effect that is so powerful. And we have a tool to fix
that: rapturedelay.

Weaken democracy too much and everyone will pick communism.

> > > I'm only worried it might get a little too complicated. The flags code is
> > > simple to understand, simple to code and simple to extend. The gen. impr.
> > > approach is none of the above. But this is another discussion.
> >
> Simple to extend? *Bullshit* cough. I seem to remember two people who've
> already run hard into Raimar's decision that the current no of flags + 2
> was enough.
> 
> Being fixed.

Did you find the bug?
 
> And simple to understand: Have you read combat.c? The convulutions I had to
> go through to support Aegis properly etc is fast reaching the point where the
> flags system cannot cope.
> 
> It has its weaknesses.

Flags and roles are not a good approach. I'd prefer the AI to compute what the
best unit is.
 
> And worst of all, the flags system is only open to two coders, Per and
> myself. Have you seen anyone else send in patches? The AC approach is better.
> Moving stuff into rulesets is the obvious and smart approach.
> 
> I am in doubt how much extra, needed flexibility this approach will give.
> To convince me you will need to post an example ruleset or something (like
> a list of sensible units that cannot easily be created with flags) that
> shows me why I am wrong.

I'll offer you two types of evidence. If there are any modpack writers reading
this email, please chip in. One: the existing sytem is far too limited. Look at
all the existing modpacks. They all implement the exact same wonders, and quite
often the exact same units, just with different graphics. The Ancients modpack
is a great example of this. The buildings are uncannily similar.

Two: Let's use unit_defend, my favourite part of impr-gen. Yes, it's currently
limited to buildings, but it would be trivial to extend it to units. With unit 
defend, you can replace the following flags

F_AEGIS
F_PIKEMEN
F_HORSE
F_MISSILE
F_HELICOPTER -> Ben assures me that negative bonuses work with his code. 

And what if people decide to add two new effects, say for example a 300% bonus
against ships, and 300% def penalty for tanks when attacked by helis. In the
current system I would have to introduce two flags

F_SHIPBUSTER
F_TANKBUSTER

Then I would have to open combat.c, and actually use those flags! Substitute
relevant bit of code for combat.c where it applies. Now combat.c is relatively
clean compared to most of the code in CVS. I don't think it would be easy for a
newcomer to grok it.

And under the current CVS, it would mean NO one else could add flags again.

This is the wrong approach. I know you probably agree Per, that the right
approach is to have the users modify the rulesets, rather than the actual code.

Best of all, we could stick with the same approach. One bit of code doing
unit_defend means we can ditch an enormous no of flags.

> > Something that should be added as Todo in the AI doc, Per. Well, AI does
> > apparently use ports. I seem to have come across a function
> > find_nearest_friendly_port. I haven't the slightest idea if this is ever
> used.
> > Can anyone confirm/deny?
> 
> Confirm. When an AI naval vessel does not find a target, it bolts back to
> nearest allied port where it stays until a target can be found. It does
> not seek out a port to heal, however.

Does it at least stay long enough at the port to recover all hps? I'm hoping
someone is paying attention to this. Is anyone in the Crew working on fixing
the 
hp recovery problem?

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

Aloha,
RK.

If it looks like a duck, and quacks like a duck, we have at least to consider
the possibility that we have a small aquatic bird of the family anatidae on our
hands.
{Dirk Gently's Holistic Detective Agency, 1987, Douglas Adams}


__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com


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