This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Up next: facility_worth?


On Thu, 2002-07-25 at 09:24, Hans Ronne wrote:
> My long range plan for the AI is to move all building code to a new
> PLAN_BUILD and consolidate it there. I think this would simplify things
> enormously and solve many problems. For several reasons, I don't like the
> current solution where cities are assigned offensive or defensive plans
> etc. and then try to build accordingly. As for PLAN_IMPROVE, my original
> intent was that it would deal with things like terrain improvement and
> perhaps also tech development rather than with building.

I suppose that that would require improvement to be further divided into
categories such as municipal improvement, land improvement, and
technological improvement.  However, in the case of technological
improvement, I don't think that human players can easily do tech
development (not advances) or tooling without actually building the unit
being developed, and so I'd be reluctant to make that easy for the AI.

> 
> That being said, we could definitely use a better facility_worth function.
> I agree with your analysis of the problem. It is indeed difficult to
> compare the relative worths of effects on growth, defense, production etc.
> However, this comparison needs to be done somewhere, if not in
> facility_worth, then in the AI build code. Several distinct facility worth
> functions might be helpful, but only when supported in the build code. For
> the time being, I think we should go for a single improved facility_worth
> that considers at least the most important stuff. This would be (in order
> of importance):
> 
> 1. Growth of the unit.
> 2. Its defense.
> 3. Its production.
> 4. Everything else.
> 
> Crude weights could be assigned accordingly.

My idea was that PLAN_IMPROVE could try to analyze the situation
surrounding the city and weigh the different types of facilities
accordingly (e.g. higher weight to defensive facilities if there's
fighting within ai_tactical_range, higher weight to growth/production
facilities otherwise).

> 
> Because it is difficult to consider all possible facility properties in all
> games, and since their usefulness may vary from game to game, I think there
> is another solution that we should include, and that is for the game
> designer to assign these numbers.

That would work as well, although I'd still like to be able to make the
AI understand the value of the facilities that it's building.

> 
> BTW, designer-assigned values is something we should support also in the
> other worth functions. As it now stands, they will sometimes produce absurd
> results, which could be manually adjusted this way. One example is the AI's
> inclination to use nuclear missiles for exploration. This could be fixed by
> also factoring the effective lifetime of a unit into the explorer worth.
> However, there are many other examples like that.

I think that nuclear missiles also are problematic because the AI
doesn't understand detonating weapons.  Maybe the AI needs an additional
"worth" function to determine the value of units that are used up when
they attack other units (nuclear bombs, cruise missiles, lightning
bolts, etc).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]