[Freeciv-Dev] Re: [RFC] Path finding interface #9
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, 30 May 2002, Raimar Falke wrote:
> On Wed, May 29, 2002 at 05:11:43PM +0100, Gregory Berkolaiko wrote:
> > On Wed, 29 May 2002, Raimar Falke wrote:
>
> There there 3 different metrics to measure the "goodness" of a path:
> - BMC
> - extra cost (danger and pseudo BMC for unknown tiles)
> - time (turns and moves_left)
> and there is is_safe_tile but this just remove some paths in a kind of
> pre-processing step.
>
> So you can judge a path just by its BMC or just by its time. So in
> general you may want to do something like:
> goodness = BMC*factor1+extra_cost*factor2+turns*factor3+moves_left*factor4
>
> So if we assume that factor1 is 0 you see that you can balance a
> higher turns value with a smaller extra_cost value. Depending on the
> values you can say that 1 turns can be balanced by n extra_cost
> (points).
>
> This model is a lot clearer than the previous one. So I have attached
> a 10th version of the interface. You can now specify a function which
> does calculate the "goodness" of a path. This also allows you to make
> a path with turns=n, moves_left=0 equivalent to turns=n+1,moves_left=6
> which is needed for settlers.
>
> The patch also made the definition of is_position_safe a lot
> clearer. It is also renamed.
The only combination of factor3 and factor4 that makes sense to me is
factor3 = full_move_points(punit)
factor4 = 1
If you take something else it might jam Dijkstra.
BTW, Dijkstra method requires a single value as an estimate of the
goodness of a path. Do you propose this COP function to do it?
I generally welcome this COP function but it takes too many arguments.
It should be of the form:
move_points_spent + factor * extra_cost,
where
move_points_spent = (turns+1) * full_move_points(punit) - moves_left
Now, as I pointed out earlier, the extra_cost is a user-supplied function
already, so the user should build the factor into it. So there is no real
need for COP to be user-supplied.
G.
- [Freeciv-Dev] Re: [RFC] Path finding interface #9, (continued)
- [Freeciv-Dev] Re: [RFC] Path finding interface #9, Raimar Falke, 2002/05/25
- [Freeciv-Dev] Re: [RFC] Path finding interface #9, Raimar Falke, 2002/05/28
- [Freeciv-Dev] Re: [RFC] Path finding interface #9, Gregory Berkolaiko, 2002/05/28
- [Freeciv-Dev] Re: [RFC] Path finding interface #9, Raimar Falke, 2002/05/28
- [Freeciv-Dev] Re: [RFC] Path finding interface #9, Gregory Berkolaiko, 2002/05/28
- [Freeciv-Dev] Re: [RFC] Path finding interface #9, Raimar Falke, 2002/05/29
- [Freeciv-Dev] Re: [RFC] Path finding interface #9, Gregory Berkolaiko, 2002/05/29
- [Freeciv-Dev] Re: [RFC] Path finding interface #9, Raimar Falke, 2002/05/29
- [Freeciv-Dev] Re: [RFC] Path finding interface #9, Gregory Berkolaiko, 2002/05/29
- [Freeciv-Dev] Re: [RFC] Path finding interface #9, Raimar Falke, 2002/05/30
- [Freeciv-Dev] Re: [RFC] Path finding interface #9,
Gregory Berkolaiko <=
- [Freeciv-Dev] Re: [RFC] Path finding interface #9, Raimar Falke, 2002/05/31
- [Freeciv-Dev] Re: [RFC] Path finding interface #9, Gregory Berkolaiko, 2002/05/31
- [Freeciv-Dev] Re: [RFC] Path finding interface #9, Raimar Falke, 2002/05/31
- Message not available
- [Freeciv-Dev] Re: [RFC] Path finding interface #9, Ross W. Wetmore, 2002/05/26
- [Freeciv-Dev] Re: [RFC] Path finding interface #9, Gregory Berkolaiko, 2002/05/27
[Freeciv-Dev] Re: [RFC] Path finding interface #9, Gregory Berkolaiko, 2002/05/28
|
|