Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2001:
[Freeciv-Dev] Re: chance of winning a battle
Home

[Freeciv-Dev] Re: chance of winning a battle

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "'freeciv-dev@xxxxxxxxxxx'" <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: chance of winning a battle
From: Guy Smith <guy@xxxxxxxxxxxxxxxx>
Date: Thu, 12 Jul 2001 12:35:44 -0400

How about an empirical approach.  Have the server record every battle that
takes place, including all the unit and terrain information involved.  Store
this data between games.  When planning a new battle, look at the historical
record to see how things fared in the past.  Not the most rigorous approach,
but just about anybody could implement it without using words like
"hypergeometric."  Not that I have a problem with getting things right.  

--Guy

> -----Original Message-----
> From: Gregory Berkolaiko [mailto:Gregory.Berkolaiko@xxxxxxxxxxxxxx]
> Sent: Thursday, July 12, 2001 11:34 AM
> To: Trent Piepho
> Cc: freeciv-dev@xxxxxxxxxxx
> Subject: [Freeciv-Dev] Re: chance of winning a battle
> 
> 
> 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.
> 
> 
> 


[Prev in Thread] Current Thread [Next in Thread]