Creating chess variants on the spot

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Creating chess variants on the spot

Post by Ovyron »

Uri Blass wrote:Now if you allow 100 digits after the point chess programs will not be able to use a move generator that generate all the moves because the time of generating 10^100 moves is going to cause the program to lose on time so programs will have to do selective search.
Does your variant allow for arbitrarily many digits? Say, can a piece move to some 𝜋 square?
Uri Blass
Posts: 10267
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Creating chess variants on the spot

Post by Uri Blass »

Ovyron wrote:
Uri Blass wrote:Now if you allow 100 digits after the point chess programs will not be able to use a move generator that generate all the moves because the time of generating 10^100 moves is going to cause the program to lose on time so programs will have to do selective search.
Does your variant allow for arbitrarily many digits? Say, can a piece move to some 𝜋 square?
I thought about a bound of 100 digits because without bounds computers may not be able to play the game because they have not enough memory to memorize the opponent move.

It is possible to have a variant that allows also irrational numbers as long as the definition of the number has some bound otherwise it is possible that one side has not enough memory to get the number as input.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Creating chess variants on the spot

Post by Evert »

Uri Blass wrote: I thought about a bound of 100 digits because without bounds computers may not be able to play the game because they have not enough memory to memorize the opponent move.
Just use a float.

However, adding this sort of fine-grained information will make the game more difficult to play for humans compared to computers. More to the point, it just adds complication for the sake of adding complication, without significantly enriching the game. Feel free to prove me wrong with a counter-example.
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Creating chess variants on the spot

Post by Ovyron »

Uri Blass wrote:I thought about a bound of 100 digits because without bounds computers may not be able to play the game because they have not enough memory to memorize the opponent move.

It is possible to have a variant that allows also irrational numbers as long as the definition of the number has some bound otherwise it is possible that one side has not enough memory to get the number as input.
I think it can be abstracted, here's my proposal below, let me know what you think.

I really don't like that in the starting position, you're allowing the pieces to move backwards, my solution has them starting at the edge of the board:

Analog Chess

(as opposed to quantized chess)

This variant is played on a 7x7 board. Pieces initially are placed on the intersections ("points") of the board, like in go.

The lowest, left-most point on the board is known as 0,0 and the White rook is there. The point adjacent to this one is 1,0 where the knight stands, and the rest of the chess pieces are on the other points.

The point north of 0,0 is 0,1 and all white pawns are on this row.

The black pawns are on row 6 and the black pieces are on row 7.

Pawns are allowed to move to any arbitrary place between where they are and the next row, so a pawn on 0,1 can move to any place between 0,1 and 0,2 (that is, they can move to 0,1.5 or 0,1.466894654 or 0,1.333 with 3s infinitely repeating, or any other real number.) However, any pawn that hasn't moved yet can use a double move, so the 0,1 pawn can also move to any place between 0,2 and 0,3.

Rooks can move from where they are, to any arbitrary place on the same row or on the same column, not blocked by a friendly piece. So a Rook on 0,0 can move arbitrarily close to the pawn on 0,1 or to the knight at 1,0.

Bishops can move from where they are to any place diagonally from them. A Bishop on 2,0 can move to 1.5,0.5 or 2.5,0.5 or any place arbitrarily close to the pawns blocking them. Please note Bishops aren't color-bounded, as they can make diagonal moves that allow them to switch colors.

The queen may move like a rook or like a bishop.

The king moves like a queen, but can't move more than one point at a time (say, from 0,3 to 0,4 and all places in-between, but no more).

ε Moves

You may have noticed that the moving rules depicted so far always allow for a "gap" between the pieces. For instance, a rook moving from 0,0 towards the pawn at 0,1 would be unable to move just right behind the pawn, because any number of spaces that she moves would still allow her to move even closer next turn.

ε (for εpsilon) Moves solve this, as you can move any piece to some number minus ε, leaving no gap between the pieces. So, a rook may move from 0,0 to 0,1-ε which would be right behind the pawn, leaving no gap between them, so that no piece can squeeze between them, and the rook may not move closer to the pawn next turn. ε is like "1-0.00...for an infinite number of 0s...1".

In other words, the pawn and the rook are in the same point, but for all effects, the rook can't be captured by a frontal attack because the pawn covers her.

This can stack, so, say, a queen can move to 0,0 and then later move to 0,1-ε-ε right behind the pawn and the rook.

This rule is necessary, because otherwise, players could play the equivalent of e4 e5 but the pawns would leave a gap between them, so the players could just more arbitrarily close to each other forever. With ε a player can move to some n-ε square, right in front of the pawn, so the pawns don't have a gap between them, and the other player can't move closer to your pawn.

Captures

For the pawn, draw a square upwards from where it is, to the point in the next row, and to the point adjacent on its left, and another square on its right. Any enemy piece on this square may be captured and the pawn would move to this location, as long as the enemy piece isn't in the same row or column. Unless there's a friendly piece in the square that is closer to the pawn than the enemy piece.

The rook creates similar squares upwards with a width of 1, and to its sides, with a height of 1, and if an enemy piece is on the squares it may be captured, unless a friendly piece is also on it as is deemed to block the rook.

For the Bishop, it may capture in 4 directions. Say, if it wants to capture up-left, first imagine a line that extends from the Bishop up for a length of 0.5 and left from a length of 0.5, then from the end of those lines, parallel lines going diagonally up-left extend, and any enemy piece between the parallel lines may be captured, unless a friendly piece is met first, and is deemed to block the bishop. The other 3 directions work the same.

