Body: <p>One method I thought of for storing chess positions is a stack. This is because when you go one move deeper in the search, you add that position onto the stack, and delete the node when finish, this way it is easy to take back a move. My engine stores positions as a constant class, so taking back moves would be difficult. Would storing in a stack make sense?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-07-27T01:26:20.803Z
Comments.Text: A stack is a natural way of doing say minimax algorithm interative deepening search of a search tree.
Comments.UserDisplayName: qwr
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-07-27T01:27:27.300Z
Comments.Text: You are familiar with chessprogrammingwiki right? they probably have that answer there
Comments.UserDisplayName: qwr
Tags: <engines><computer-chess>
Title: Stack data structure to store chess positions?
ThreadText: # Stack data structure to store chess positions?
  
  (Asked by: username_0 on 2022-07-26)
  
  One method I thought of for storing chess positions is a stack. This is because when you go one move deeper in the search, you add that position onto the stack, and delete the node when finish, this way it is easy to take back a move. My engine stores positions as a constant class, so taking back moves would be difficult. Would storing in a stack make sense?
  
  **Tags:** engines, computer-chess
  
  > **Comments:**
  > **username_1**: A stack is a natural way of doing say minimax algorithm interative deepening search of a search tree.  
  > **username_1**: You are familiar with chessprogrammingwiki right? they probably have that answer there  
  
  ---
  
  ## 0 answers
  
  