Ludii Forum
(count Groups NotOwn) - 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: (count Groups NotOwn) (/showthread.php?tid=67)

Pages: 1 2


RE: (count Groups NotOwn) - dale walton - 07-30-2020

Thanks. That will help a lot.


RE: (count Groups NotOwn) - dale walton - 08-15-2020

Re "These is actually an optional <region> parameter to (count Groups ...) but it is not implemented yet. We will look into implementing it."

So will it be something like (count Enclosures (<PlayerRole>)...(in:(<region>) ) ) or something like (count DisjointRegions in:<region> Connections:<move|direction> )

I have been waiting for this, but was disappointed 1.0.2 and 1.0.3 don't yet have it - in fact Count Groups documentation now shows that even counting groups of pieces is actually counting elements of groups, not number of groups.  Edit: (I'm assuming that is an error in thedescription...)

Counting the number of disjoint groups of sites within a region, according to a connection or adjacency rule is a very important ludeme. I hope you can implement it soon - or provide a sample of how to code it with existing ludemes.

----------------
I need to find:
1) number of disconnected regions within (sites NotOwn)
2) number of disconnected regions within (sites Mover)

#2 should be the same as the number of Groups a player has.

The winning condition for Abrobad is: #1  >=  #2
The winning condition for Make Muster is:  a) #1 > 1   or:  b) #2 = 1


Where NotOwn has been defined as:
(union (sites Occupied by:NonMover) (sites Empty))

or as:
(difference (sites Board) (sites Occupied by:Mover))