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>, Mike Kaufman <kaufman@xxxxxxxxxxxxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] aiunit.c ai_military_findvictim() cleanup (PR#1264)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 22 Feb 2002 20:08:40 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Fri, Feb 22, 2002 at 08:00:20PM +0100, Petr Baudis wrote:
> Dear diary, on Fri, Feb 22, 2002 at 07:40:18PM CET, I got a letter,
> where Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> told me, that...
> > On Fri, Feb 22, 2002 at 06:43:10PM +0100, Petr Baudis wrote:
> > > Dear diary, on Fri, Feb 22, 2002 at 06:14:50PM CET, I got a letter,
> > > where Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> told me, that...
> > > > > > > > > So it looks to me that a boolean value would be enough. At 
> > > > > > > > > least this
> > > > > > > > > "- 2 * MORT * TRADE_WEIGHTING" thing can be removed.
> > > > > > > > 
> > > > > > > > Please see my another mail :^).
> > > > > > > 
> > > > > > > Which one?
> > > > > > 
> > > > > > Basically we agree that this unhappiness setting in not used at all.
> > > > > 
> > > > > It is! It is! It is! Inside findvictim() it is! 
> > > > 
> > > > How? Where?
> > > 
> > > | Ok, they aren't. What broke our predictions today was the fact that 
> > > desire may
> > > | be negative - thus the mean of the unhappy calculation was completely 
> > > opposite
> > > | to the one we thought.
> > > 
> > > And from the latest code:
> > > 
> > >     /* When we're causing unhappiness, we'll set best even lower, so that 
> > > we
> > >      * will take even targets which we would ignore otherwise (in other 
> > > words -
> > >      * we're going to commit a suicide). */
> > 
> > I still don't understand.
> 
> Desire can be negative, clear?

Yes.

> Normally best is 0, so we ignore negative desires (desires where benefit *
> attack < loss * vuln), clear?

Yes.

> But if the best is initialized to some negative value, we will accept also
> certain negative desires (the ones where it's more likely that we'll be
> destroyed and it's not really worth the trouble), down to
> -2*MORT*TRADE_WEIGHTING, clear?.

Yes.

> We're thus less careful with the units causing unhappiness and we're doing 
> even
> desperate attacks.

Ok.

1) We can still reduce the range of return values to three.
2) Can someone explain -2*MORT*TRADE_WEIGHTING?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 Q:  Do you know what the death rate around here is?
 A:  One per person.


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