just the answer i was looking for. now i have some queries ( please dont tell me to post a new forum topic )... i have done board representation system, and i today programmed a knight move generator. my code can be better, but for now i am focusing on keeping things simple. i have done upto here on my own, completely. others code is simply damn hard to get. coming to ky queries, what does step 4 ie definition of board representation mean??. and what do u mean by perft??? i am not new to chess programming , i know a lot of theory ( i could see u translate board evaluation for me) but looking at you guyz, i feel completely dumb.... -_-elcabesa wrote:since you ask us "where to start" I'll try to say what I think could be logical way to start chessprogramming
1) board rapresentation
2) parsing a fen string and displaying the board position
3) definition of move rapresentation
4) code to do/undo a move
5) if you like you could write a code to detect if a move is valid or more easily if a position is valid ( you cannot leave the king in check)
6) move generator
7) writing /debugging perft of some position.
8) writing a very easy board evalutation { material counting}
----------- up to know you only have don propedeutic work-------
9) write an easy alphabeta searcher
10) implementing a protocol to command your engine (uci/winboard are the most used)
from there you can start your REAL chess programming adventure.
where to start chess programming?
Moderator: Ras
-
- Posts: 646
- Joined: Wed Jun 18, 2014 2:30 pm
- Full name: Fahad Syed
Re: where to start chess programming?
-
- Posts: 6401
- Joined: Thu Mar 09, 2006 8:30 pm
- Location: Chicago, Illinois, USA
Re: where to start chess programming?
https://www.google.com/?gws_rd=ssl#q=perftvittyvirus wrote:just the answer i was looking for. now i have some queries ( please dont tell me to post a new forum topic )... i have done board representation system, and i today programmed a knight move generator. my code can be better, but for now i am focusing on keeping things simple. i have done upto here on my own, completely. others code is simply damn hard to get. coming to ky queries, what does step 4 ie definition of board representation mean??. and what do u mean by perft??? i am not new to chess programming , i know a lot of theory ( i could see u translate board evaluation for me) but looking at you guyz, i feel completely dumb.... -_-elcabesa wrote:since you ask us "where to start" I'll try to say what I think could be logical way to start chessprogramming
1) board rapresentation
2) parsing a fen string and displaying the board position
3) definition of move rapresentation
4) code to do/undo a move
5) if you like you could write a code to detect if a move is valid or more easily if a position is valid ( you cannot leave the king in check)
6) move generator
7) writing /debugging perft of some position.
8) writing a very easy board evalutation { material counting}
----------- up to know you only have don propedeutic work-------
9) write an easy alphabeta searcher
10) implementing a protocol to command your engine (uci/winboard are the most used)
from there you can start your REAL chess programming adventure.
Miguel
-
- Posts: 2204
- Joined: Sat Jan 18, 2014 10:24 am
- Location: Andorra
Re: where to start chess programming?
Daniel José -
http://www.andscacs.com

-
- Posts: 855
- Joined: Sun May 23, 2010 1:32 pm
Re: where to start chess programming?
I realy can't understand your message. Someone has already pointed you to a link where perft is explained and another one to a link with board representationvittyvirus wrote:just the answer i was looking for. now i have some queries ( please dont tell me to post a new forum topic )... i have done board representation system, and i today programmed a knight move generator. my code can be better, but for now i am focusing on keeping things simple. i have done upto here on my own, completely. others code is simply damn hard to get. coming to ky queries, what does step 4 ie definition of board representation mean??. and what do u mean by perft??? i am not new to chess programming , i know a lot of theory ( i could see u translate board evaluation for me) but looking at you guyz, i feel completely dumb.... -_-elcabesa wrote:since you ask us "where to start" I'll try to say what I think could be logical way to start chessprogramming
1) board rapresentation
2) parsing a fen string and displaying the board position
3) definition of move rapresentation
4) code to do/undo a move
5) if you like you could write a code to detect if a move is valid or more easily if a position is valid ( you cannot leave the king in check)
6) move generator
7) writing /debugging perft of some position.
8) writing a very easy board evalutation { material counting}
----------- up to know you only have don propedeutic work-------
9) write an easy alphabeta searcher
10) implementing a protocol to command your engine (uci/winboard are the most used)
from there you can start your REAL chess programming adventure.

