Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2002:
[Freeciv-Dev] Re: Path-finding in the presence of danger
Home

[Freeciv-Dev] Re: Path-finding in the presence of danger

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Cc: Freeciv Development List <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Path-finding in the presence of danger
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Tue, 15 Oct 2002 05:35:24 -0700

On Mon, Oct 14, 2002 at 03:03:54PM +0100, Gregory Berkolaiko wrote:
> On Mon, 14 Oct 2002, Raimar Falke wrote:
> > My proposal:
> >  if TM_NONE:
> >     COP=((TURN_FACTOR*total_BMC)/move_rate)+TEC
> >  else:
> >     COP=((TURN_FACTOR*((turns+1)*move_rate-moves_left))/move_rate)+TEC
> > 
> > and TURN_FACTOR is a define (2^16 for example).
> 
> I think you explained it before

Have I?

> , but let me ask again, wouldn't it be 
> better to multiply the whole thing by move_rate:
>        COP = TURN_FACTOR*total_BMC + TEC*move_rate
> ?

These two are equivalent, except that the second produces larger COPs
(which isn't a problem per se). The second version should be faster if
TURN_FACTOR isn't a power of two. So from the user-view both are the
same and I have no problem if we use your version.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx


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