[Freeciv-Dev] Want calculation (Was:Re: flying AI (PR#1162))
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
--- "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx> wrote:
>
> This is used for veteran units. Obviously they are 40 somethings better
> than the standard unit build_cost, probably because rifleman are the
> prototypical unit and this is double the shield cost or something :-).
I thought it is used as the boat cost if we need the boat.
> To repeat a former caution though. There is a rationale for everything
> if you can hold onto your sanity long enough to figure it out. But
> these
> long involved calculations are not in themselves particularly important
> or useful. They attempt to mimic some human assessment process, but
> don't
> really cover the full spectrum, so accuracy is meaningless within a
> fairly broad range.
I disagree on "mimic some human assessment" issue. It's an attempt to
code mathematically sound tactics IMHO. Which is "to profit whatever we
do". The human assessment is more "can I kill it somehow?" while the
code attempts at "will I profit if I try to kill it?" approach.
Possibly bigger difference is in general view on combat:
Human "here is the enemy, where is my Howitzer?"
and AI "here is my howitzer, where is the enemy?"
But it is general philosophy and here is something concrete:
I managed to hold on to my sanity for long enough to at least partially
decode "want" calculation. I was looking at the lines around
http://www.freeciv.org/lxr/source/ai/aiunit.c?v=cvs#L1411
(function find_something_to_kill)
Want = Operation_Profit * Amortization_Factor
where
* Amortization_Factor is completely beyond me (but it's a function of the
estimated time length of the operation).
* Operation_Profit = Battle_Profit - Maintenance
where
* Maintenance
= (1 shield + Unhappiness_Compensation) * Operation_Time
(here unhappiness is from military unit being away from home)
* Battle_Profit
= Shields_Lost_By_Enemy * Probability_To_Win
- Shields_Lost_By_Us * Probability_To_Lose
That is Battle_Profit is probabilistic average.
In the calculation the probabilities enter approximately (and the
approximation is rather bad, but who cares).
Best,
G.
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
- [Freeciv-Dev] Want calculation (Was:Re: flying AI (PR#1162)),
Gregory Berkolaiko <=
|
|