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: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [RFC] Path finding interface
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Wed, 10 Apr 2002 18:40:36 +0100 (BST)

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 :)

mmm, we sure created some traffic.
okay, buzzing off for the day.

G.




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