Ludii Forum
Quantification over groups - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Suggestions (https://ludii.games/forums/forumdisplay.php?fid=10)
+--- Forum: Ludii Features / Services (https://ludii.games/forums/forumdisplay.php?fid=11)
+--- Thread: Quantification over groups (/showthread.php?tid=657)



Quantification over groups - Michael - 07-26-2021

I quite often want to check if something holds of some, none or all groups. The way I do it is to quantify over occupied sites and check if something holds of the group of some, none or all stones. This is very inefficient, and I believe there is no alternative. Could we have a boolean ludeme for quantifying over groups, like (all Sites) quantifies over sites?

... I just now thought of a different way that might work, but it would probably still be slower than native group quantification: Maybe one can first iterate over groups to add the highest index of each group to (values Remembered), then quantify over those values and check only groups at sites with those indices.


RE: Quantification over groups - Eric Piette - 07-28-2021

Hi,

So if I understand correctly you mean that (as an example with a condition to check if all groups have a size of 3):

(all Groups if:(= 3 (count Sites in:(sites))))

(sites) here is used as an iterator for all groups.

Is it that? If not, can you write a syntax of your wish?

Regards,
Eric


RE: Quantification over groups - Michael - 07-28-2021

Yes, exactly like that :)


RE: Quantification over groups - Eric Piette - 07-28-2021

Hi,

Ok, yes that's possible and that makes sense. I will add it :)

Regards,
Eric


RE: Quantification over groups - Eric Piette - 07-28-2021

Hi,

Ok I did it, that will be available in the next release.

Regards,
Eric