07-22-2022, 01:20 PM
HI,
Thanks for your interest. I am glad you are trying to learn Ludii by reverse engineering.
It has been awhile since I implemented Muster, and I have learned a lot more about scripting it, but this script is actually a fairly simple one, as my games go.
Re the board: removing squares from a square board is not a bad approach.
Now-a-days, it is possible to do math within these definitions, so a generalized formula can be used.
At the time I used a different approach: a table of poly grid definitions (probably by trial and error) and it seemed to be a buggy process, but I don't think I ever fully understood how the sites within poly are truly selected. - If one understood that, one could also do it by formula.
A third approach would be by defining "+" shaped regions and concatenating them together in a square grid somehow - There are a lot of grid operators I haven't explored, so I can't say if that would be possible.
A note on the rules implemented:
I actually modified the ending rule in implementing for Ludii - It proved simpler to understand the game if I removed the original rule that prevented a win if a piece needed to be placed. (this could happen by moving a piece to unify your position, such that a new placement location is created. It already applied for the blocking goal case to avoid complicated exceptional end games). The code for the original unification rule is still in the script, but commented out.
For the end conditions hint: My logic used counting how many groups a player has, provided he has multiple pieces in play; and for the blocking goal, finding how many groups of non-player sites exist. (Some of the "Group" related ludemes have had issues, and I am surprised that the particular one I chose to use is working. I have found that sometimes adding in some of the default arguments (or removing redundant default arguments) in the ludemes in ones script can work around bugs.)
Thanks for pointing out the error in the rule diagram. I will need to remember to correct it...
A final point, my understanding is that Ludii is for non-commercial use. Likewise for Muster: commercial use would also need my permission.
Thanks for your interest. I am glad you are trying to learn Ludii by reverse engineering.
It has been awhile since I implemented Muster, and I have learned a lot more about scripting it, but this script is actually a fairly simple one, as my games go.
Re the board: removing squares from a square board is not a bad approach.
Now-a-days, it is possible to do math within these definitions, so a generalized formula can be used.
At the time I used a different approach: a table of poly grid definitions (probably by trial and error) and it seemed to be a buggy process, but I don't think I ever fully understood how the sites within poly are truly selected. - If one understood that, one could also do it by formula.
A third approach would be by defining "+" shaped regions and concatenating them together in a square grid somehow - There are a lot of grid operators I haven't explored, so I can't say if that would be possible.
A note on the rules implemented:
I actually modified the ending rule in implementing for Ludii - It proved simpler to understand the game if I removed the original rule that prevented a win if a piece needed to be placed. (this could happen by moving a piece to unify your position, such that a new placement location is created. It already applied for the blocking goal case to avoid complicated exceptional end games). The code for the original unification rule is still in the script, but commented out.
For the end conditions hint: My logic used counting how many groups a player has, provided he has multiple pieces in play; and for the blocking goal, finding how many groups of non-player sites exist. (Some of the "Group" related ludemes have had issues, and I am surprised that the particular one I chose to use is working. I have found that sometimes adding in some of the default arguments (or removing redundant default arguments) in the ludemes in ones script can work around bugs.)
Thanks for pointing out the error in the rule diagram. I will need to remember to correct it...
A final point, my understanding is that Ludii is for non-commercial use. Likewise for Muster: commercial use would also need my permission.