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: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Cc: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: Approximate win_chance
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Fri, 19 Apr 2002 05:35:46 -0700 (PDT)

--- Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx> wrote:
> On Thu, 18 Apr 2002, Raahul Kumar wrote:
> 
> > > Power 5 works best (better than 4 or 6).  Not very often.  You can 
> > > experiment with the code I attached.
> > 
> > That's what I don't understand. I assume higher powers should always work
> > better. More precision, less errors. Yet your results show differently. I
> am
> > suspicious. I demand an explanation.
> 
> I have no explanation.  This is the way things are.  In principle it is 
> possible to play with the win_chance formula (which is essentially 
> hypergeometric function) and maybe do some expansions and show why 5 is 
> the best, but I'm not interested in doing it.

Ok. I'll try and figure this out on my own.

> > > This performs way better but for some weird cases it still gives an 
> > > absolute error of about 15%.
> > >
> > > Is there any way we can avoid calling approx win_chance when that
> happens?
> > > 
> > > The problem is that I don't know beforehand when such thing would happen.
>  
> > > But I am still thinking about it...
> > 
> > There must be a range of some weird values. 
> 
> There is.  It seems that th biggest errors arise when the attacker is very 
> strong but low on hitpoints (also can happen when attacker is strong and 
> very high on hitpoints, around 50, but maximum in the defaut ruleset is 
> 40).  So I intorduced some correction for this situation, which brings 
> number of mistakes greater than 10% from
>       131 out of 7680
> to
>       11  out of 7680
> (and even those mistakes do not exceed 11.07%).

Excellent. You've reduced the frequency and absolute size of the error as well.
It sounds good.

<snip>

Aloha,
RK.

I think that I shall never see
A thing as lovely as a tree.
But as you see the trees have gone
They went this morning with the dawn.
A logging firm from out of town
Came and chopped the trees all down.
But I will trick those dirty skunks
And write a brand new poem called 'Trunks'.

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/


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