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


>I've been following the discussion with some interest.  Something you
>might consider doing is normalizing your calculations for each type of
>calculation.  For example,
> if  you determine the speed for all units, then multiply by 1000, and
>divide by the fastest unit, you'll come up with a number between 0 and
>1000, ranking the unit by speed.  If you do that for each factor you
>might want to consider, you can then build a weight table to combine the
>factors into a total number representing the value of the unit.  The sum
>of the weights shold sum to a number that you divide into the result.
>For example, say there are 6 factors, f1 to f6.  You would calculate the
>value by ( f1 * w1 + f2 * w2 + f3 * w3 + f4 * w4 + f5 * w5 + f6 * w6) *
>1000 / (sum of weights).  This would give yoou a value between 0 and
>1000 for the value of the unit.  If you need a negative factor, like
>construction points, or tooling points, etc. you'd do the same
>normalizing operation, but subtract the result from 1000 to reverse the
>rankings.

What you are suggesting is that instead of multiplicative worths, where
each factor is multiplied into the result, we should use an addititive
worth, where weighted terms are added together. I see your point, but I'm
not sure that this is the way to go. It would force us to make a weight
decision for every single term. The problem is that there is no obvious way
to make these decisions. For example, is a doubled speed worth twice as
much, half as much, or just as much as a decrease in construction cost by
50%? The answer is none or all of the above, depending on the type of unit
and the game.

A muliplicative worth is attractive precisly because there is no such
weighting problem. I also think it is more intuitive. If you think about
it, most real life comparisons involving several qualitatively different
numbers are done this way, by multiplying the factors into a product. This
is why we use the word factor (a mathematical term) the way we do in
everyday language.

The multiplicative approach works fine as long as we have a way of
assigning distinct values, such as speed, to individual units. I think the
latest version of Lincoln's exploration formula illustrates this. A problem
does arise when we want to compute attack and defense weights in combat
model 0 (the standard xconq combat model). The reason for this is that
there are no absolute attack or defend values similar to speed. All we have
is the hit-chance table, which gives relative strenghts of different units
against each other. The AI code tries to handle this by summing up and
averaging the hit chances against all units in the game, but I think there
is room for a lot of improvements here.

With combat model 1 it is much easier. You just use the unit's unique
attack and defend values. Check out offensive_worth and defensive_worth in
ai.c to see what I mean.

Hans





Hans Ronne

hronne@pp.sbbs.se



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