4 ms·
I'm curious as to why you wrote your own chess implementation - seems like this would have been much easier to implement with chessboard.js [1] and chess.js [2]
by primitivesuave 2y ago
I'm curious as to why you wrote your own chess implementation - seems like this would have been much easier to implement with chessboard.js [1] and chess.js [2].
1. https://chessboardjs.com/ https://chessboardjs.com/
2. https://github.com/jhlywa/chess.js/blob/master/README.md https://github.com/jhlywa/chess.js/blob/master/README.md
- mkoryak 2y agoThey wrote their own because it's more fun to do that, and also because they really wanted me to win. The computer is really really bad
- lucb1e 2y agoHey now, I was proud to have won from a chess computer for once!
- alabastervlog 2y agoGlad I'm not the only one who often can't beat even the "easy" computer opponent in chess programs. The main problem is that I only win by having my extremely-stupid blunders overlooked and then spotting my opponent's extremely-stupid blunder, so if the computer never misses my boneheaded blunders and also almost never commits any exploitable-in-one-or-rarely-two-moves blunders of their own, I can't possibly win, zero chance.
- renox 2y agoROFL you're right that the computer is really bad, I won in 7 round which is a first for me (against a computer) and I'm bad at chess. It reminds of a reversi I made for a school projects: users liked it because the computer was so bad that they could win..
- logicallee 2y ago>I'm curious as to why you wrote your own chess implementation I was investigating whether AI can write a complete game of chess in one shot, I livestreamed that here[1] and the answer is no (conclusion: major rules are there, but buggy), but I was able to get it into a working state after many hours of back and forth. The original implementation froze whenever a pawn got to the seventh rank, and allowed castling out of and through check (illegal), it was very buggy. Iterating with the AI, I added tons of stuff like drag to move pieces, mobile support, and, yes, computer play. When that was finished (it is available at: https://taonexus.com/chess.html https://taonexus.com/chess.html ) I had it make this blunder-free variant and it got it pretty fast. [1] https://www.youtube.com/watch?v=AhJ07anVkYk https://www.youtube.com/watch?v=AhJ07anVkYk
- bavarianbob 2y agoSurprisingly, in this context, I frequently came across interfaces that make it difficult to implement certain features using those libraries. There's not a one-size-fits-all implementation yet.