This is the mail archive of the
xconq7@sources.redhat.com
mailing list for the Xconq project.
Re: More revisions to exploring_worth
- From: Hans Ronne <hronne at pp dot sbbs dot se>
- To: Lincoln Peters <peters2000 at mindspring dot com>
- Cc: xconq7 at sources dot redhat dot com
- Date: Mon, 22 Jul 2002 13:52:15 +0200
- Subject: Re: More revisions to exploring_worth
>Now the function looks like:
> mobility += ( t_alt_max(t) - t_alt_min(t) + t_wet_max(t) - t_wet_min(t) )
>/ ( ut_mp_to_enter(u, t) + 1 );
I think you need to multiply the percentile fractions, thus:
mobility += (( t_alt_max(t) - t_alt_min(t)) * (t_wet_max(t) -
t_wet_min(t))) / ( ut_mp_to_enter(u, t) + 1 );
Consider the following simple example:
; vac rim dust arm OB
;
--------------------------------------------------------------------------------
----
(add basic-t* alt-percentile-min ( 0 45 65 65 85
))
(add basic-t* alt-percentile-max ( 45 65 85 85 100
))
(add basic-t* wet-percentile-min ( 0 0 0 40 0
))
(add basic-t* wet-percentile-max (100 100 40 100 100
))
dust and arm share 20% (85% - 65%) of the cells based on "altitude". Within
those 20%, dust has 40% based on "wetness" and arm has 60%. Thus:
total dust cells = 0.2 * 0.4 = 8%
total arm cells = 0.2 * 0.6 = 12%
Of the stuff that has not been factored in yet, I think the building cost
is the most important one. It should be included in all the ai worth
functions, but I think it is particularly important here, where you much
prefer five destroyers to one battleship. It is not easy to do this,
however (I already tried). The problem is that as soon as you factor in
building costs there are at least some games where the ai only builds the
cheapest possible units. The reason for this is that the worth values are
very sensitive to the number of unit types in the game (at least for combat
model 0 that uses the hit-chance table). Therefore, the balance between
building cost and other factors like attack and defense values need to be
carefully adjusted for each game. Haven't figured out how to do this in a
simple way yet.
Hans
Hans Ronne
hronne@pp.sbbs.se