[freeciv-ai] Re: Approximate win_chance
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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.
> > 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%).
The code is attached. You can play with CORRECTION and ERROR defines.
G.
test.c
Description: Text document
- [freeciv-ai] Approximate win_chance, Gregory Berkolaiko, 2002/04/17
- [freeciv-ai] Re: Approximate win_chance, Raahul Kumar, 2002/04/18
- [freeciv-ai] Re: Approximate win_chance,
Gregory Berkolaiko <=
- [freeciv-ai] Re: Approximate win_chance, Gregory Berkolaiko, 2002/04/19
- [freeciv-ai] Re: Approximate win_chance, Raahul Kumar, 2002/04/19
- [freeciv-ai] Re: Approximate win_chance, Gregory Berkolaiko, 2002/04/19
- [freeciv-ai] Re: Approximate win_chance, Raahul Kumar, 2002/04/19
- [freeciv-ai] Re: Approximate win_chance, Raahul Kumar, 2002/04/19
- [freeciv-ai] Re: Approximate win_chance, Ross W. Wetmore, 2002/04/19
- Message not available
- [freeciv-ai] Re: Approximate win_chance, Ross W. Wetmore, 2002/04/19
- [freeciv-ai] Re: Approximate win_chance, Gregory Berkolaiko, 2002/04/22
- [freeciv-ai] Re: Approximate win_chance, Raimar Falke, 2002/04/24
- [freeciv-ai] Re: Approximate win_chance, Gregory Berkolaiko, 2002/04/24
|
|