News for hackers. Stuff that matters.
Re:Analog Chess – pieces are not constrained to a grid by bertil on Friday January 13, 2023 @12:45PM (#34371152)
There’s something profound here about how the very natural conventions in Chess (“If you did that, you’d lose, so I’d rather we continue playing”) have redefined “valid” in a way that is surprisingly hard to re-implement with code.
Re:Analog Chess – pieces are not constrained to a grid by cmeacham98 on Friday January 13, 2023 @01:54PM (#34372210)
It is very easy to implement with code. Chess computers are some of the first well-known computer programs (see, for example, Deep Blue).

What is difficult is adapting chess's rules to this analog environment. It would be similarly difficult if you played this way with a real chess set in the real world, has nothing to do with code.

Re:Analog Chess – pieces are not constrained to a grid by ummonk on Friday January 13, 2023 @09:23PM (#34376733)
You don't actually have infinitely many moves available in analog chess since you can only click on a pixel. But while check should be doable in reasonable time, checkmate / stalemate would be expensive to compute since you have to check every possible move of yours (not just with the king, but with other pieces that could interpose as well) and then check every possible opponent's move in response to each of your moves to see if the king will be in check in the resulting positions.
Re:Analog Chess – pieces are not constrained to a grid by cmeacham98 on Friday January 13, 2023 @10:47PM (#34377216)
You'll find that with some applied math you do not need to check every single possible move of the King.
Re:Analog Chess – pieces are not constrained to a grid by ummonk on Saturday January 14, 2023 @06:23AM (#34379374)
Please elaborate.
Re:Analog Chess – pieces are not constrained to a grid by AstixAndBelix on Friday January 13, 2023 @02:13PM (#34372460)
you can’t represent the real plane on a computer. you can only have a limited amount of precision that effectively results in very dense grid, but a grid nonetheless
Re:Analog Chess – pieces are not constrained to a grid by bspammer on Friday January 13, 2023 @04:27PM (#34374116)
I don't think it can even be called a grid, as the gaps between points aren't the same length.
Re:Analog Chess – pieces are not constrained to a grid by AstixAndBelix on Friday January 13, 2023 @05:00PM (#34374490)
depends on your choice of floating point standard, you're right for the current IEEE one
Re:Analog Chess – pieces are not constrained to a grid by ErikCorry on Friday January 13, 2023 @05:26PM (#34374758)
If the gaps are all the same size, isn't it fixed point rather than floating point?
Re:Analog Chess – pieces are not constrained to a grid by AstixAndBelix on Friday January 13, 2023 @06:26PM (#34375328)
I mean, if your board has a fixed zoom level you have to fix a certain precision
Re:Analog Chess – pieces are not constrained to a grid by rjmunro on Saturday January 14, 2023 @10:54AM (#34381231)
This is a classic example of something that should be fixed point, not floating point. Just represent positions internally as an integer between 0 and some large maximum. You could use the number of screen pixels, or a larger value if you want to allow e.g. precise moves by zooming in.
Re:Analog Chess – pieces are not constrained to a grid by jakear on Friday January 13, 2023 @05:12PM (#34374626)
are you able to represent it some place else?
Re:Analog Chess – pieces are not constrained to a grid by AstixAndBelix on Friday January 13, 2023 @05:58PM (#34375083)
what does this mean?
Re:Analog Chess – pieces are not constrained to a grid by jakear on Saturday January 14, 2023 @05:02PM (#34384578)
You stared real numbers are not representable, but specified “on computers”. Is there some medium they can be represented upon? Math papers is my only guess - but I read those on computers :)
Re:Analog Chess – pieces are not constrained to a grid by jakear on Sunday January 15, 2023 @05:34AM (#34388393)
*stated
Re:Analog Chess – pieces are not constrained to a grid by gmiller123456 on Friday January 13, 2023 @03:45PM (#34373658)
You can make illegal moves in over the board chess, and sometimes it's advantageous to do so. E.g. In blitz chess an invalid move is an immediate loss. So, if you're going to lose anyway, you can make an invalid move hoping your opponent doesn't take the time to notice. One common one is to move your king next to your opponent's king, putting their king in check, if they don't call you on it, and don't move their king out of check, they lose. Unofficially, this is considered part of the game in blitz, but is considered unsportsmanlike in long games (where it's not an immediate loss).
Re:Analog Chess – pieces are not constrained to a grid by distortedsignal on Friday January 13, 2023 @04:45PM (#34374318)
Is that... true? Are there tournament rules that say that? I'm not much of an OTB player, but this strikes me as somewhat against the spirit of the game. I will freely admit that I don't play blitz unless it's on a computer (I hate chess clocks) and computers don't allow illegal moves, but I would be very surprised if tournaments operated like this. Even small, local tournaments.
Re:Analog Chess – pieces are not constrained to a grid by crdrost on Friday January 13, 2023 @04:58PM (#34374464)
Longer games go by FIDE's "Laws of Chess" which has a section 7 called "Irregularities" that indeed specifies the behavior if you accidentally knock over pieces or the game board falls over or you make an illegal move (moving away a piece that was keeping you from check etc).

Resolving irregularities does require your opponent to notice the irregularity and bring it to the attention of the referee.

Not sure about Blitz.

Re:Analog Chess – pieces are not constrained to a grid by kanzenryu2 on Friday January 13, 2023 @04:53PM (#34374412)
I remember reading about a serious tournament game where somebody castled twice. Nobody noticed during the game. I wonder how many computer databases allow that game to be entered.
Re:Analog Chess – pieces are not constrained to a grid by Someone on Friday January 13, 2023 @06:01PM (#34375117)
That must have been Heidenfeld - Kerins, Dublin 1973.

https://www.chessgames.com/perl/chessgame?gid=2024861.

White castled short on move 10 and long on move 33. That didn’t help, though. White lost the game.

Also, it seems that site’s software doesn’t allow entering the full game.

Re:Analog Chess – pieces are not constrained to a grid by kanzenryu2 on Friday January 13, 2023 @04:51PM (#34374396)
From memory it wasn't so long ago that the laws of chess "allowed" you to play an illegal move to cause a checkmate (e.g. Qd1xf7 mate). Your opponent would say "hey that's an illegal move, take it back". You could then say "according to this rule, taking back illegal moves can only be done during a game, and according to this other rule, checkmate immediately ends the game".

Note that it can be discovered during a game that a move several turns ago was actually illegal, and the board should be returned to that position (and times adjusted). I had this happen to me once.

Re:Analog Chess – pieces are not constrained to a grid by shuntress on Friday January 13, 2023 @05:56PM (#34375052)
The "checkmate immediately ends the game" rule gets really weird in 3-chess.
Re:Analog Chess – pieces are not constrained to a grid by gmiller123456 on Friday January 13, 2023 @10:18PM (#34377068)
As a former USCF tournament director, I can say this is not true. Rule 13A - "The player who checkmates the opponent king, providing the mating move is legal, wins the game."

Additionally, there are many contradictory rules that can't all be applied, so there is a lot of room for the tournament director to apply the rules according to the spirit of the game rather than the word of the law.

Re:Analog Chess – pieces are not constrained to a grid by hasdha on Friday January 13, 2023 @10:06PM (#34377000)
It always struck me as odd that the checkmate definition should be so (relatively) complicated. A much simpler definition is "you lose if the opponent captures your king". A checkmate is just a situation where you can't avoid getting your king captured. If someone doesn't notice their king is on check, then they could lose the next move. After you pass the beginner phase, this will almost never happen to you anyway, so most games will end the same way: checkmate or losing because of time.

When I was in school, we used to play blitz like that. You lost track of your king, boom, you're dead

Re:Analog Chess – pieces are not constrained to a grid by rtpg on Saturday January 14, 2023 @02:08AM (#34377997)
I think that would make rules against castling through check inconsistent, and allowing castling through check would make the game pretty weird tbh