Check out Grant Acedrex, our featured variant for April, 2024.

Enter Your Reply

The Comment You're Replying To
Garth Wallace wrote on Tue, Nov 20, 2018 07:31 AM UTC:

Because of the "inside-out rook" problem, I started trying to define equivalence for pieces in terms of what conditions (relative piece positions) a move can be performed under, until I realized that this was a much better way of defining moves in the first place. the inside-out rook demonstrates that the sequence of steps is entirely irrelevant, only which squares relative to the starting square can it be blocked on and how.

So at this point, I changed my approach. Instead of a path being a sequence of steps, it becomes a destination vector and a set of "tests", where a test is a pair of a vector and a state that must be true of the square that vector away from the starting square for the move to be legal.

A welcome byproduct of defining everything in terms of vectors from the starting square, instead of vectors from the previous step in a sequence, is that "exotic" board topologies become much easier to deal with. The sequence method was fine for hex boards (it's just a different set of basis vectors), but trying to define, say, a bishop on a moebius strip board was weird (try it!). But if all vectors are treated as having the same origin, there's nothing special about it.

Nice, right? Oops, forgot about divergent captures. Okay, instead of just a destination vector, we have a set of results, a set of "things that happen when the move is taken", which can include a destination and/or capture vectors. The Chu Shogi Lion's igui capture can be expressed as a move with a capture vector but no destination vector, since the Lion doesn't move; a null-move like the Lion's jitto is a move where the result set is the empty set ∅. Promotions? Another kind of member of a result set.

There's still a problem with promotion though. We need to know when it's an option. All moves are relative, but pawn promotion happens at a certain absolute position. Let's say that there is a "promotion zone" state for squares, and any pawn step onto a square with that state is a move with a promotion result. En passant can be defined in terms of a capture move to a "just stepped over by a pawn's double move" state. Of course hte problem here is that "state" is very vague. A promotion zone is permanent, but the en passant square only exists for one turn, and there's no way of specifying that sort of thing within this system yet.

Another important thing has been left out: black and white, or more generally sides. At this point I'd been mostly ignoring them and was thinking in terms of just e.g. "knight" rather than "black knight" and "white knight". I was more or less treating captures as explicitly affecting the opposite side. But that's not very flexible (it disallows, say, a hopper that can only use friendly hurdles, or a piece that can capture friendly pieces). Abstracting away the actual human players (who may not even exist, e.g. in a chess problem), what is the distinction between the sides? Alternating turns! Counting from the beginning of a game, white pieces move on odd-numbered plies and black on even-numbered plies (and neutral on all). So we should include, as part of a move's condition (set of tests), which plies it may be performed on, in most cases some number modulo the number of sides. Together with obligate promotion, we can even define oddities like Petkovian half-neutrals, which change sides when moved. Now that we've introduced a time dimension, we can even include that in our test vectors, allowing us to define en passant more concretely in terms of the previous turn's position instead of hand-waving an "en passant square" state.

I'll get into royal status, mimics, what a "state" really is, rethinking captures, and generalizing to almost everything later, but it's getting late and I have work tomorrow.


Edit Form
Conduct Guidelines
This is a Chess variants website, not a general forum.
Please limit your comments to Chess variants or the operation of this site.
Keep this website a safe space for Chess variant hobbyists of all stripes.
Because we want people to feel comfortable here no matter what their political or religious beliefs might be, we ask you to avoid discussing politics, religion, or other controversial subjects here. No matter how passionately you feel about any of these subjects, just take it someplace else.
Quick Markdown Guide

By default, new comments may be entered as Markdown, simple markup syntax designed to be readable and not look like markup. Comments stored as Markdown will be converted to HTML by Parsedown before displaying them. This follows the Github Flavored Markdown Spec with support for Markdown Extra. For a good overview of Markdown in general, check out the Markdown Guide. Here is a quick comparison of some commonly used Markdown with the rendered result:

Top level header: <H1>

Block quote

Second paragraph in block quote

First Paragraph of response. Italics, bold, and bold italics.

Second Paragraph after blank line. Here is some HTML code mixed in with the Markdown, and here is the same <U>HTML code</U> enclosed by backticks.

Secondary Header: <H2>

  • Unordered list item
  • Second unordered list item
  • New unordered list
    • Nested list item

Third Level header <H3>

  1. An ordered list item.
  2. A second ordered list item with the same number.
  3. A third ordered list item.
Here is some preformatted text.
  This line begins with some indentation.
    This begins with even more indentation.
And this line has no indentation.

Alt text for a graphic image

A definition list
A list of terms, each with one or more definitions following it.
An HTML construct using the tags <DL>, <DT> and <DD>.
A term
Its definition after a colon.
A second definition.
A third definition.
Another term following a blank line
The definition of that term.