Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2002:
[Freeciv-Dev] Re: [RFC] Path finding interface
Home

[Freeciv-Dev] Re: [RFC] Path finding interface

[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: [RFC] Path finding interface
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 10 Apr 2002 20:01:56 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, Apr 10, 2002 at 06:40:36PM +0100, Gregory Berkolaiko wrote:
> On Wed, 10 Apr 2002, Raimar Falke wrote:
> 
> > On Wed, Apr 10, 2002 at 06:07:33PM +0100, Gregory Berkolaiko wrote:
> > > On Wed, 10 Apr 2002, Raimar Falke wrote:
> > > 
> > > > On Wed, Apr 10, 2002 at 05:23:35PM +0100, Gregory Berkolaiko wrote:
> > > > > On Wed, 10 Apr 2002, Raimar Falke wrote:
> > > > > > 
> > > > > > Possible but this will be expensive since it would double the 
> > > > > > elements
> > > > > > we have to consider. So it has to be selective.
> > > > > 
> > > > > 1. bool consider_waiting in the map structure to trigger it at all
> > > > 
> > > > In what map structure?
> > > 
> > > pf_parameter ?
> > > 
> > > > > 2. push only safe locations, obviously ;)
> > > > 
> > > > How will it recognize a safe location?
> > > 
> > > good question.  probably extra_cost_2 can be used.
> > 
> > Can we combine this? So that if some callback (extra_cost2 or some
> > other) says that this position is safe we also push the element where
> > we wait a turn. Or two seperate return values: PF_SAFE_COST and
> > PF_SAFE_AND_WAIT_COST?
> 
> yes, 
> if (consider_waiting 
>     && extra_cost2(....) == PF_SAFE_COST
>     && moves_left < unit_move_rate)
>   push_into_queue(current_location, current_cost+moves_left);
> }
> 
> the third condition to limit waiting to one turn :)

The idea was to remove the consider_waiting flag. Yes? No?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "SIGDANGER - The System is likely to crash soon"


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