Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2002:
[Freeciv-Dev] Re: [Patch][RFC] AI can fly
Home

[Freeciv-Dev] Re: [Patch][RFC] AI can fly

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [Patch][RFC] AI can fly
From: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>
Date: Mon, 4 Mar 2002 09:37:05 +0100 (MET)

On Sun, 3 Mar 2002, Raahul Kumar wrote:
> Yes. If you're wasting time building UN while I'm building Hoover Dam or Seti,
> guess which one of us wins ?

I think the easiest and best solution is to embed AI hints in
buildings.ruleset, instead of trying to guess. For example
ROLE_BEST_SEAWAR (Magellan), ROLE_BEST_LANDWAR (Great Wall),
ROLE_BEST_PRODUCTION (Hoover Dam), ROLE_BEST_SCIENCE (Newton's),
ROLE_BEST_HAPPINESS (Michalangelo's), etc...

> > > This might be invariant. Only a few wonders become pointless in certain
> > > situations i.e Great library becomes less and less valuable with few
> > players,
> > > becomes 0 with 2 players, very little with 3.
...
> > See advdomestic.c:ai_eval_buildings().
> >
> >       if (id == B_GREAT) {
> >         values[id] =
> >             (total_bulbs_required(pplayer) * (100 - game.freecost)) * t *
> >             (game.nplayers - 2) / (game.nplayers * 100);
> >       }
> >

ROLE_BEST_MANYPLAYERS instead of hard-coded into B_GREAT...

> Problem right there. I do not see a generic rate_wonder function, where all
> the wonders are rated by the their effects. I.e affects production flag etc.

I think that would be very hard, since generalised improvement effects
will be very generalised eventually. So it is not only very hard to get
this right, but it will require lots of computation, and we or a modpack
author are more likely to get it right anyway.

> That's my problem. It should all be in advscience.c.

There's lots of reorganization that should take place in ai/, but let's do
that another day, ok? For one thing, let's rip the remaining AI stuff out
of server/.

> > > Transport - railroad.
> >
> > Ok. To be honest, I've no idea how/where this is considered.
>
> True. Maybe railroad, bridge building, and airport techs, as well as other
> transport enabling techs should have their own handling.

I don't think those are important enough for the AI to bother. Those techs
will get there, eventually.

> The path I described has never been followed by any AI. I have never seen an 
> AI
> select it's highest trade city, build all the science wonders there, celebrate
> every turn to pump it to a high level. The Super Science city would really 
> help
> the AI.

I think maybe it would be a good idea of the AI gave its cities roles. For
example, it might choose the first city near more than X tiles of water to
get over X science as a CITY_ROLE_SCIENCE, where it would build only
defenders for the city, and science increase buildings. This could also be
used for aircraft (CITY_ROLE_AIRCRAFT), as it could set aside, say, 1/10
inland cities and build airports and aircraft in those. Thirdly, the city
that at any one time has the higher production might be CITY_ROLE_WONDER,
for building all the non-science wonders that we want.

Yours,
Per

"What we anticipate seldom occurs: but what we least expect generally
happens." -- Benjamin Disraeli



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