Answers.Body: <p>The chess programming wiki is correct:</p>
  
  <blockquote>
    <p><a href="https://chessprogramming.wikispaces.com/Perft+Results" rel="nofollow noreferrer">https://chessprogramming.wikispaces.com/Perft+Results</a></p>
  </blockquote>
  
  <p>197281 is the number. I remember I used Stockfish to generate the same number while debugging my code.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-11T01:11:32.563Z
Answers.LastActivityDate: 2017-08-11T01:11:32.563Z
Answers.UserDisplayName: SmallChess
Body: <p>I've started to code my own little engine recently and am now working on a perft function which simply sees how many moves there are.
  Trying to get correct results I searched online for the correct amount of possible positions after e.g. 4 moves.
  Now according to these sources: </p>
  
  <p><a href="https://youtu.be/6Y_FaQhqX2c?t=5m46s" rel="nofollow noreferrer">https://youtu.be/6Y_FaQhqX2c?t=5m46s</a></p>
  
  <p>It should be 197281 possible positions after 4 moves, and I can reach that in my code!</p>
  
  <p>But switching a bit around in my code to get some optimization which seemingly shouldn't change anything, I get a different number: 197742
  Now I would think that is wrong but I have found different sources again, claiming that is in fact correct:</p>
  
  <p><a href="https://youtu.be/Km024eldY1A?t=5m33s" rel="nofollow noreferrer">https://youtu.be/Km024eldY1A?t=5m33s</a></p>
  
  <p>So, which one is it? 197742 or 197281 possible positions after 4 moves?
  I was a bit uncertain whether this belongs here or on StackOverflow.
  I went with this one, I hope that's alright.</p>
  
  <p>EDIT: apparently I can't post more than two links due to my low reputation
  I'll post the links in comments</p>
  
  <p>Thanks in advance
  Folling</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-11T01:06:43.983Z
Comments.Text: 197742: https://www.chess.com/chessopedia/view/mathematics-and-chess
  
  197281: https://www.chess.com/forum/view/general/chess-combinatorics-number-of-legal-positions-after-gt2-turns + 
  https://chessprogramming.wikispaces.com/Perft+Results
Comments.UserDisplayName: Folling
Tags: <engines><theory><programming>
Title: Possible chess positon after X ply?
ThreadText: # Possible chess positon after X ply?
  
  (Asked by: username_0 on 2017-08-11)
  
  I've started to code my own little engine recently and am now working on a perft function which simply sees how many moves there are.
  Trying to get correct results I searched online for the correct amount of possible positions after e.g. 4 moves.
  Now according to these sources:
  
  <https://youtu.be/6Y_FaQhqX2c?t=5m46s>
  
  It should be 197281 possible positions after 4 moves, and I can reach that in my code!
  
  But switching a bit around in my code to get some optimization which seemingly shouldn't change anything, I get a different number: 197742
  Now I would think that is wrong but I have found different sources again, claiming that is in fact correct:
  
  <https://youtu.be/Km024eldY1A?t=5m33s>
  
  So, which one is it? 197742 or 197281 possible positions after 4 moves?
  I was a bit uncertain whether this belongs here or on StackOverflow.
  I went with this one, I hope that's alright.
  
  EDIT: apparently I can't post more than two links due to my low reputation
  I'll post the links in comments
  
  Thanks in advance
  username_0
  
  **Tags:** engines, theory, programming
  
  > **Comments:**
  > **username_0**: 197742: https://www.chess.com/chessopedia/view/mathematics-and-chess  197281: https://www.chess.com/forum/view/general/chess-combinatorics-number-of-legal-positions-after-gt2-turns +  https://chessprogramming.wikispaces.com/Perft+Results  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-08-11. Score: 2 | Accepted answer
  
  The chess programming wiki is correct:
  
  > <https://chessprogramming.wikispaces.com/Perft+Results>
  
  197281 is the number. I remember I used Stockfish to generate the same number while debugging my code.
  
  
  ---
  
  