[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 Mon, Sep 16, 2002 at 07:28:48PM +0200, Raimar Falke wrote:
> On Mon, Sep 16, 2002 at 04:55:48PM +0100, Gregory Berkolaiko wrote:
> > On Mon, 16 Sep 2002, Raimar Falke wrote:
> >
> > > On Sun, Sep 15, 2002 at 07:21:58PM +0100, Gregory Berkolaiko wrote:
> > > > On Sun, 15 Sep 2002, Gregory Berkolaiko wrote:
> > > >
> > > >
> > > > And the last version of the patch. First it makes one test run for all
> > > > units, both PF algorithms are used and if a difference in results is
> > > > detected, the whole thing aborts. Then 100 runs of each algorithm for
> > > > each unit are done and the times are printed.
> > > >
> > > > Usage:
> > > > 1. Apply the patch to latest CVS.
> > > > 2. Load the attached game, connect, start and press Turn Done.
> > > > 3. Watch the output in the server screen.
> > >
> > > Patch from x2 to x3 attached.
> >
> > Patch from x3 to x4 is attached. Several mistakes fixed. Added support
> > for sea-going (non-sinking) and IGTER units.
> >
> > Savegame runs smoothly, apart from occasional non-unique path with a given
> > COP hiccup.
>
> > GB_pf is at least 2 times faster than RF_pf. Hopefully this settles
> > the choice of implementation.
>
> Mhhh. This is odd. Both use exactly the same amount of external
> functions. Lets see if you have implemented all functionality
> (move_backward, ignore_enemy, goto_move_restriction and
> is_position_dangerous). This should at least add some ifs in the hot
> path (or an extra call in the is_position_dangerous case). We should
> maybe also run some tests if asserts disabled.
/* Only update if this might shorten the paths */
if (node_xy1->cost <= node_xy->cost) {
continue;
}
IMHO you can't this at this place. You don't know anything about the
new EC.
Also you don't test for ZOC.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe trying
to produce bigger and better idiots. So far, the Universe is winning."
-- Rich Cook
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, (continued)
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/15
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/15
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14,
Raimar Falke <=
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/21
|
|