what you know what step 4 is? doing/undoing a move. when you do a move you modify the board status when you undo a move you return to the precedent status.
-
- Posts: 257
- Joined: Sat Mar 11, 2006 8:31 am
- Location: Malmö, Sweden
- Full name: Bo Persson
Re: where to start chess programming?
You are asking for a short summary of a field that has produced academic papers for decades.vittyvirus wrote:I'm sorry if i was being a fool, seriously. i know these situations where people ask u for clear answers when they dont know much about it, and i guess m being among those people as many experienced people are here. You guyz are really tough.
http://chessprogramming.wikispaces.com/Papers
This would be several bookshelves full, if on paper. How are we going to give a short, but "expanded", summary of this? It's just not possible.
You have to ask very specific questions to get more usable answers. The upside is that you CAN get answers from people who are very experienced and have worked with this for 30 years or more!
-
- Posts: 1273
- Joined: Wed Mar 08, 2006 8:28 pm
- Location: Florida, USA
Re: where to start chess programming?
Take a look at my website - it has a "over the shoulder" view of writing a decent chess engine:
http://www.chessprogramming.net
Steve
http://www.chessprogramming.net
Steve
http://www.chessprogramming.net - Juggernaut & Maverick Chess Engine
-
- Posts: 646
- Joined: Wed Jun 18, 2014 2:30 pm
- Full name: Fahad Syed
Re: where to start chess programming?
@bo persson
people with 30 years of experience are rare, i dont know anyone except dr. hyatt but he IS my hero. i wish he would see this and respond.
@ steve maughan
i took a peak at ur website a month ago. it is nice. thanks!!
@ daniel jose
i know what board representation is, i have implemented it too. on marco belli's scale, i have done first 3 steps completely.
@ marco belli i'm sorry for writing 4 instead of 3. i thought u meant something special by 'definition of move representation' that was not representing the moves.
@ miguel ballicora
thank you!
people with 30 years of experience are rare, i dont know anyone except dr. hyatt but he IS my hero. i wish he would see this and respond.
@ steve maughan
i took a peak at ur website a month ago. it is nice. thanks!!
@ daniel jose
i know what board representation is, i have implemented it too. on marco belli's scale, i have done first 3 steps completely.
@ marco belli i'm sorry for writing 4 instead of 3. i thought u meant something special by 'definition of move representation' that was not representing the moves.
@ miguel ballicora
thank you!
-
- Posts: 855
- Joined: Sun May 23, 2010 1:32 pm
Re: where to start chess programming?
you write " what does step 4 ie definition of board representation mean??." 
I mean decide how to represent a move. you have to save the move after generating it. normally you have to save from, to and special move information (promotion, en passant ,castle), or something equivalent.

I mean decide how to represent a move. you have to save the move after generating it. normally you have to save from, to and special move information (promotion, en passant ,castle), or something equivalent.
-
- Posts: 97
- Joined: Mon Jun 25, 2012 10:16 pm
- Location: Forks, WA
- Full name: Ben Nye
Re: where to start chess programming?
1. Don't worry about what language to use, just pick one that you are comfortable with. Almost any language that supports arrays and recursion will work for writing a basic chess program. C/C++ if done right can be a little faster than other languages, but if using it causes you to get confused and make a few errors that will wipe out the advantage gained.
2. time. The top programs have been worked on for a long time, their programmers know all of the widely known games AI heuristics in depth and know lots of chess specific information.
2. time. The top programs have been worked on for a long time, their programmers know all of the widely known games AI heuristics in depth and know lots of chess specific information.
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???
-
- Posts: 646
- Joined: Wed Jun 18, 2014 2:30 pm
- Full name: Fahad Syed
Re: where to start chess programming?
@marco belli
as always, thank you soo much!
@ben nye
i have choosen c , not that i have completely mastered it , but i feel more comfortable with it mainly because of its oo nature with efficiency and STL.
i am young in age, but still how much time do you think it takes to get an engine to top in the list? zappa took 3 years, houdini hardly took one year, but stockfish took 6 years (excluding that glaurung part). how much time do you think it will take my engine to get to the top in todays world full of resources etc. ?
as always, thank you soo much!
@ben nye
i have choosen c , not that i have completely mastered it , but i feel more comfortable with it mainly because of its oo nature with efficiency and STL.
i am young in age, but still how much time do you think it takes to get an engine to top in the list? zappa took 3 years, houdini hardly took one year, but stockfish took 6 years (excluding that glaurung part). how much time do you think it will take my engine to get to the top in todays world full of resources etc. ?