Print

Print


Hello,

If possible can you point out what changes are required.

Included in this message are a small movie of the horizontal rectangle and the vertical rectangle of the same overall grid size.
It can be seen that the issue is not the ObjectGrid2D but rather the neighbourhood method.

I have been through the code thoroughly and cannot find the error.

The default neighbour priority order looks like [ x-1, y, ], [ x, y-1 ]. [x+1, y ], [ x, y+1 ] from the central cell.

 It appears to be related to the von Neumann neighbours method used in the replicate part of Agents2. I have changed the distance to 1 
 rather than the 8 shown previously so the next cell location should be simple to identify.
 The horizontal rectangle appears correct whilst the vertical rectangle has two issues.
 
If the start cell is on the bottom row other than in the L/H/Corner the next cell is located at x = x-1, y = 0 rather than the correct location.

 Secondly the bottom row is not recognised by the returning child and thus there are empty cells that could be occupied.