This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: playable again with a few problems


On Sun, 2004-05-16 at 08:42, Tom Low-Shang wrote:
  
> > Also, could the blocking friendly unit have been filled to
> > capacity with other units?
> 
> No, the moving unit could be blocked by a single, unoccupied
> friendly.

OK. This is still a possibility.
Up until a few weeks ago, units often got blocked by friendly units with
the newer pathfinder we were experimenting with. I reverted to the old
pathfinder a few weeks ago. There was a still a blockage issue (though
for a different reason) because some Xconq functions had come to rely
upon the 'choose_move_direction' function when the newer pathfinder had
been in place. I had made a substitute 'choose_move_direction' when I
reverted to the old pathfinder. This substitute function still had a
problem with blockage which I later discovered and fixed.

What I think you might be seeing is the "directional bias" of the old
pathfinder (a good reason for replacing it). Here is one scenario I
recall from my testing:
Standard game. I had an armor sitting on a road on plains. There were
two cells of mountains sitting to the south of it, with a cell of plains
sitting beyond those. My chosen destination was the cell of plains. A
city was to the southeast, and the road passed into the city. However,
going that direction to the destination cell was blocked by further
mountains (and no road in the appropriate direction) beyond the city. A
town was to the southwest, and the road also passed into the town, IIRC.
Going through the town would have allowed the armor to skirt the
mountains, and reach its destination. I traced the evaluation in the
debugger and it seems as if the old pathfinder (as presently stands) has
a right-handed directional bias (i.e. it tried the mountain cell to the
south and failed, and then a path through the city to the southeast and
also failed, but did not try the town to the southwest). I need to study
this more, but I suspect that the bias is deliberate and not an
oversight, to prevent overlapping path calculations (which might lead to
cycles (infinite loops) instead of spanning trees). I wrote a comment in
the ChangeLog and in the 'choose_move_direction' function mentioning
this. It appears very non-trivial to address, and I have filed it as a
longer term "research problem" for the time being.  Maybe someone who
remembers the old pathfinder better than me will find a good fix for
this.
Incidentally, the armor had started out on the destination cell a few
turns earlier, because I wanted to see if it would pass through the
friendly town (which was situated between the aforementioned mountains
and a sea cell). It got around the mountains by passing though the town
(due to the same directional bias that prevented it from a finding a
path the other way).

Anyway, if you could follow the scenario that I laid out above, does it
seem to fit your circumstances?   If not, then you may way well have
found a new bug.

> No. The town was empty and the there was no indication of any
> shortages, but that should not be a factor in a standard game
> any way.

Agreed.

> What is the difference between -DM and -DG?  I may run xconq
> with debugging enabled until these strange issues are sorted
> out.

You can probably just use "-D", since "-DM" might produce output that is
too copious. The differences are as Hans pointed out.

 Regards,
  Eric


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]