Hi all, Im an undergraduate mechatronics engineering student with a passion for chess and almost no knowledge regarding coding a chess engine.
I have planned to make a robot which plays chess agiainst a human opponent. For this I require the code which holds the status of the board and gives the best possible move as the output. I have serached far and wide on the internet but I was presented with code that I couldnt make neither heads nor tails of. Could someone help me out here please?
PS: im looking for c++
Chess AI
-
- Posts: 190
- Joined: Sun Jul 14, 2013 10:00 am
- Real Name: H.G. Muller
Re: Chess AI
This is what all chess engines do. You can send them the board position, (or, more accurately, the preceding game history, so they will be able to detect repetitions), and they reply with the best move. So why would you need the code? You can just run an engine of choice as a separate process; there is need tomeddle with the code, or even have access to it, and you can use any binary for the platform you are running on. There are more than a thousand of such engines.
Which engine you should choose also depends on your goals. Do you want something that crushes any opponent in about 20 moves, or do you want something they can beat? There are several highly commented source codes for engines, including some of my own. The latter simple are all in plain C,though; I don't know C++.
Which engine you should choose also depends on your goals. Do you want something that crushes any opponent in about 20 moves, or do you want something they can beat? There are several highly commented source codes for engines, including some of my own. The latter simple are all in plain C,though; I don't know C++.
Re: Chess AI
I see. I guess a regular engine would be enough. What do you recomend? Where can I download said engines/source code?
Re: Chess AI
I see. I guess some playable engine would do the deed for me. What do you suggest? Where can I download said engine/source code?