7 ms·
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 redefine
by bertil 4y ago
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.
- cmeacham98 4y agoIt 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.
- ummonk 4y agoYou 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.
- cmeacham98 4y agoYou'll find that with some applied math you do not need to check every single possible move of the King.
- ummonk 4y agoPlease elaborate.
- AstixAndBelix 4y agoyou 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
- bspammer 4y agoI don't think it can even be called a grid, as the gaps between points aren't the same length.
- AstixAndBelix 4y agodepends on your choice of floating point standard, you're right for the current IEEE one
- ErikCorry 4y agoIf the gaps are all the same size, isn't it fixed point rather than floating point?
- AstixAndBelix 4y agoI mean, if your board has a fixed zoom level you have to fix a certain precision
- rjmunro 4y agoThis 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.
- jakear 4y agoare you able to represent it some place else?
- AstixAndBelix 4y agowhat does this mean?
- jakear 4y ago
- gmiller123456 4y agoYou 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).
- distortedsignal 4y agoIs 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.
- kanzenryu2 4y agoI 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.
- Someone 4y agoThat must have been Heidenfeld - Kerins, Dublin 1973. https://www.chessgames.com/perl/chessgame?gid=2024861 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.
- crdrost 4y agoLonger 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.
- hasdha 4y agoIt 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
- rtpg 4y agoI think that would make rules against castling through check inconsistent, and allowing castling through check would make the game pretty weird tbh