06-04-2020, 03:18 AM
Hope I'm not being a pest, I come from the era of procedural programming, and it can take a while to get my head around a liguistic approach. Ludii is meant as a game vocabulary....
So to try to express the need in vocabulary terms: what I am looking for is probably a (count (regions (sites boundedBy ({players})) adjacent)) -- where boundedBy ({players}) means (difference (sites board) (sites ({players})) and adjacent is the type of connection relationship that determines whether two sites are in the same region. and "regions" signifies that the count is of the number of distinct regions, and not of the number of sites in the union of the regions.
In other words, the board minus the sites occupied by those players is grouped into connected areas (defaulted as connection by adjacency) which can be counted.
Other types of connection could be oriented knight's moves for example.
If only a single player's sites are involved, then they could be considered as territories for that player eg. ( count (regions (NotOwn))) would be the same as (count territories (Mover)) plural to distinguish it from from counting the number of contained sites.
Different games could have different types of territories implemented as well.
(count (Regions (sites(Empty) adjacent) could then be written as (count territories (Empty))
So to try to express the need in vocabulary terms: what I am looking for is probably a (count (regions (sites boundedBy ({players})) adjacent)) -- where boundedBy ({players}) means (difference (sites board) (sites ({players})) and adjacent is the type of connection relationship that determines whether two sites are in the same region. and "regions" signifies that the count is of the number of distinct regions, and not of the number of sites in the union of the regions.
In other words, the board minus the sites occupied by those players is grouped into connected areas (defaulted as connection by adjacency) which can be counted.
Other types of connection could be oriented knight's moves for example.
If only a single player's sites are involved, then they could be considered as territories for that player eg. ( count (regions (NotOwn))) would be the same as (count territories (Mover)) plural to distinguish it from from counting the number of contained sites.
Different games could have different types of territories implemented as well.
(count (Regions (sites(Empty) adjacent) could then be written as (count territories (Empty))