The queen may capture like the rook or like the bishop.

The king captures like a queen but limited to 1 point orthogonally and the same space a pawn would cover diagonally.

The Knight

The Knight is the only piece that doesn't check if there's a friendly piece blocking its attacks. It creates a phantom square around it that is 0.5 distance from its place in all directions, then this phantom square may move to any of the 8 directions a chess knight could move in. If the final location of the square has any enemy pieces inside it, the knight may move into the square to capture it, and remain in the place where the enemy piece used to be. If there's nothing on the square, the knight might move to any arbitrary place in this square. If there's a friendly piece in this square and no enemy piece, the knight is considered blocked and may not move in this direction.

For instance, a knight on 0,1 would create a phantom square. If it wants to move towards 2,2 the phantom square would have these points as its corners:

1.5,2.5 2.5,2.5
1.5,1.5 2.5,1.5

The knight can move to any arbitrary place inside this square (say, 1.79,2.3258).

If there's a friendly place inside this square, the knight can't move towards 2,2 unless there's also an enemy piece or more on it.

If there's an enemy piece or more in the square, the knight may only move to a place it occupies to capture.

Once again the knight is the most complex piece to explain.

The objective of the game is to checkmate the enemy king and all other common chess rules apply.

Implementing the variant

Now, Uri Blass claims that it's impossible to implement a variant like this because the program would run out of memory trying to pin-point the exact location of the piece. For instance, if I move my pawn to 0,√2 since it's irrational, the program uses all its memory storing its decimal expansion and its head explodes.

Nothing stops me from moving my pawn to:

0,1.101001000100001000001... (infinite sequence)

Or

0,1.1234567891011121314151617181920... (infinite sequence)

So what do we do?

Well, my claim is that the program that implements this shouldn't care about where exactly the piece is.

Say, if I move to a place like this, the program stores in memory that my pawn is somewhere between 0,1 and 0,2 and can start normal search algorithms that approximate this location.

If I move my Knight to 2.00...for 5 trillion 0s...01,2.00...for 5 trillion 0s...01 the program calculates as if my knight was at 2,2 and just needs to account for the differences where the knight would be able to move or capture to a place or a piece that the 00...for 5 trillion 0s...01 differences would allow.

The engine doesn't need to calculate 10^100 moves because it can abstract them, and pretend pieces only have the options of moving to a point, or in the middle of those points.

I wonder if this variant is essentially different from Uri's and if it isn't, then I think allowing arbitrary places for moving is possible, and programming an engine that plays it is possible. The most difficult part is having to implement some math in the GUI so that complex expressions used as the new location of the pieces can be resolved.
User avatar
hgm
Posts: 27787
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Creating chess variants on the spot

Post by hgm »

As long as there is a finite number of pieces, it is only the order of the pieces (or more accurately, the order of the projections of the pieces on the major directions) that is important. And this is finite. So it should be possible to make an engine for this that considers all 'essentially different' moves.
Uri Blass
Posts: 10267
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Creating chess variants on the spot

Post by Uri Blass »

I thought about directed pieces(do not know if it is a new idea)

For example a directed queen means that the side with it can choose an initial direction and reveal it to the opponent when the queen can move only in this direction in the first move of it.
After the directed queen moves she choose immediately a queen direction that is the only direction that she can move in the next move.

Directed queen is of course worse than a normal queen that is not limited to a specific direction in every move.

There should be some types of directed queens.
1)directed queen when the opponent knows about the direction and the queen choose the direction in the next move after every move of it in the game.
2)stronger directed queen when the opponent does not know about the direction but the player cannot use her to make illegal moves because the arbiter know about the direction

3)stronger directed queen for a different reason when the reason is that the player can decide about the direction not only when the queen moves but also in the previous move if the queen does not move.

4)stronger directed queen for both reasons(opponent does not know and ability to choose direction in the previous move of the game even when the move was not of the directed queen).

Even 4 is weaker than normal queen because the player is limited to one direction that he could choose in the previous move of the game but cannot change based on the opponent move.
User avatar
hgm
Posts: 27787
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Creating chess variants on the spot

Post by hgm »

Centennial Chess has 'Rotating Spearmen', which behave somewhat like your Directed Queen. Except that they can only have 3 orientations rather than 8. But then they can move both forward and backward along the ray in that orientation.
Uri Blass
Posts: 10267
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Creating chess variants on the spot

Post by Uri Blass »

Here is another idea.

pieces move like in chess but they can be replaced by another piece with some probability after they move except king(let say probability 0.1)

In this case in the following b7 is mate only with probability of 95% and stalemate with probability of 5% because in 10% of the cases the pawn b7 is repaced with equal probability for knight bishop rook and queen and if white is unlucky then it is replaced by a knight or by a rook.

I do not know if b7 is the best move

[d]k7/P7/KP6/8/8/8/8/8 w - - 0 1

in the second position h8=Q is 92.5% mate(90% queen remains queen and 2.5% queen replaced by a rook) but 2.5% draw(note that promoting to a bishop or a knight does not mean not having enough mating material because it is possible that the bishop is going to be replaced later by a queen and I do not know what is the probability of white to win but in case the queen at h8 is replaced by a pawn it is an obvious draw because the pawn at h8 cannot move so you cannot replace it).

[d]k7/7P/K7/8/8/8/8/8 w - - 0 1