Ludii Forum
Games on cylinders, tori, Möbius strip - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Suggestions (https://ludii.games/forums/forumdisplay.php?fid=10)
+--- Forum: Games to Include (https://ludii.games/forums/forumdisplay.php?fid=12)
+--- Thread: Games on cylinders, tori, Möbius strip (/showthread.php?tid=263)

Pages: 1 2


Games on cylinders, tori, Möbius strip - xenos1984 - 11-19-2020

Looking through the games already included, I found various variants of chess and checkers, but as far as I can see no variant that changes the topology of the board from a simple square to a cylinder or a torus. I don't know much about the cultural role or importance of such variants, rather I find them interesting from a mathematical or strategic point of view, but at least they don't seem completely uncommon. For example cylinder chess:

http://en.wikipedia.org/wiki/Cylinder_chess

I wouldn't mind implementing such variants myself (once I get a better understanding of the Ludii grammar, as I am fairly new to it). I was just wondering whether such variants have already been implemented or there is some interest or effort in this direction.


RE: Games on cylinders, tori, Möbius strip - Eric Piette - 11-19-2020

Hi,

Yes we planned to add the necessary ludemes for the topology of the container to be able to handle that, but that's not a current supported feature in Ludii.

Regards,
Eric


RE: Games on cylinders, tori, Möbius strip - xenos1984 - 11-19-2020

Thanks for the information! I had a brief look at the grammar and I found square boards implemented, as well as a possibility to add edges to existing graphs. I guess that could be used to build up a cylinder as well?


RE: Games on cylinders, tori, Möbius strip - cambolbro - 11-19-2020

Hi,

Yes that should work, but hasn't actually been tested yet. We'll look into it.

Regards,
Cameron


RE: Games on cylinders, tori, Möbius strip - xenos1984 - 11-19-2020

Thanks! I think I'll play around with it as well and try to implement something simple like Connect Four on a cylinder.


RE: Games on cylinders, tori, Möbius strip - xenos1984 - 11-20-2020

I played around a bit with Connect Four, trying to put it onto a cylinder, but it seems to be not quite as straightforward. I tried two ideas:

First attempt: adding edges to a rectangle. That seemed easy, I just changed the board definitions by adding some edges:

Code:
<(board (add (rectangle 1 7) edges:{{{6 0}}}))>

<(board (add (rectangle 6 7) edges:{{{6 0} {13 7} {20 14} {27 21} {34 28} {41 35}}}))>

Here the first line is for the 1D stacked modelisation, and the second line for the 2D "slide to the bottom" one. However, lines of four pieces crossing the new edges are not recognized. I don't know how the "is Line" function works - my guess is that the pieces have to follow consecutive edges in the same direction, and the new edges have no "East" direction assigned to continue a line? Also, to allow diagonal lines across the gluing, would one have to add also diagonal edges to the graph?

Second attempt: use a circular board. That was actually my first try, but here I modified more. Now I made the boards circular:

Code:
<(board (circle {7}))>

<(board (circle {7 7 7 7 7 7}))>

Also since now the directions are different, I had to make a few changes to the definitions in the beginning, at least for the 2D modelisation (for the 1D stacked I just tried to keep it as it is). First change, pieces are inserted in the perimeter instead of the top:

Code:
(define "EmptyTop" (intersection (sites Perimeter) (sites Empty)))

Second change, I thought that "phase" is the angular coordinate on a circular board, so I tried this:

Code:
(define "LastColumn" (sites Phase (phase of:(last To))))

But apparently I was wrong... So I tried to define another function to slide the pieces inward as much as possible, but it's still not quite working:

Code:
(define "Distance" (- (count Sites in:(intersection (sites Empty) (sites Direction from:(last To) In))) 1))

(define "Drop" (slide (from (last To)) In (between (exact "Distance"))))

Anyway, aside from pieces ending up in the wrong place, lines in the angular or diagonal directions are not recognized in either of the two modelisations. They are recognized only if they are stacked on top in the 1D option / radial in the 2D option.

So I guess that to properly handle such cases, one would need something like a cylinder board ludeme which sets up the proper graph / a line implementation which recognizes the additional cases...

I'll attach my two modifications, in case someone would like to try it out.


RE: Games on cylinders, tori, Möbius strip - xenos1984 - 12-06-2020

To add some visual sugar to this thread, I gave the old 3D images which I made almost 20 years ago a refresh and ported them to a form viewable in a modern browser. These are the chess variants which I implemented in Zillions back then, and which I would try to port to Ludii:

http://manuelhohmann.ddns.net/mhohmann/Download/Pub/schach/vrml/V1/index.html

(Please don't get distracted by the fact that this is my old, German homepage - the images under the links should speak for themselves.)

You will find some familiar boards there, like a cylinder and a three-player variant. But also some variants on Möbius strip, Klein bottle, Torus and projective plane. The twisted ones come with an extra "twist" by 1 to 7 units before the shape is closed, so that for an odd twist, cells of the same color end up next to each other (and the coloring actually makes no sense - bishops change the color they walk on when they cross the gluing line). For some of them display is a bit distorted, since they cannot easily be embedded in 3D Euclidean space, but I can make flat drawings with extra connections.

When it comes to implementation, I will come up with specific questions on some ludemes in the appropriate subforums. This is just to give an overview of what I plan to do.


RE: Games on cylinders, tori, Möbius strip - cambolbro - 12-07-2020

Hi,

We could add a metadata graphics hint that piece images should be warped to the cell they're in, so should be able to handle the examples that can be shown as flat 2D boards.

But the 3D variants such as the Klein Bottle and Mobius Strip variants would require a different interface with 3D manipulations to view from all angles. We may support this eventually, but not for a while.

Regards,
Cameron


RE: Games on cylinders, tori, Möbius strip - xenos1984 - 12-07-2020

Actually, those 3D images were just meant to explain the topologies / board shapes I am thinking about, and less as a "wish list" for what I would like it to look like in the Ludii app. For now I would be more than happy with a simple 2D visualization, even without warping (although that would be cool for the warped tri-chess cells).

Nevertheless, since you mentioned it, allow me to add a bit more sugar. I once ran across a project named XiStrat, which does involve some "classical board games" (even though the rules are interpreted more freestyle than classical) on tilings of curved surfaces, and has quite nice 3D graphics, actually implemented in Java:

http://xistrat.sourceforge.net/index2.html

Something like that would be really awesome. But as you mentioned, that would require a completely new interface, and so definitely would take a lot more time and effort.


RE: Games on cylinders, tori, Möbius strip - dale walton - 02-01-2021

I had once suggested this could be represented (toruses and Mobius strips, Kline-bottles) as tessellations of the plane with duplicated playing pieces ("large pieces" that are discontinuous) - When they get to an edge the set of then is moved back by the modulo of the board.

Maybe you could try this method.

Mobius and kline tesselations would need pairs of large pieces to move simultaneously in mirrored directions on each move.