Ludii Forum
Problems understanding (is Blocked/Connected - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Problems (https://ludii.games/forums/forumdisplay.php?fid=5)
+--- Forum: Game Problems (https://ludii.games/forums/forumdisplay.php?fid=17)
+--- Thread: Problems understanding (is Blocked/Connected (/showthread.php?tid=548)

Pages: 1 2


RE: Problems understanding (is Blocked/Connected - Eric Piette - 05-17-2021

Hi,

The reason of that warning is because you have multiple (move Add ...) true in the same time under your loop (forEach Value ...).
Consequently for one move, you have many decision actions from that (move Add ...).
That is in theory not wrong, but that's wrong for the user to play it (because they do not know where to click to add there pieces), so we return an exception for that case.

Regards,
Eric


RE: Problems understanding (is Blocked/Connected - dale walton - 05-17-2021

So the problem is in using Value instead of Site, because the sites link where to click for the selection process, but values do not?


RE: Problems understanding (is Blocked/Connected - Eric Piette - 05-18-2021

No, The reason is because you have a

(do ....) in which you have a (forEach ....) containing a (move Add ...) which is true for many values.
Consequently, if you print the legal moves, you will see some moves with many ActionAdd with a "decision=true", which is the reason of your bug.
So if you want to use a (forEach ....) here with many decision moves, you should not use a (do ...) to encapsulate it because the computing actions will have many decisions in them.

Regards,
Eric


RE: Problems understanding (is Blocked/Connected - dale walton - 05-18-2021

OK, Clear. and thanks.