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: rf13@xxxxxxxxxxxxxxxxxxxxxx
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: Petr Baudis <pasky@xxxxxxxxxxx>
Date: Fri, 22 Feb 2002 20:00:20 +0100

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?

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

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?.

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

-- 

                                Petr "Pasky" Baudis

* elinks maintainer                * IPv6 guy (XS26 co-coordinator)
* IRCnet operator                  * FreeCiv AI hacker
.
No one can feel as helpless as the owner of a sick goldfish.
.
Public PGP key && geekcode && homepage: http://pasky.ji.cz/~pasky/


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