Complete.Org: Mailing Lists: Archives: freeciv-ai: April 2002:
[freeciv-ai] Re: Approximate win_chance
Home

[freeciv-ai] Re: Approximate win_chance

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Cc: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>, Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>, freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: Approximate win_chance
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 24 Apr 2002 14:02:39 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, Apr 24, 2002 at 04:08:41AM -0700, Raahul Kumar wrote:
> 
> <snip>
> > I have done some changes and factor (10.0 in the original test.c) is
> > indeed important. I have attached another version which shows the
> > quality of the approximation for various factors.
> > 
> > It turns out that the power of 5 minimized the error for the factor
> > 8. A power of 6 prefers the factor 12. A power of 5.5 really make the
> > factor 10 the one with the minimum error.
> > 
> > Bottom line for me: the proposed approximation is much to fragile.
> 
> I'm not with you on the logic train. Let's slam the brakes. Greg's
> approximation is far better than the current one, which just squares the
> results.

AFAIK the current win_chance isn't an approximation but returns the
exact value. Or do I'm mistaken about that?

> It has a much smaller absolute error and and the error occurs fewer times than
> the current implementation. That's good enough for inclusion.
> 
> I'm certain there was no mathematical modelling done for the current 
> algorithm.
> It was obviously picked because it worked. The problems is the current
> implementation has a very large absolute error, and it occurs often. Greg
> mentioned in his earlier emails all the sordid details. Greg's version would
> result in a smarter AI for free. It would be calculating the combat odds more
> accurately.
> 
> > Bottom line 2: we have to carefully select the set of values we test
> > the approximation against. Best would be the whole possible set of
> > values. Or a real (not by simulation) mathematical calculation of the
> > errors we have to expect.
> 
> Not asking for much are you?

As I said this would be the ideal solution. If the current win_chance
returns the correct value we have to have an estimation of the error
which a new win_chance will produce.

> A formal mathematical proof is over the top. No
> doubt Greg can do it, but I feel this is asking too much of contributors. The
> whole possible set is very large, I'm not aware of any range limits to hps or
> firepower, although attack power seems to be limited to <= 99.
> 
> In fact, can I ask you for a formal proof of combat.c? There are a number of
> areas in that region of code that concern me:

> No apparent range limits to defence power, and attack power seems to be 
> limited
> only to 99. 

Where?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  "brand memory are for windows users that think their stability
   problems come from the memory"
    -- bomek in #freeciv


[Prev in Thread] Current Thread [Next in Thread]