[Freeciv-Dev] Re: chance of winning a battle
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, 12 Jul 2001, Gregory Berkolaiko wrote:
> On Wed, 11 Jul 2001, Trent Piepho wrote:
>
> true, it is expensive to calculate. but what is the approximation?
The AI more or less uses power * hit points * firepower. Lots of what it does
is compare one group of units against another group by summing up their
respective strengths. What you need to consider is how often does the AI do
the wrong thing because it calculates its chances in battle incorrectly?
> > > 1. "statistically excact value" will involve a nontrivial mathematical
> > > function (the so-called hypergeometric function). should it be put into a
> > > different module? presumably the function itself would go to
> > > server/unittools.c
> >
> > It's not that hard. You just sum part of the area under the binomial
>
> yes, but you can reformulate the sum as a hypergeometric function whose
> "good" approximation usually contains only half as many terms as the
> original sum does. but the reduction by 2 is not that great and the
> implementation is complicated.
The nice thing about the binomial distribution is that each term can be
calculated from the proceeding one with a few computations. Does the
approximation share this trait? Actually, how do you find the parameters for
the hypergeometric function?
- [Freeciv-Dev] Re: chance of winning a battle, (continued)
- [Freeciv-Dev] Re: chance of winning a battle, Trent Piepho, 2001/07/16
- [Freeciv-Dev] Re: chance of winning a battle, Gregory Berkolaiko, 2001/07/19
- [Freeciv-Dev] Re: chance of winning a battle, Thue, 2001/07/19
- [Freeciv-Dev] Re: chance of winning a battle, Erik Sigra, 2001/07/19
- [Freeciv-Dev] Re: chance of winning a battle, Trent Piepho, 2001/07/12
[Freeciv-Dev] Re: chance of winning a battle, Gregory Berkolaiko, 2001/07/12
- [Freeciv-Dev] Re: chance of winning a battle,
Trent Piepho <=
[Freeciv-Dev] Re: chance of winning a battle, Daniel Speyer, 2001/07/12
|
|