- Blind mode tutorial
lichess.org
Donate

I was bored and decided to build my own chess engine. Because why not?

@likeawizard said in #9:

That video actually appeared on my nerd YouTube feed recently, however, I was reluctant to watch it as I didn't want to spoil my challenge of doing truly by myself. Will probably check it out at some point.

Haha, yes, that's exactly how I would think too. Actually I'm thinking about doing the same like you and program my own engine. For this it would be very easy to download the Stockfish code and peek into it how they - as an example - solved the board representation. But then I'd feel I cheated somehow, even if this is only the typical case of reinventing the wheel again.

@likeawizard said in #9: > That video actually appeared on my nerd YouTube feed recently, however, I was reluctant to watch it as I didn't want to spoil my challenge of doing truly by myself. Will probably check it out at some point. Haha, yes, that's exactly how I would think too. Actually I'm thinking about doing the same like you and program my own engine. For this it would be very easy to download the Stockfish code and peek into it how they - as an example - solved the board representation. But then I'd feel I cheated somehow, even if this is only the typical case of reinventing the wheel again.

@likeawizard said in #10:

@okay so it is a metallic switch in there as I guessed. Still even in the nepo carlsen match there were moments where the board misread a move and it needed to be corrected by someone manually as it stayed on the live feed for almost a minute.

That's kind of a tradeoff you have to make even with the DGT board that Carlsen and Nepo were playing on.

If the board registers that a piece is moving away from its initial square then it has to wait until the piece lands on another square. But the question now is: How long do you wait until you accept the new field as the final destination field? If you wait, say, for 200 milliseconds then it could happen what happened at the Carlsen-Nepo match. The recognized destination square is not the true destination square. Or do you wait for 500 milliseconds to be absolutely sure the square is the right one? Then Blitz games are going to be a pain in the a**.

@likeawizard said in #10: > @okay so it is a metallic switch in there as I guessed. Still even in the nepo carlsen match there were moments where the board misread a move and it needed to be corrected by someone manually as it stayed on the live feed for almost a minute. That's kind of a tradeoff you have to make even with the DGT board that Carlsen and Nepo were playing on. If the board registers that a piece is moving away from its initial square then it has to wait until the piece lands on another square. But the question now is: How long do you wait until you accept the new field as the final destination field? If you wait, say, for 200 milliseconds then it could happen what happened at the Carlsen-Nepo match. The recognized destination square is not the true destination square. Or do you wait for 500 milliseconds to be absolutely sure the square is the right one? Then Blitz games are going to be a pain in the a**.

I had this Mephisto Chess Computer:
https://www.schach-computer.info/wiki/images/thumb/e/e7/EuropaA.jpg/525px-EuropaA.jpg

There were no problems like in the Carlsen - Nepo match. It worked with pressure. Press the figure on the start square, move it and press it then on the end square.

I had this Mephisto Chess Computer: https://www.schach-computer.info/wiki/images/thumb/e/e7/EuropaA.jpg/525px-EuropaA.jpg There were no problems like in the Carlsen - Nepo match. It worked with pressure. Press the figure on the start square, move it and press it then on the end square.

@Katzenschinken said in #11:

Haha, yes, that's exactly how I would think too. Actually I'm thinking about doing the same like you and program my own engine. For this it would be very easy to download the Stockfish code and peek into it how they - as an example - solved the board representation. But then I'd feel I cheated somehow, even if this is only the typical case of reinventing the wheel again.

I think it is ok to not feel as if you are cheating. i have plans to write a simple chess engine, but I actually want to look for an engine with simple to understand code, and then use its board representation, move generation, and UCI interface, and then plug in my own search and evaluation functions, because for me that is the more interesting part. For the purpose of learning how they do board representation, move generation, etc. SF may not be the best engine to look at. Maybe some other older engines or less ambitious engines have simpler code.

On the other hand I would also like to experiment with different games (different pieces, boards, etc.), at which point I will think about my own board representation and move generation. I think initially it is good to look at other engines to learn how they do the architecture and data structures.

Congrats to OP for getting started and actually doing something!

