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: More revisions to exploring_worth


On Sun, 2002-07-21 at 23:22, Bob Carragher wrote:
> Something else that didn't occur to me until this message is that
> water-based units are useful only for determining the outline of
> the islands and continents (and one or two sectors of beach).  If
> the islands and continents don't have enough inlets, you can't
> really determine very much about them.  But that's where all the
> production occurs and all the value is located, at least in the
> standard game.  The oceans just present a barrier to obtaining
> production/value (or beating an opponent).  Is this something else
> that should be considered?  Or is this introducing too much
> specialization into the exploring_worth function?

Theoretically, once the AI has a working "Transport" plan, it should be
possible to take ground units to the unexplored islands and have them
explore the inland parts of the islands.  Of course, that will have to
wait until there is a "Transport" plan at all.

> 
> In any case, hopefully this function won't always favor sea-based
> units.  Otherwise the AIs' exploration will be severely constrained.

It favors whichever units move most quickly (aircraft), whichever units
have the longest range (ships), and whichever units can move around on
the most kinds of terrain (aircraft).  It's balanced so that the range
is usually more important, and so most of the time will tell the AI to
build ships to explore.  If the game uses a mostly land map, it should
favor land units such as infantry because there would be more terrain
that they could handle.

> 
> As for what the code "should do," I think it's still not favoring
> the correct things.  But I'll discuss that with the numbers.

The most important factors all too often seem to be the most difficult
to consider.  I'm trying to start with the factors that are easiest to
implement, and then I'll tackle the more difficult things like
construction time later.

> 
> I agree with the latter (that it's tough to incorporate the
> concepts of escorts and battle groups in a generalized AI).  I'm
> not sure I agree that it "shouldn't be too difficult" to
> incorporate all the other points I brought up.

I said it shouldn't be too difficult to incorporate _some_ of your
ideas.  Vision range should be fairly easy, but defensive worth and
construction time may be much more difficult.

> 
> With vision-range, you would need to consider the type of terrain
> that might be out there, assuming the territory to be explored has
> not yet been explored, versus what terrain can definitely be
> explored in a given region taking into account whether the unit
> can access it and whether it can survive the trip through the
> access route.

I set up the code that weighs terrain so that the weight for any terrain
type is the occurrence of that terrain divided by the cost to enter it. 
Terrain that will cause the unit to vanish or wreck is specifically
excluded and has a value of zero.  The final number is the sums of the
weights of all terrain types for that unit.

Looking back at the code, I realized that so far it only works if the
map was generated using the make-fractal-terrain synthesis method.  It
could do very strange things in games that use maze terrain (cave.g,
cave2.g) or random terrain (africa.g).  Looks like I have some more
coding to do anyway.

> 
> Visibility is probably relatively easy:  what are the chances I
> can be seen versus the units that are likely to run into me?  But
> how important should that be?  In the postmodern world (for which
> I've not yet been able to build a version of 7.5pre that doesn't
> crash -- still working on that), if the spy planes have the same
> "hidden" factor that I recall them having in the old abstract
> period, then it's no contest -- build spy planes for all your
> exploration and reconnaissance after maybe first a reconnaissance
> fighter.  Spy planes also have the greatest single-turn movement
> (12 hexes), and a very large fuel reserve (48 units), so they have
> a range of 24 hexes, so that would probably greatly increase their
> explorer_worth anyway.

Well, because most Xconq games are outright war games, perhaps
visibility would be fairly easy.  Maybe if the scorekeeper is set to
"last side wins", units that are more difficult to see should always get
a bonus to their exploring_worth. I'd still like to make it consider
construction time and defensive worth first, so the AI wouldn't have a
fleet of subs that would be easily wiped out by an opponent's destroyers
and bombers.

> 
> Construction time is probably easier than visibility, unless there
> are relatively complex construction considerations (e.g. research,
> "technology levels").

I think that considerations like construction time, toolup, and
technology should be implemented in *all* of the worth functions.  Maybe
such code should be a separate function that's accessible to the other
"worth" functions.  What I don't know is *how* they should be weighted.

> 
> Defensive worth is tough.  A fighter can be shot down by lots of
> things, funnily enough, but it moves so quickly that it might not
> be in a lot of danger.  An armor is hard to destroy, but is fairly
> limited.  How much weight should "defensive worth" be given?  As
> with visibility, one would also need to consider what it would run
> into.

What the AI really needs here is to be able to determine what units are
most effective against other units (e.g. fighters vs. bombers).  I don't
think that it can do that yet.  Look at future.g for an example of how
badly the AI plays when you have lots of such relationships.

> 
> Again, the sea-based units all have higher worth than any
> of the land and air units (except the nuke).  Would any of
> the players reading this email ever build a troop transport
> over a fighter for exploration purposes?

The troop transport is designed to work as a transport, but the
transport code in the AI is only partially implemented.  Once it's fully
implemented, it should allow the AI to realize that the troop transport
makes a better transport than anything else, so the high exploring_worth
here shouldn't matter.  At least it works in theory; I don't know
anything about the transport code.

It also seems that the land units should have higher worth than they
currently do, because they don't need to be refueled (unless they're
moving through desert, mountains, or swamp).  Looks like more debugging
is in order.

> 
> I guess the code is doing what it's intended to do:  favor
> aircraft and ships, but still give the nod to the ships
> because all the aircraft are "short-range" in comparison.

That is what it should do, unless the game definition provides an
airplane that has as good a range as a battleship or a carrier.


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