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

[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 development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Mon, 16 Sep 2002 18:59:49 +0100 (BST)

On Mon, 16 Sep 2002, Raimar Falke wrote:

> 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.

This is wrong, should compare COPs.  Strangely doesn't affect the 
result...

Can simply delete or cache the cop in the node.

> Also you don't test for ZOC.

Is it so?
Yep, that is bad.

G.




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