Complete.Org: Mailing Lists: Archives: freeciv-ai: September 2002:
[freeciv-ai] Re: [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14

[freeciv-ai] Re: [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Cc: Freeciv AI development <freeciv-ai@xxxxxxxxxxx>
Subject: [freeciv-ai] Re: [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Sat, 14 Sep 2002 18:29:22 +0100 (BST)

On Sat, 14 Sep 2002, Raimar Falke wrote:

> There is no alternative implementation of the new interface yet. And

Patience, my friend, patience.  It's not highly "alternative" but it's 

> You get full control over the cost (get_BMC, get_ECOT) and the
> termination condition (get_TB). You may want additionally to do the
> moves_left and turn calculation by yourself. If the *_data stuff and
> the comments are removed:
> struct pf_parameter {
>   int start_x, start_y;
>   /* 
>    * pointer to turn, pointer to moves_left, x, y, data
>    */
>   void (*update_turn_and_moves_left) (int *, int *, int, int);
>   enum tile_behavior (*get_TB) (int, int, void *);
>   int (*get_ECOT) (int, int, void *);
>   bool(*is_position_dangerous) (int, int, void *);
>   int (*get_COP) (int, int, int, int, void *);
> };

This looks nice :)
Would be even nicer with out COP.
BTW, how about passing pointer to parameter instead of void * to all 
functions?  I know it reduces flexibility but not that much, does it?

> > I generally agree with the maxim that "all problems can be solved by an
> > extra level of indirection" :-)
> > We should see what Gregory comes up with as a first pass at taming 
> > Raimar's pathfinding monster before too much effort is expended. 
> He didn't found that much.

I didn't _find_ that many comments to the interface.


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