4 ms·
It's not chess if it doesn't allow castle. From the comments (http://www.pouet.net/prod.php?which=64962#c715279 http://www.pouet.net/prod.php?which=64962#c71527
by not_kurt_godel 12y ago
It's not chess if it doesn't allow castle. From the comments (http://www.pouet.net/prod.php?which=64962#c715279 http://www.pouet.net/prod.php?which=64962#c715279):
> Well... It is clear to me that you put more interest in making a small chess program that in making a good chess program. That's understandable even if the result is a program very easy to beat but... you cannot say that BootChess is a complete chess program because it does not allow to castle (didn't tried promotions, underpromotions, en passant pawn captures, stalemate... but I bet that are not supported, are they?) and, worst, it does not care about avoid to place a King in check. Every chess player knows that it is illegal (the movement CANNOT be made) to place your king on a square controlled by your rival pieces. If you allow it, then this is not chess.
- raverbashing 12y ago" It is clear to me that you put more interest in making a small chess program that in making a good chess program" That's pretty much obvious It's an exercise in programming, it's not "the ultimate chess software"
- libria 12y ago"Chess program" has to be defined in a way the general audience can agree to. Many people could also code a non-chess implementation in much less than 487 bytes and call it chess. It still looks like an impressive exercise, but any talk of broken records demands widely accepted set of rules that have been met.
- girvo 12y agoNot when the predecessor also doesn't meet those rules.
- not_kurt_godel 12y agoThe obvious interpretation of "good" in that sentence is that it would allow the player to play chess according to universally defined and agreed-upon rules. Castling is one such rule. While I think one could argue there is some leeway with allowing the king to move into check since it doesn't prevent 2 players familiar with the rules from playing a valid game, inability to castle does not pass this litmus test. Castling is integral to the game and is neither obscure nor rarely invoked, even at the novice level - a game without it is simply not "chess". While I agree this is an impressive programming exercise and worthy of recognition in its own right, calling it a "new record" is like claiming a marathon record after running 25 miles
- a3_nm 12y agoTo play the devil's advocate, castling was a pretty late addition to the rule of chess compared to most other rules, so there used to be a game called "chess" which did not feature castling (nor the option to move pawns initially by two squares). Some regional variants of chess https://en.wikipedia.org/wiki/Indian_chess https://en.wikipedia.org/wiki/Indian_chess did not feature castling fairly recently (and differed from mainstream chess only by a few points), and there are stories of Indian chess players who became masters in Europe (as late as the early 20th century) even though they had learned to play without castling (can't recall the name of the one I had in mind, but there are such anecdotes at least for Mir Sultan Khan). I agree that it would be nicer if the implementation followed FIDE rules, though, and that not being able to castle significantly changes the strategy.
- greyman 12y agoYes, totally agree. I think we could be lenient on moves validity - let's accept that the program will work correctly only if the opponent plays legal moves, and it also doesn't need to castle. Maybe it is also not necessary that it will detect mate or stalemate, we can assume that some external arbiter will end the game. But what I think a chess program absolutely needs to implement to be called a chess program is: - should be able to play with both white and black - support all normal moves obviously - must allow opponent to play any legal move (castling, en passant, promote pawn to any figure) - must not keep its own king in check
- pierrec 12y agoWell, the 1982 1k implementation he was trying to beat did not cover these rules either. In fact, this version implements pawn promotion to queen, which the ZX 1k version did not. So the part about beating a 33-year-old record stands. An interesting challenge would be to see if you can add all the missing rules and still keep it under 1k. So the lovers of strict definitions would finally have their version!
- sillysaurus3 12y agoAnother interesting question: If you could design your own instruction set, what is the smallest you could make a complete chess program? Is there an ultimate limit, information-theory style?
- mikeash 12y agoI propose an instruction set which consists of a single instruction. I'll give it the mnemonic CHS, and when executed, it causes the CPU to play a game of chess with the user. (That's a long way to say that the question is somewhat under-constrained.)
- sireat 12y agoThis lack of full chess rules implementation really grates on me. As someone said on proggit, this claim is similar to claiming to be the fastest 100m runner, except you ran 70 yards. There should be an ongoing challenge to implement a full chess rule spec in as small a program as possible. FIDE rulebook(warts and all) is one place to start: http://www.fide.com/component/handbook/?id=124&view=article http://www.fide.com/component/handbook/?id=124&view=article
- greyman 12y agoWhat about moves validity, and detection of mate/stalemate? Would it be ok that the program assumes, that the opponent is playing legal moves only? Also, should it be required to detect mate and stalemate, and stop playing at that point? Also, there is a 50-moves rule and 3rd position repetition rule, but I believe this doesn't need to be implemented, since you are not required to invoke the rule.
- SeanDav 12y agoYou are correct, the program does not follow all the rules of Chess, but I think we can celebrate a small technical achievement without getting too bogged down in defining what exactly a Chess program is.