[Freeciv-Dev] Re: chance of winning a battle
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, 11 Jul 2001, Trent Piepho wrote:
> > "91 - Create a function that gives a statistically excact value for a units
> > 92 chance of winning a battle." ??
>
> I wrote this for freeciv years ago, back when I was the main developer. I
> decided not to stick it in, because the AI uses this function a lot. Figuring
> out the exact value is much more expensive than the approximation and makes
> very little difference overall.
true, it is expensive to calculate. but what is the approximation?
> > 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.
> distribution. If you check the mailing list from a while back, I explained
> the math in great detail to some math challenged people who couldn't figure it
> out.
yes I found it,
http://arch.freeciv.org/freeciv-dev-200009/msg00411.html
and followups. What a friendly discussion.
But why the item is still on the TODO list? It should then be removed or
at least changed to:
"Create a time-efficient function that gives a good approximation for a units
chance of winning a battle."
> If you want something hard, figure out multiple unit battles. For example, if
> you have three different units which can attack a single enemy unit. What
> order should they attack in to minimize the expected value of the unit cost
> you will lose.
ok, now thinking about it.
- [Freeciv-Dev] Re: chance of winning a battle, (continued)
- [Freeciv-Dev] Re: chance of winning a battle, Christian Knoke, 2001/07/15
- [Freeciv-Dev] Re: chance of winning a battle, Christian Knoke, 2001/07/15
- [Freeciv-Dev] Re: chance of winning a battle, Gaute B Strokkenes, 2001/07/15
- [Freeciv-Dev] Re: chance of winning a battle, Gregory Berkolaiko, 2001/07/21
- [Freeciv-Dev] Re: chance of winning a battle, Gaute B Strokkenes, 2001/07/22
- [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 <=
[Freeciv-Dev] Re: chance of winning a battle, Daniel Speyer, 2001/07/12
|
|