Ludii Forum
The concepts needed to implement Nick Bentley's Bug - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Questions (https://ludii.games/forums/forumdisplay.php?fid=13)
+--- Forum: About the Ludii Grammar (https://ludii.games/forums/forumdisplay.php?fid=15)
+--- Thread: The concepts needed to implement Nick Bentley's Bug (/showthread.php?tid=979)



The concepts needed to implement Nick Bentley's Bug - Michael - 05-25-2022

I'm wondering how one would approach the problem of implementing Nick Bentley's Bug in Ludii.

The case of the two groups in the attached image seems especially difficult to me. Crucially, they cannot be transformed into each other by any combination of rotating or mirroring. 

According to Bug's concept of "same shape", these do not have the same shape. However, all properties I know how to define in the Ludii grammar which ignores chirality and rotational orientation would treat these as identical.


RE: The concepts needed to implement Nick Bentley's Bug - dale walton - 05-27-2022

It would be nice if there were a ludeme to generate a standard pattern based on a region.   Then you could generate a pattern ID for each group and chck if any were identical.

And/or a ludeme to translate / rotate the contents of a region (eg a group if pieces, etc.) together, with an optional boolean condition how all the destination sites match.

Unfortunately this doesn't exist.  My guess is scripting pattern read and compare functions would be impractically slow... Probably even when checking only the left-over cases from the simple checks...

Interested to here the Team's comments on how to do this.


RE: The concepts needed to implement Nick Bentley's Bug - dale walton - 05-29-2022

Michael, I found a way to do the bug identity check - would you like to collaborate?
I am currently stuck on interpreting the eating rules, because Nick allows a choice of which bug eats which bug.
There are only rare instances where more than one bug could eat, much less where a choice between which eats what would occur, or in which sequence and how that interacts with the don't eat if you can't grow rule.  but they affect the structure of the scripting a lot, so I need clarity.

The most true to Nick's purpose, while not requiring lots of exception rules and extra decisions is:

1. Grow or add a bug without merging bugs or exceeding the current size limit
2. Repeat the following steps until it is no longer possible:
A. Choose which bug is hungry and can grow after eating
B. Feed it all the bugs around it that it can eat.
C. Grow this bug.

The resolves questions like, if one bugs can eat both of two bugs, and another bug can eat one of them, but only one can eat (or one can grow in a way that blocks the other from eating, is it required for both prey bugs to get eaten?  --- and how to input the decisions required...

Is this how Bug is implemented elsewhere?

It also resolves tree sequence which Nick implies is horizontal, but true horizontal requires capturing the horizontal sequence, or otherwise restricting it.

As mentioned these cases seem rare, -- but when they occur, they could be very important.

BTW, are you working on this for Nick, or is this a private initiative? - I would think Nick might be particular about how the script looks and functions, and thus need to endorse the  work.


RE: The concepts needed to implement Nick Bentley's Bug - Eric Piette - 05-30-2022

Hi,

I like the suggestion about using a region to define a pattern, however, I think implementing this as a ludeme can be difficult.
So I can not answer right now, I will have to discuss with the team about this.
I come back to you when I will do this discussion.

Eric


RE: The concepts needed to implement Nick Bentley's Bug - dale walton - 05-30-2022

BTW, I found a way to do this be storing vectors as piece values, and was able to implement Bug. I will submit it if the Author agrees.


RE: The concepts needed to implement Nick Bentley's Bug - dale walton - 05-31-2022

I'll add the in progress script here for you to see what I have done with it - I presume you already have some permission in order to be currently working on it.

The rules description it contains is my own and definitely is not releasable as is...


RE: The concepts needed to implement Nick Bentley's Bug - dale walton - 06-12-2022

I now have permission from Nick, but I am awaiting his OK of the way I wrote the rules.

Since the last posting I have extensively revised the rule presentation, and corrected a major flaw: I had the wrong player winning the game.
Therefore I am uploading the corrected version now rather than waiting.  I have also added in final scores so that players can implement Nicks handicapping system during play by agreeing externally in a handicap for the more experienced player. ---

What is the best way to do that within the game: I looked at bid / pot ludemes, but the documentation of how to use these is totally lacking. - And I don't see an easy what to request / assign a handicap to a player at the start of a game as a decision move.

I am making a new submission thread, so that you will see this and take action.....


RE: The concepts needed to implement Nick Bentley's Bug - Eric Piette - 06-13-2022

Hi,

I added this game (see other post).

I am not sure I followed what was your last question about it, but I assume you figured out? If not, please explain everything in details in another post :)

Eric