Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: [PATCH] aiunit.c ai_military_findvictim() cleanup (PR#
Home

[Freeciv-Dev] Re: [PATCH] aiunit.c ai_military_findvictim() cleanup (PR#

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Petr Baudis <pasky@xxxxxxxxxxx>
Cc: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] aiunit.c ai_military_findvictim() cleanup (PR#1264)
From: Mike Kaufman <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 20 Feb 2002 12:08:14 -0600

> 
> We _may_ want to use this. However as I said, the health is purely superfluous
> (not very big deal, though). I've really no idea about firepower (as this is a
> hole in my knowledge of civ rules).
> 
> > Now we want to know whether to attack or defend and the corresponding
> > estimators are:
> >   attack_rating(unit)/defence_rating(enemy_defender)
> > and  (estimator of successfull defence) 
> >   defence_rating(unit)/attack_rating(enemy_attacker)
> > which we compare to get inequality
> >   defence_rating(unit) * defence_rating(enemy_defender) >
> >   attack_rating(unit) * attack_rating(enemy_attacker)
> 
> In fact, yes.
> 
> > Now, as you have noted, the firepower and health of the unit itself can be
> > cancelled out, but we should still take into account the firepower and 
> > health
> > of the enemy units (unless they are the same unit).
> 
> Oh. Hmm.. yeah yeah. True. Hey, you seem to have much better idea about this
> inequality than me - don't you want to make the patch which will fix it? :)
> 
> > > (as I said, improved patch attached)
> > 
> > I like it.
> > I even started to like SET_BEST macro
> 
> Great! :-)
> 
> > So the only real issue is fixing the big inequality.
> 
> Which I won't do in this patch unless Mike (which is probably the one who is
> going to commit this) will explicitly want me to.

When I skimmed this last night, I really didn't have a clue what this was
doing despite the long comment. I'd at the least like to be told what all 
those function calls are getting us...

(also figure out how to avoid Syela's comments wrapping...)

-mike


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