[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:
> Question:
> Has anyone actually had a go at
> "91 - Create a function that gives a statistically excact value for a units
> 92 chance of winning a battle." ??
> Just didn't want to reinvent things...
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.
> 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
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.
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.
- [Freeciv-Dev] chance of winning a battle, Gregory Berkolaiko, 2001/07/11
- [Freeciv-Dev] Re: chance of winning a battle,
Trent Piepho <=
- [Freeciv-Dev] Re: chance of winning a battle, Christian Knoke, 2001/07/12
- [Freeciv-Dev] Re: chance of winning a battle, Gregory Berkolaiko, 2001/07/12
- [Freeciv-Dev] Re: chance of winning a battle, Christian Knoke, 2001/07/12
- [Freeciv-Dev] Re: chance of winning a battle, Gregory Berkolaiko, 2001/07/15
- [Freeciv-Dev] Patch correcting win_cnace, Gregory Berkolaiko, 2001/07/15
- [Freeciv-Dev] Re: Patch correcting win_cnace, Gaute B Strokkenes, 2001/07/15
- [Freeciv-Dev] Re: Patch correcting win_cnace, Thue, 2001/07/20
- [Freeciv-Dev] Re: Patch correcting win_cnace, Erik Sigra, 2001/07/20
- [Freeciv-Dev] Re: Patch correcting win_cnace, Thue, 2001/07/20
- [Freeciv-Dev] Re: Patch correcting win_cnace, Thue, 2001/07/20
|
|