Ludii Forum
(sites Distance) bug - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Problems (https://ludii.games/forums/forumdisplay.php?fid=5)
+--- Forum: Grammar Problems (https://ludii.games/forums/forumdisplay.php?fid=24)
+--- Thread: (sites Distance) bug (/showthread.php?tid=647)



(sites Distance) bug - Michael - 07-16-2021

I think I have found a bug that has been haunting me. It is related to the issue I reported here, about the Test Ludeme dialog. It seems the issue might have to do with the ludeme (sites Distance).

The .lud I have attached here works exactly as I would expect. It identifies the site that is the farthest away from the center (counted in steps onto empty cells) and lets you add to any empty cell one less than that number of steps away from the center. However, if I remove the "one less" part, things break down. If you remove the (- … 1) part in the define ("RelativePerimeter"), like this
Code:
(define "RelativePerimeter"
    (sites Distance
        from:(centrePoint)
        (exact
            //(-
                ("BiggestDistanceFromCenterInRegion"
                    ("ReachableByStepOntoEmpty" #1)
                )
           //1)
        )
    )
)
then there are no legal moves.


RE: (sites Distance) bug - Michael - 07-18-2021

I was able to work around this issue. I made a mock version of (sites Distance) by combining (difference) and (expand). This also seems to confirm that there is a problem with (sites Distance).


RE: (sites Distance) bug - Eric Piette - 07-19-2021

Hi,

This issue is fixed with the fix I did in your other message.

Regards,
Eric