Ludii Forum
Test Ludeme not responding - Printable Version

+- Ludii Forum (
+-- Forum: Problems (
+--- Forum: Ludii Player Problems (
+--- Thread: Test Ludeme not responding (/showthread.php?tid=645)

Test Ludeme not responding - Michael - 07-12-2021

When I try to test the following code, nothing happens.
PHP Code:
(sites Distance
                        (is Empty (to))
                        (= (last To) (to))
(range 1 Infinity)
        (sites {24})
(count Steps
        (sites Outer)

In particular, I don't get a message saying there is anything wrong with the ludeme. Nothing is printed in the status tab.

RE: Test Ludeme not responding - Eric Piette - 07-13-2021


Depends of the game, but if you use it in a game that currently does not have this ludeme used in it, that's unfortunately normal.

This ludeme requires to pre-compute the distance between each site when used in a game, however, that is done only if the game requires it (because that can be long and also for optimisation purposes). For example, if you use it on Chess (which does not use the distance between 2 sites) that will fail, so for it to work you have to use this ludeme in your game first.
I always recommend to load Ludii with a terminal in order to see the exception Java error in it when nothing seems printed in the app.


RE: Test Ludeme not responding - Michael - 07-13-2021

Good to know, thanks!

The ludeme was lifted from the game, though. I just expanded a ludeme consisting of defines. I'll see if I can send a trial and a game later.

Btw, it would be great if one could use defines in Test Ludeme.

RE: Test Ludeme not responding - Michael - 07-16-2021

Here is a similar bug. In the attached .lud, one can place at all sites 2 steps away from the center. The sites are properly computed, as shown by the legal moves, but when I try 
(sites Distance
    (exact 2)
in the Test Ludeme dialog, it returns the empty region [].

The test dialog works when I replace 2 with 1 or 0, but not 3.

RE: Test Ludeme not responding - Eric Piette - 07-19-2021


The algorithm to compute the sites at a certain distance is working as expecting, but to make the computation faster we also store all the sites at each distance of each playable element and apparently the sites at the max distance (here 3) were not stored, that's why the ludeme was not returning that.
I just fixed it and the problem should be fixed now.