[Freeciv-Dev] Re: TODO
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
> > This is something I wrote to do the exactly same thing, when I worked on
> > freeciv like 2 years ago. It's a much better algorithm than you've used.
> Of
> > course, do to NIH syndrome, you'll probably do things to stupid way. Or
> > someone will change a variable so they can claim they wrote it.
>
> "NIH"? Anyway, yes, it is a better algoritm.
> But there us a small error on the line
> p=sum_binomial(p,dhp/afp,ahp/dfp);
> It should be
> p=sum_binomial(p,dhp/afp + dhp%afp,ahp/dfp + ahp%dfp);
>
> (still trying to understand the exact code in sum_binomial, though I
appreciate
> the principle)
> double q=1-p;
> double r,b,s;
> int n=x+y-1,k;
> Say, you didn't work on the freeciv AI? :)
>
> -Thue
I wonder if "NIH" is refusing to use his code; anyway, here is a revised
version using Trent's algoritm. (though I couldn't make his version work)
-Thue
fc_combat_odds2.c
Description: Text Data
[Freeciv-Dev] Re: TODO, David Pfitzner, 2000/09/24
- [Freeciv-Dev] Re: TODO, Thue, 2000/09/24
- [Freeciv-Dev] Re: TODO, Erik Sigra, 2000/09/24
- [Freeciv-Dev] Re: TODO, Thue, 2000/09/24
- [Freeciv-Dev] Re: TODO, Thue, 2000/09/25
- [Freeciv-Dev] Re: TODO, Trent Piepho, 2000/09/25
- [Freeciv-Dev] Re: TODO, Thue, 2000/09/25
|
|