@Katzenschinken said in #11: > Haha, yes, that's exactly how I would think too. Actually I'm thinking about doing the same like you and program my own engine. For this it would be very easy to download the Stockfish code and peek into it how they - as an example - solved the board representation. But then I'd feel I cheated somehow, even if this is only the typical case of reinventing the wheel again. I think it is ok to not feel as if you are cheating. i have plans to write a simple chess engine, but I actually want to look for an engine with simple to understand code, and then use its board representation, move generation, and UCI interface, and then plug in my own search and evaluation functions, because for me that is the more interesting part. For the purpose of learning how they do board representation, move generation, etc. SF may not be the best engine to look at. Maybe some other older engines or less ambitious engines have simpler code. On the other hand I would also like to experiment with different games (different pieces, boards, etc.), at which point I will think about my own board representation and move generation. I think initially it is good to look at other engines to learn how they do the architecture and data structures. Congrats to OP for getting started and actually doing something!

@kajalmaya said in #14:

i have plans to write a simple chess engine, but I actually want to look for an engine with simple to understand code, and then use its board representation, move generation, and UCI interface, and then plug in my own search and evaluation functions, because for me that is the more interesting part. For the purpose of learning how they do board representation, move generation, etc. SF may not be the best engine to look at. Maybe some other older engines or less ambitious engines have simpler code.

This might be what you are searching for:
https://www.chessprogramming.org/Main_Page

They also have an engine including source code for instructive purposes. I have downloaded it but until now did not look into the code. Probably will do my own board rep and move generator and then compare that with how they did it.

@kajalmaya said in #14: > i have plans to write a simple chess engine, but I actually want to look for an engine with simple to understand code, and then use its board representation, move generation, and UCI interface, and then plug in my own search and evaluation functions, because for me that is the more interesting part. For the purpose of learning how they do board representation, move generation, etc. SF may not be the best engine to look at. Maybe some other older engines or less ambitious engines have simpler code. This might be what you are searching for: https://www.chessprogramming.org/Main_Page They also have an engine including source code for instructive purposes. I have downloaded it but until now did not look into the code. Probably will do my own board rep and move generator and then compare that with how they did it.

@Katzenschinken said in #15:

This might be what you are searching for:
www.chessprogramming.org/Main_Page

Thanks. I am aware of this site. It is very good indeed. Lots of info there. I browse this site now and then.

@Katzenschinken said in #15: > This might be what you are searching for: > www.chessprogramming.org/Main_Page Thanks. I am aware of this site. It is very good indeed. Lots of info there. I browse this site now and then.

@likeawizard said in #3:

@Alientcp hah nice to hear about your project. Good luck with it!

The question is what kind of sensors are you going to use? I think NFC sounds like something you could potentially use for this. They are not expensive and you can program in codes for pieces in basic stickers that you can put it under the pieces. More difficult would be to put the sensors in the actual board. Which means you would need a matrix of those sensors so it is a rather nonstandard set up and I guess you better be a good DIY guy to make it happen. The challenge is def in the hardware for you. Code will be child's play after that.

Hmm,
I was indeed thinking on a matrix. First time i heard about the NFC sensors, but they only have a range of 10 cm. The bishops, rooks and queen are gonna get out of range unless a make a tiny board.

But at the end of the day its just matter of tinkering with it. Once i find something that works, ill just use a jig or figure out how to standardize the production.

Thanks for the advice though.

@likeawizard said in #3: > @Alientcp hah nice to hear about your project. Good luck with it! > The question is what kind of sensors are you going to use? I think NFC sounds like something you could potentially use for this. They are not expensive and you can program in codes for pieces in basic stickers that you can put it under the pieces. More difficult would be to put the sensors in the actual board. Which means you would need a matrix of those sensors so it is a rather nonstandard set up and I guess you better be a good DIY guy to make it happen. The challenge is def in the hardware for you. Code will be child's play after that. Hmm, I was indeed thinking on a matrix. First time i heard about the NFC sensors, but they only have a range of 10 cm. The bishops, rooks and queen are gonna get out of range unless a make a tiny board. But at the end of the day its just matter of tinkering with it. Once i find something that works, ill just use a jig or figure out how to standardize the production. Thanks for the advice though.

This topic has been archived and can no longer be replied to.