Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2002:
[Freeciv-Dev] Path-finding code (with danger).
Home

[Freeciv-Dev] Path-finding code (with danger).

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv Development List <freeciv-dev@xxxxxxxxxxx>
Cc: Raimar Falke <rf13@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [Freeciv-Dev] Path-finding code (with danger).
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Sat, 12 Oct 2002 20:50:51 +0100 (BST)

Hi Raimar, (and others, please don't feel excluded:)

Attached are my latest path_finding.[ch] and a tiny patch to wire it to 
the explorer code.  Load the attached game, hit "X" on any unit, a path is 
found to (21,40).  Grassland is considered dangerous, tiles with x-coord 
>= 20 give 6000 extra cost.  Just for testing.

It's fully functional.  Dangerous tiles don't give extra costs.  Paths 
seem to be right.  There is a problem though: because dangerous tiles 
don't give extras, a path actually prefers to pass through danger :(

Three solutions to that:
1. Ignore it
2. Try to find paths across danger taking into account COP as well.  I 
have an idea, need to check it.
3. Ignore extra cost on _all_ tiles unless we stay there overnight.  Can 
we do it?

In any case, please read, comment (in the code and otherwise) and change 
what you feel should be changed.  Whatever we decide to do about 
danger+extra, I feel we should speedily go towards inclusion.  And I won't 
have much time in the next weeks, so please help me.

Best wishes,
G.

Attachment: pf.tar.gz
Description: GNU Zip compressed data

Attachment: pf.diff
Description: Text document

Attachment: t7.gz
Description: GNU Zip compressed data


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