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


Lincoln Peters <peters2000@mindspring.com> sez:

> I added some more code to the exploring_worth function.  This new code
> considers the types of terrain that a unit can survive on, move around
> on, etc., and incorporates that into the overall worth.  This particular
> piece of code should favor aircraft (because they don't vanish or wreck
> anywhere, and move at the same rate on all terrain) and ships (assuming
> the map is mostly water), but the "range" code should still stop the AI
> from considering short-range aircraft as good explorers.

I'm becoming lost in the actual code itself, since I'm not sure
what everything means, and don't want to learn it all right now.
I'm basing my comments on your qualitative description above,
and the numbers generated by the code.

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?

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

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.

> It shouldn't be too difficult to also incorporate some of Bob
> Carragher's ideas, such as vision-range, visibility, construction time,
> and defensive worth.  Of course, some ideas, such as supporting units
> (e.g. fighters, subs, and destroyers as escorts for a carrier) are still
> too far beyond the understanding of the AI to be implemented at all. 
> But I do think that they'll be possible at some point.

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.

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.

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.

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

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.

Sorry to not really be helpful here.  These all seem to be very
complex considerations.  Even with all the xconq games I've played,
I don't have any good suggestions.  Perhaps what would be useful
would be a couple of mechanisms:

     1.  Perhaps this could be a configuration option for a
         game, but providing weights for each of these
         different considerations.  Thus, we could have, for
         example, different "standard" games with different
         weights.  This would allow for lots of testing
         without needing to recompile xconq.  That leads to:

     2.  A mechanism that keeps track of the value assigned to
         all units when a decision was made to build an explorer
         and also to assign a final "explorer value" for the job
         it did for its lifetime.

With these two mechanisms, at least, a lot of automated testing
could be done to help determine reasonable ranges for the weights.
Or give us a starting base to determine what ideas deserve greater
weight.

> [explorer_worth function deleted]
> 
> And the worths it assigns to units in the standard game are:
> infantry:		972
> armor:			2520
> fighter:		18684
> bomber:			37368
> destroyer:		40200
> submarine:		40200
> troop transport:	53600
> carrier:		187200
> battleship:		93600
> nuclear bomb:		106560
> base:			0
> town:			0
> city:			0
> 
> (The reason that these numbers are so much higher than before is that
> it's taking a lot more factors into account.  The numbers may be bigger,
> but they're also more accurate.)

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?

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.

				Bob

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