lidraughts.org

[Feature request/Bug]

When I edit the board (on /editor), I can't pick any variation for the board. (So Frisian instead of International.) Since this is already built-in for lichess.org I presume it is an easy fix. Thanks a lot.

Nice, I was planning to implement something like that already, as it can indeed be a bit clumsy to get variant position in the analysis board (copy & paste FENS).

Good to see lichess already did so in the meantime, that'll make it a quick fix for lidraughts indeed :)

A different variant won't change the FEN. It should be annotated in a PDN or PGN tag. In lichess this is the "Variant" tag, but in draughts the "GameType" tag seems to be the standard. Which I personally think is a better name.

pdn.fmjd.org/gametype.html

Talking about FEN. In Frisian draughts there is the additional rule for a king to only make three consecutive moves. There is no way to annotate this in a FEN. Maybe worth thinking about.

I mean that to analyse a variant position from the editor now, you'd have to open the analysis board, change the variant, and then paste the FEN string from the editor. Adding a variant dropdown to the editor adds a shortcut for this FEN copying & pasting.

Lidraughts already uses the GameType tag in its PDN import/export (e.g. [GameType "40"] for Frisian), although it would also understand the equivalent Variant tag like [Variant "Frisian"]

Lidraughts adds "+b+w" to a Frisian FEN to count the king moves for black and white respectively. This is an unofficial invention by me, but it has to encode this information somehow to fully represent a Frisian position.

Same is true for ordinary draughts FENs, some information is missing. For example, you need to know the distance to draw in endgames, to fully encode the position. This is also missing from the official specification, for which I invented the ":Hx" FEN addition, which counts the halfmoves to draw depending on the piece configuration.

Disadvantage is that this makes the FENs incompatible with other sources (you'd have to remove everything after ":H"), but the site requires this information when passing FENs around, and there haven't been any complaints yet :)

Variant support has been added to the editor! Now you can switch between analysis board <-> editor <-> studies and it will remember the variant

I see. It seems that you are already a few steps ahead indeed.

However, if you want to be completely correct, there is one additional rule that can make a FEN require additional information for the Frisian game. That is that if a game ends in two kings vs one king, the player with the two kings must end the game within 7 moves, otherwise it is a draw. (Just so that if the player does not have the knowledge to end such an endgame, he/she can't elongate the game forever.)

Source (in Dutch):

http://www.friesdammen.nl/documenten/DFSreglemint2011jannewaris.pdf

As far as I could find on the internet the official grammar for these kind of things is documented at the following link. So you might want to contact Wieger Wesselink, if you really want to make these inventions "official", as how far "official" goes.

pdn.fmjd.org/index.html

One final remark.

I see you have already implemented this feature. So that is great, thanks a lot. (I can foresee some people will also happily use this website for embedding analysis of games in their own website, the oerterp applet is not so user friendly.)

But there is still a slight bug; the button "Continue from here" does not work. Currently not a great issue, but when AI will be introduced a bit inconvenient.

Note that this is actually a bug that exists on lichess as well. So, maybe wait for them to figure it out. (Although already open for 3 years.)

github.com/ornicar/lila/issues/833

The half-move counter that I added to the FEN is used in frisian games to count the distance to 7 moves draw, so there should be a complete gamestate representation for both variants. I might contact Wieger Wesselink about that, thanks.

It is intentionally disabled to play variant games from position, as this is not supported by the way the server represents playing from position challenges. So I don't know if I would count that as a bug, more as a lacking feature.

I see you have indeed put much effort in it to make it all fully compliant to the rules. However, I believe there is still a situation where your implementation does not comply to the rules. Sorry to be so annoying, just want it to be done good.

That is the following. If a player has two or more kings, but also still has man. (So that the three consecutive rule applies.) And he makes three consecutive moves with one of his kings, he cannot make any move with the king he made the consecutive moves with, but he still is allowed to make any moves with any other king he possesses.

However, when I tested this, it seems that I cannot make a move with any king if I moved a king three times in a row. So, you also need to add information about which king moved three times in a row.

Not annoying at all, you are right that things have to be implemented good!

We also thought about that rule of course, but at the time the website launched we somehow couldn't clear up if it should be taken to mean 3 moves per king, or 3 kingmoves in total. Being totally new to the game ourselves, we consulted several sources and players, but depending on the source the answer was different (I guess because it occurs so little in practice), or could be interpreted both ways...

In the end we settled on the current implementation as most logical, which is 3 kingmoves in total, and didn't think about it again until now. If the official rules are 3 moves per king anyway, we will change that of course. It will make the FENS more complicated though, as a simple counter per color won't suffice.

It is stated unambiguously as 3 moves per king in Art 17 of the source you linked, that is the clearest explanation of the rules I have seen so far (in Dutch):
http://www.friesdammen.nl/documenten/DFSreglemint2011jannewaris.pdf

So the correct rule should be this:
You can make a non-capture move with the same king only up to three times in a row. After that you must either capture with that king, or move a different piece (man or king). If that different piece is also a king, we start counting that as the first move for that king (unless it was a capture), etc.

In that case the current FEN only needs to be extended with the position of the last king that was moved per color, and the rules changed to reset the counter to 1 if a different king moves.

Agree?

Reconnecting