[freeciv-ai] Re: (PR#4744) More pathfinding
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, 3 Oct 2003, rwetmore@xxxxxxxxxxxx wrote:
> Given that Jason has the scenario described correctly, I am actually
> confused as to why any randomness would change the outcome. If the
> chariot could reach Nairobi this turn, then it should certainly be
> able to reach it with full movepoints next turn, and thus supercede
> the 2/3 case Jason sees. Is there some other factor like danger at
I am not sure why you refer to Chris as "Jason", but as I understand him,
the choice is like this:
1. Reach Nairobi spending 6MP -- 50%
reach Nairobi spending 12MP (by failing an attemp to walk in and
walking in next time using all of the move points) -- 50%
2. Reach Narobi spending 10MP -- 100%
Since client PF is now working in pessimistic mode, it interprets 1. as
using 12MP and therefore prefers 2.
If you use your imagination, you can easily make up scenarios in which the
other modes, optimistic and "averaging", will not give you the answer
which seems optimal.
The model which is best at describing what humans feel to be "optimal" was
suggested by Chris some time ago. It is the statistical averaging of all
possible outcomes of taking a certain path. For example in the above case
the cost of the first path would be
12*0.5 + 6*0.5 = 9
and the cost of the second
10*1.0 = 10
We can also average the turn in which we arrive, this seems to be even
better, giving in the above case
2*0.5 + 1*0.5 = 1.5
2*1.0 = 2.0
But regardless of which model you use, I do not see a way to implement it
whithin Dijkstra framework.
> But to ask a stupid question without doing any background code checks
> to try and avoid the embarassment, is it not possible to have the
> random case resolved by pathfinding under an optimistic or a pessimistic
> mode flag.
> What I mean is that player/AIs could have a cautious/defensive or
> aggressive personality trait which caused PF to resolve random chance
> in a defined success or failure mode, i.e. assume one of the two
> non-random outcomes.
There is no GUI right now to specify your preferences for a certain mode,
but PF is able to handle them.
> It seems like this code would be required if randomness were a ruleset
> option with 2 or 3 case options, i.e. pessimistic, random or optimistic
> outcome probabilities. Civ3 fans would of course choose optimistic.
> The result is not a fuzzy weighted answer about the optional pathfinding
> choice, but one of two non-random binary extremes that are selecteable in
> some way. This should be codable now, and would be at least an improvement
> on hardcoding one or the other PF assumptions which currently has at least
> half the user community asking the why question all the time. If they did,
> RTFM and pick your poison would be the standard answer with the flexible
> option fix.
If someone can be bothered to write GUI for that, the only setting that
needs to be changed is in
Personally I would prefer non-random moves as I do not want to pick a
[freeciv-ai] Re: (PR#4744) More pathfinding, Sam Steingold, 2003/10/08
[freeciv-ai] Re: (PR#4744) More pathfinding, Gregory Berkolaiko, 2003/10/09