- Blind mode tutorial
lichess.org
Donate

Wanted To Create A Chess Engine

Is there anybody who can guide me to create a basic chess engine

Is there anybody who can guide me to create a basic chess engine

Read the Chess Programming Wiki. Also look up a PDF titled "Guide to Programming a Chess Engine".

Read the Chess Programming Wiki. Also look up a PDF titled "Guide to Programming a Chess Engine".

This should help ...

https://www.freecodecamp.org/news/simple-chess-ai-step-by-step-1d55a9266977/
https://www.chessengines.org/
https://www.chessprogramming.org/Getting_Started
https://www.chess.com/forum/view/general/a-step-by-step-video-guide-to-writing-a-chess-engine
https://github.com/Jormit/simple-chess-ai
https://byanofsky.com/2017/07/06/building-a-simple-chess-ai/
https://healeycodes.com/building-my-own-chess-engine

https://youtu.be/U4ogK0MIzqk

https://youtu.be/OpL0Gcfn4B4

This should help ... https://www.freecodecamp.org/news/simple-chess-ai-step-by-step-1d55a9266977/ https://www.chessengines.org/ https://www.chessprogramming.org/Getting_Started https://www.chess.com/forum/view/general/a-step-by-step-video-guide-to-writing-a-chess-engine https://github.com/Jormit/simple-chess-ai https://byanofsky.com/2017/07/06/building-a-simple-chess-ai/ https://healeycodes.com/building-my-own-chess-engine https://youtu.be/U4ogK0MIzqk https://youtu.be/OpL0Gcfn4B4

A "basic" chess engine only needs to do legal moves, so they can be "random" move. If you start using the "minimax algorithm", it's nolonger a basic engine. Start by looking at the above links and videos while you keep in mind what a basic engine is and what you really want for starters.

Take notes of the steps while you read and look at above links and videos. You need to understand the steps, not so much the code. Then you want to place the steps in some form of UML block diagram. https://www.drawio.com/

Pick the coding languages you think that will fit your needs. For a challenge I would use a language that not many people used to build their chess engine. You have to enjoy learning and building your chess engine. Have you read about the Rust language or the Scala language?

A "basic" chess engine only needs to do legal moves, so they can be "random" move. If you start using the "minimax algorithm", it's nolonger a basic engine. Start by looking at the above links and videos while you keep in mind what a basic engine is and what you really want for starters. Take notes of the steps while you read and look at above links and videos. You need to understand the steps, not so much the code. Then you want to place the steps in some form of UML block diagram. https://www.drawio.com/ Pick the coding languages you think that will fit your needs. For a challenge I would use a language that not many people used to build their chess engine. You have to enjoy learning and building your chess engine. Have you read about the Rust language or the Scala language?

@akki_2704 said in #1:

Is there anybody who can guide me to create a basic chess engine

This is better asked on a programming platform than on a chess platform.

Having said that, you probably won't get much positive response there. You haven't done anything yourself yet (or at least, your question doesn't show you did), and you're basically asking to be spoonfed.

At least show what you have done so far, and what specific issues you need help with.

@akki_2704 said in #1: > Is there anybody who can guide me to create a basic chess engine This is better asked on a programming platform than on a chess platform. Having said that, you probably won't get much positive response there. You haven't done anything yourself yet (or at least, your question doesn't show you did), and you're basically asking to be spoonfed. At least show what you have done so far, and what specific issues you need help with.

Some open-source chess-engine projects are in this list ...
https://www.libhunt.com/topic/chess-engine

Sunfish was on the top of their list. It's Python Chess Engine with 111 lines of code.
https://github.com/thomasahle/sunfish

Down the list there is betafish
https://github.com/Strryke/betafish
https://gavinong.com/projects/betafish

Some open-source chess-engine projects are in this list ... https://www.libhunt.com/topic/chess-engine Sunfish was on the top of their list. It's Python Chess Engine with 111 lines of code. https://github.com/thomasahle/sunfish Down the list there is betafish https://github.com/Strryke/betafish https://gavinong.com/projects/betafish

Check out this forum https://talkchess.com/, where you will find a big chess programming community. Although I am not programming my own engine, I find many discussions there (of engines and other tools) very interesting.

Look up Klein (2021) Neural Networks for Chess (which is a free book made available by the author on github).

There are chess libraries in C++ and python. You might want to do a few simpler tasks first (depending on your programming skills), for example, how to pass a position to stockfish from a python script, and process the output that SF returns, or load a game and discover moves on which a sacrifice was made, and so on. Such smaller projects with existing tools and libraries might give you a feel for the field. Otherwise, you will spend a lot of time implementing legal moves, board representation, and so on and won't get to the fun part.

Another idea is using an existing open source engine for its board representation, move generation, etc. and implementing your own algorithms.

Also, read a little bit about general game theory (especially, pertaining to two person games of strategy). For all you know, you may find some other game more interesting to implement. (Personally for me me the part of chess programming related to board representation, move generation, etc. is not interesting, so I would like to experiment with games in which move generation, etc. are not that hard, but the algorithmic part, strategies etc. are is still interesting.)

Finally, I would suggest improving your own chess skills (although from 1200? rating I am not assuming that you are a beginner) before embarking on implementing a chess engine.

Check out this forum https://talkchess.com/, where you will find a big chess programming community. Although I am not programming my own engine, I find many discussions there (of engines and other tools) very interesting. Look up Klein (2021) Neural Networks for Chess (which is a free book made available by the author on github). There are chess libraries in C++ and python. You might want to do a few simpler tasks first (depending on your programming skills), for example, how to pass a position to stockfish from a python script, and process the output that SF returns, or load a game and discover moves on which a sacrifice was made, and so on. Such smaller projects with existing tools and libraries might give you a feel for the field. Otherwise, you will spend a lot of time implementing legal moves, board representation, and so on and won't get to the fun part. Another idea is using an existing open source engine for its board representation, move generation, etc. and implementing your own algorithms. Also, read a little bit about general game theory (especially, pertaining to two person games of strategy). For all you know, you may find some other game more interesting to implement. (Personally for me me the part of chess programming related to board representation, move generation, etc. is not interesting, so I would like to experiment with games in which move generation, etc. are not that hard, but the algorithmic part, strategies etc. are is still interesting.) Finally, I would suggest improving your own chess skills (although from 1200? rating I am not assuming that you are a beginner) before embarking on implementing a chess engine.

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