Answers.Body: <p>Although it is written in C, you might want to take a look at <a href="http://www.tckerrigan.com/chess/tscp" rel="nofollow">Tom Kerrigan's Simple Chess Program (TSCP)</a> which is created for this very purpose—to allow beginners to see what a simple chess engine is made of.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-12T22:59:25.640Z
Answers.LastActivityDate: 2014-12-12T22:59:25.640Z
Answers.UserDisplayName: JiK
Answers.Body: <p>There is 
  <a href="http://sharpchess.com/" rel="nofollow">http://sharpchess.com/</a></p>
  
  <p>And 
  <a href="http://www.codeproject.com/Articles/36112/Chess-Program-in-C" rel="nofollow">http://www.codeproject.com/Articles/36112/Chess-Program-in-C</a></p>
  
  <p>But since chess engines are very cpu intensive and carefully tweaked for performance, if you want to do anything serious, you'd rather move to C/C++ as your implementation language.</p>
  
  <p>And dont forget the wiki for chess programming: <a href="https://chessprogramming.wikispaces.com" rel="nofollow">https://chessprogramming.wikispaces.com</a>
  with many documented advanced techniques in the field.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-12T23:39:07.027Z
Answers.LastActivityDate: 2014-12-12T23:39:07.027Z
Answers.UserDisplayName: Fernando Gonzalez Sanchez
Body: <p>I am a novice in C#.<br>
  I am looking for the code(s) of one or more chess program(s) written in C#.<br>
  Preferably, the code(s) should be short, clean, straightforward, very simple, and use only basic things (try to avoid complicated system namespace / library). It does not matter if the program is not very strong.<br>
  If you could also provide some explanations of the different parts of the code it would be even better.  </p>
  
  <p>The part of the code which interests me the most is the part which stores all the many millions positions at different depths.<br>
  Can this be done in a multidimensional array?<br>
  I was thinking that maybe the first two dimensions of the array could represent the two-dimensional boards, the 3rd dimension of the array could represent all the possible positions at a depth of 1 ply, the 4th dimension of the array could represent all the positions at a depth of 2 plies, the 5th dimension of the array could represent all the positions at a depth of 3 plies, etc... But perhaps that would be a little too messy.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-12-12T22:30:02.050Z
Comments.Text: _"The part of the code which interests me the most is the part which stores all the many millions positions at different depths."_ There's no need to store all searched positions in a chess engine. The transposition table is used to store positions with the evaluation and the best move found in that position and the info on how deep that position was searched and perhaps some additional data. But not every position is stored in that, because there isn't enough memory.
Comments.UserDisplayName: JiK
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-12-13T16:52:09.637Z
Comments.Text: Chess programming never use anything like a multidimensional array.
Comments.UserDisplayName: SmallChess
Tags: <engines><programming>
Title: Could you show me the code(s) of one or more simple chess program(s) written in C#?
ThreadText: # Could you show me the code(s) of one or more simple chess program(s) written in C#?
  
  (Asked by: username_0 on 2014-12-12)
  
  I am a novice in C#.  
  I am looking for the code(s) of one or more chess program(s) written in C#.  
  Preferably, the code(s) should be short, clean, straightforward, very simple, and use only basic things (try to avoid complicated system namespace / library). It does not matter if the program is not very strong.  
  If you could also provide some explanations of the different parts of the code it would be even better.
  
  The part of the code which interests me the most is the part which stores all the many millions positions at different depths.  
  Can this be done in a multidimensional array?  
  I was thinking that maybe the first two dimensions of the array could represent the two-dimensional boards, the 3rd dimension of the array could represent all the possible positions at a depth of 1 ply, the 4th dimension of the array could represent all the positions at a depth of 2 plies, the 5th dimension of the array could represent all the positions at a depth of 3 plies, etc... But perhaps that would be a little too messy.
  
  **Tags:** engines, programming
  
  > **Comments:**
  > **username_1**: _"The part of the code which interests me the most is the part which stores all the many millions positions at different depths."_ There's no need to store all searched positions in a chess engine. The transposition table is used to store positions with the evaluation and the best move found in that position and the info on how deep that position was searched and perhaps some additional data. But not every position is stored in that, because there isn't enough memory.  
  > **username_2**: Chess programming never use anything like a multidimensional array.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2014-12-12. Score: 3
  
  Although it is written in C, you might want to take a look at [Tom Kerrigan's Simple Chess Program (TSCP)](http://www.tckerrigan.com/chess/tscp) which is created for this very purpose—to allow beginners to see what a simple chess engine is made of.
  
  
  ---
  
  ### Answer by username_3 on 2014-12-12. Score: 3
  
  There is
  <http://sharpchess.com/>
  
  And
  <http://www.codeproject.com/Articles/36112/Chess-Program-in-C>
  
  But since chess engines are very cpu intensive and carefully tweaked for performance, if you want to do anything serious, you'd rather move to C/C++ as your implementation language.
  
  And dont forget the wiki for chess programming: <https://chessprogramming.wikispaces.com>
  with many documented advanced techniques in the field.
  
  
  ---
  
  