[Freeciv-Dev] Re: (PR#2370) Path finding
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, Feb 19, 2003 at 05:25:17PM +0000, Per I. Mathisen wrote:
> On Wed, 19 Feb 2003, Raimar Falke wrote:
> > Maintainability is important in the long run. No doubt about this. But
> > correctness is still more important.
>
> And why is that? The current AI has many problems, but I cannot think of
> one that can be traced back to lack of exactness.
So now imagine how many more problems you would have if the code would
be correct. For example get_invention sometimes returns the wrong
value. Or generate_warmap generates the warmap for a slightly wrong
position.
> > This is comparing apples with peaches. Based on pf14.diff is more
> > like:
>
> Well, at least to me, much of the point in having a new path-finding was
> being able to use a path-iterator. It is also the only way to avoid
> significant slowdown of the AI code because of the new and more complex
> path-finding code.
Yes. But than you can't compare them (warmap and new iterator). But PF
still offers the old access and this way warmap and PF can be
compared.
> > With the pf_get_position Gregory wanted you can remove two lines. The
> > init stuff can be folded nicely in a function like ai_get_pf_map. So
> > this will look like:
> >
> > pf_map_t UPI_map;
> > pf_position pos;
> > UPI_map = ai_get_pf_map(punit);
> > if(pf_get_position(UPI_map, x, y, &pos))
> > return pos.total_BMC;
>
> Yes, no doubt we can hide much of the ugliness of pf behind a layer of
> abstraction or two, but that doesn't hide the fact that each such layer is
> going to make the result even more complex and less maintainable.
You also have this layer in the current code. It is in generate_warmap
and also in really_generate_warmap.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Despite all the medical advances of the 20th century, the mortality
rate remains unchanged at 1 death per person."
- [Freeciv-Dev] Re: (PR#2370) Path finding, (continued)
[Freeciv-Dev] Re: (PR#2370) Path finding, Gregory Berkolaiko, 2003/02/19
[Freeciv-Dev] Re: (PR#2370) Path finding, Gregory Berkolaiko, 2003/02/19
[Freeciv-Dev] latest aidiplomat.c changes, Per I. Mathisen, 2003/02/19
[Freeciv-Dev] Re: (PR#2370) Path finding, Raimar Falke, 2003/02/19
[Freeciv-Dev] Re: (PR#2370) Path finding, Gregory Berkolaiko, 2003/02/19
[Freeciv-Dev] Re: (PR#2370) Path finding, Raimar Falke, 2003/02/19
[Freeciv-Dev] Re: (PR#2370) Path finding, Gregory Berkolaiko, 2003/02/19
[Freeciv-Dev] Re: (PR#2370) Path finding, Raimar Falke, 2003/02/19
[Freeciv-Dev] Re: (PR#2370) Path finding, Gregory Berkolaiko, 2003/02/19
|
|