where to start chess programming?

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
vittyvirus
Posts: 646
Joined: Wed Jun 18, 2014 2:30 pm
Full name: Fahad Syed

where to start chess programming?

Post by vittyvirus »

my name is fahad. m 13 n i love to program and play chess. i wanna program a chess engine. i want to program the best. there's no alternative to that. i want to program the world computer chess championthe engine. i hv been programming for 3 years n i've developed the free software windows tricker (http://silican.site90.com). i hv also some expierence in c++, and m gonna make my chess engine in tht. i first landed on chessprogramming wiki, but soon got that it was supposed to be a reference. i continued to hunt fo c++ chess prog tutorials and got on write a chess egine in 99 steps. but i guess i can get better places to start , as the engine wingletx is pretty weak. as i see many big bros like hounorable dr hyatt, here are my two questions to all chess programmers
1. where exactly, and i mean exactly, should i start? i am already reading c++ primer if u think i should master cpp first.
2. there are hundreds of chess programs, but why are some programs, eg stockfish n crafty etc much more advanced than others? what acually goes into making a 3000+ rated engine???
User avatar
JuLieN
Posts: 2949
Joined: Mon May 05, 2008 12:16 pm
Location: Bordeaux (France)
Full name: Julien Marcel

Re: where to start chess programming?

Post by JuLieN »

Welcome, Syed. A good start to program a good chess engine is to have a keyboard with all the letters on it, otherwise you'll make lots of programming mistakes.
"The only good bug is a dead bug." (Don Dailey)
[Blog: http://tinyurl.com/predateur ] [Facebook: http://tinyurl.com/fbpredateur ] [MacEngines: http://tinyurl.com/macengines ]
User avatar
JuLieN
Posts: 2949
Joined: Mon May 05, 2008 12:16 pm
Location: Bordeaux (France)
Full name: Julien Marcel

Re: where to start chess programming?

Post by JuLieN »

More seriously, here are a few suggestions :
1- post those questions in the programming sub-forum
2- Someone made a great video tutorial on youTube: https://www.youtube.com/playlist?list=P ... tZHVbT-2hg
3- Bookmark the Chess Programming Wiki :https://chessprogramming.wikispaces.com
4- For your first engine don't start from an existing source code = learn by yourself.
5- Don't think you'll make a 3000+ engine (at least not an original one : ALL programmers coming out of the blue with a 3000+ engine copied another engine, and this is not regarded well by the community).
6- making a strong engine is a work of patience, dedication and talent. It'll take you many years. Rome wasn't built in one year.
"The only good bug is a dead bug." (Don Dailey)
[Blog: http://tinyurl.com/predateur ] [Facebook: http://tinyurl.com/fbpredateur ] [MacEngines: http://tinyurl.com/macengines ]
Henk
Posts: 7218
Joined: Mon May 27, 2013 10:31 am

Re: where to start chess programming?

Post by Henk »

Get a copy of stockfish and try to understand how it works. I don't like reading source code of other people. It's always quite difficult to understand.

Maybe first step is make a chess program that performs random moves.
Next step implement alpha beta algorithm ?
Henk
Posts: 7218
Joined: Mon May 27, 2013 10:31 am

Re: where to start chess programming?

Post by Henk »

Probably best is not to start at all. But If you really sure ...
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: where to start chess programming?

Post by zullil »

vittyvirus wrote:my name is fahad. m 13 n i love to program and play chess. i wanna program a chess engine. i want to program the best. there's no alternative to that. i want to program the world computer chess championthe engine. i hv been programming for 3 years n i've developed the free software windows tricker (http://silican.site90.com). i hv also some expierence in c++, and m gonna make my chess engine in tht. i first landed on chessprogramming wiki, but soon got that it was supposed to be a reference. i continued to hunt fo c++ chess prog tutorials and got on write a chess egine in 99 steps. but i guess i can get better places to start , as the engine wingletx is pretty weak. as i see many big bros like hounorable dr hyatt, here are my two questions to all chess programmers
1. where exactly, and i mean exactly, should i start? i am already reading c++ primer if u think i should master cpp first.
2. there are hundreds of chess programs, but why are some programs, eg stockfish n crafty etc much more advanced than others? what acually goes into making a 3000+ rated engine???
My suggestion: Create a scheme for representing a chess position, and then write code that generates all legal moves in a given position. Do this entirely on your own, from scratch. Don't worry about efficiency or what has been done before, your only goal is correctness in all positions. If you cannot complete this task, find another plan for your life. If you can, then maybe take a look at http://www.tckerrigan.com/Chess/TSCP
User avatar
vittyvirus
Posts: 646
Joined: Wed Jun 18, 2014 2:30 pm
Full name: Fahad Syed

Re: where to start chess programming?

Post by vittyvirus »

thanks all for your extremely valuable suggestions, seriously. any new suggestions are also welcome.
User avatar
vittyvirus
Posts: 646
Joined: Wed Jun 18, 2014 2:30 pm
Full name: Fahad Syed

Re: where to start chess programming?

Post by vittyvirus »

JuLieN wrote: 6- making a strong engine is a work of patience, dedication and talent. It'll take you many years. Rome wasn't built in one year.
by what goes into a strong engine, i meant some technical stuff eg razoring or endgame knowledge. but still, thanks for the inspiration!
Jhoravi
Posts: 291
Joined: Wed May 08, 2013 6:49 am

Re: where to start chess programming?

Post by Jhoravi »

Me started making 4-in-a-row AI as foundation to Alpha-Beta. Then checkers and had fun manipulating bitboards. They're much simpler.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: where to start chess programming?

Post by zullil »

Jhoravi wrote:Me started making 4-in-a-row AI as foundation to Alpha-Beta.
I did this too.