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

[Freeciv-Dev] Re: [RFC] Move cost map 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] Move cost map interface
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 10 Apr 2002 15:04:48 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, Apr 10, 2002 at 12:03:57PM +0100, Gregory Berkolaiko wrote:
> On Wed, 10 Apr 2002, Raimar Falke wrote:
> 
> > On Wed, Apr 10, 2002 at 09:34:17AM +0100, Gregory Berkolaiko wrote:
> > > On Wed, 10 Apr 2002, Raimar Falke wrote:
> > > 
> > > > Things that I dislike:
> > > >  - the maptype. This is IMHO an error in the current goto(hand).[ch]
> > > >  files.
> > > 
> > > the maptype is the indicator which one of the internal (built-in) cost 
> > > functions should be used.
> > 
> > But enum unit_move_type should be used for this.
> 
> Disagree.  unit_move_type doesn't know such things as city_map and 
> igter_move.

city_map returns a lot of hits and igter_move none.

> > > >  - you missed the ability to calculate the turns to reach a
> > > >  target. This is required for my further agents and has to be
> > > >  included.
> > > 
> > > Yes.  This is of course 
> > > (cm_get_cost(map, x, y) - cm_get_cost(map, x0, y0)) / move_rate
> > > 
> > > Here I am assuming that if the unit has 4/6 initial move points, we 
> > > record 
> > > the missing 2 as the cost to get to the origin.
> > 
> > This is too simple. See unit_move_turns for an example.
> 
> don't see much difference.  all unit_move_turns does is determining the 
> move_rate and then the abovementioned division.

That is the problem. These solution is too easy and only an
estimation. I want the exact upper limit. I would also be happy if the
user also gets the bottom limit.

> BTW how about getting rid of the randomness in the move.  That would make 
> calculation of the _exact_ move_time possible!

This may be possible. 

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  A supercomputer is a computer running an endless loop in just a second


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