[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]
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
coming...
> 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.
G.
- [freeciv-ai] Re: [Freeciv-Dev] [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/12
- [freeciv-ai] Re: [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/13
- [freeciv-ai] Re: [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Ross W. Wetmore, 2002/09/13
- [freeciv-ai] Re: [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/13
- [freeciv-ai] Re: [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Per I. Mathisen, 2002/09/13
- Message not available
- [freeciv-ai] Re: [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Ross W. Wetmore, 2002/09/14
- [freeciv-ai] Re: [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/14
- [freeciv-ai] Re: [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14,
Gregory Berkolaiko <=
- [freeciv-ai] Re: [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/14
- [freeciv-ai] Re: [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/14
- [freeciv-ai] Re: [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/14
- [freeciv-ai] Re: [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/15
[freeciv-ai] Re: [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/14
|
|