Answers.Body: <p>Chess engines consist of two prongs of code: search and eval. Search is the algorithm that tells the engine which moves to look at, &quot;searching&quot; through the game tree to find the most promising continuation. Eval is the code that says, given this position and without making any moves, how good is this position for us?</p>
  <p>Stockfish uses <a href="https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning" rel="nofollow noreferrer">Alpha-Beta pruning</a> for search, and a handwritten evaluation function for eval. The Alpha-Beta pruning function involves lots of tricks to prune off unnecessary branches and includes a lot of human knowledge as well, e.g. &quot;if the eval says our position is bad, our best chance is a direct attack on opponent's king, so search moves that give check more thoroughly&quot;. The handwritten evaluation function encompasses human knowledge such as &quot;rooks are better on open files&quot;.</p>
  <p>AlphaZero uses <a href="https://en.wikipedia.org/wiki/Monte_Carlo_tree_search" rel="nofollow noreferrer">Monte Carlo Tree Search</a> for search, which is fundamentally different from Alpha-Beta, and a NN evaluation function. In other words every time AlphaZero searches a position, it queries its NN for an evaluation of it. Both of these are different from Stockfish's approach, and <a href="https://chess.stackexchange.com/questions/23734/why-does-nn-mcts-ab-handwritten-eval-dominate-engine-chess">not necessarily better</a>.</p>
  <p>The different playstyles come from the fact that their search &amp; eval functions are different. Presumably NNs dislike cramped positions, for example. As for bluffing, it doesn't work against engines. They just keep looking for the best moves.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-29T13:31:12.067Z
Answers.Text: so a0 can't bluff. what i really meant was that if a0 "knows" about stockfish's evaluation technique can it use it against it? for example in that famous match where a0 sac'd 4 pawns was it just the difference of search and eval functions or a0 was "responding" to the playstyle of stockfish? Can you also point towards some resource where all this is explained more clearly , using examples and all .thanx
Answers.UserDisplayName: shashank shekhar singh
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-29T13:32:46.620Z
Answers.Text: @shashankshekharsingh AlphaZero doesn't know anything about Stockfish's evaluation technique. That's why it's a "zero" engine - it doesn't know anything except the rules + whatever it learns by playing against itself. See the AlphaZero paper.
Answers.UserDisplayName: Allure
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-29T13:37:34.520Z
Answers.Text: @shashankshekharsingh: it doesn't "respond" to a "style". Like all chess engines it just tries to find the best move in a given position. It has no idea who the opponent is or what happened in the game so far, just the current position.
Answers.UserDisplayName: RemcoGerlich
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-29T15:28:23.187Z
Answers.Text: @RemcoGerlich is it absolutely certain in case of a0. do we know for certain how a0 finds the best position in terms of what it "learns"
Answers.UserDisplayName: shashank shekhar singh
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-29T21:33:13.093Z
Answers.Text: @shashankshekharsingh yes, read the paper, or Google for results such as this one: https://www.chess.com/article/view/whats-inside-alphazeros-brain
Answers.UserDisplayName: Allure
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-29T08:50:00.870Z
Answers.LastActivityDate: 2020-06-29T08:50:00.870Z
Answers.UserDisplayName: Allure
Body: <p>Obviously one is better than the other and AlphaZero uses machine learning and all, but what is the real reason for their different style of play? Given a position, both evaluate the next best move but can AlphaZero, being an AI, be mischievous and try to bluff Stockfish or something like that?</p>
  
Tags: <stockfish><alphazero><chess-ai>
Title: How is AlphaZero defferent from Stockfish?
ThreadText: # How is AlphaZero defferent from Stockfish?
  
  (Asked by: username_0 on 2020-06-29)
  
  Obviously one is better than the other and AlphaZero uses machine learning and all, but what is the real reason for their different style of play? Given a position, both evaluate the next best move but can AlphaZero, being an AI, be mischievous and try to bluff Stockfish or something like that?
  
  **Tags:** stockfish, alphazero, chess-ai
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-06-29. Score: 3
  
  Chess engines consist of two prongs of code: search and eval. Search is the algorithm that tells the engine which moves to look at, "searching" through the game tree to find the most promising continuation. Eval is the code that says, given this position and without making any moves, how good is this position for us?
  
  Stockfish uses [Alpha-Beta pruning](https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning) for search, and a handwritten evaluation function for eval. The Alpha-Beta pruning function involves lots of tricks to prune off unnecessary branches and includes a lot of human knowledge as well, e.g. "if the eval says our position is bad, our best chance is a direct attack on opponent's king, so search moves that give check more thoroughly". The handwritten evaluation function encompasses human knowledge such as "rooks are better on open files".
  
  AlphaZero uses [Monte Carlo Tree Search](https://en.wikipedia.org/wiki/Monte_Carlo_tree_search) for search, which is fundamentally different from Alpha-Beta, and a NN evaluation function. In other words every time AlphaZero searches a position, it queries its NN for an evaluation of it. Both of these are different from Stockfish's approach, and [not necessarily better](https://chess.stackexchange.com/questions/23734/why-does-nn-mcts-ab-handwritten-eval-dominate-engine-chess).
  
  The different playstyles come from the fact that their search & eval functions are different. Presumably NNs dislike cramped positions, for example. As for bluffing, it doesn't work against engines. They just keep looking for the best moves.
  
  > **Comments:**
  > **username_0**: so a0 can't bluff. what i really meant was that if a0 "knows" about stockfish's evaluation technique can it use it against it? for example in that famous match where a0 sac'd 4 pawns was it just the difference of search and eval functions or a0 was "responding" to the playstyle of stockfish? Can you also point towards some resource where all this is explained more clearly , using examples and all .thanx  
  > **username_1**: @username_0 AlphaZero doesn't know anything about Stockfish's evaluation technique. That's why it's a "zero" engine - it doesn't know anything except the rules + whatever it learns by playing against itself. See the AlphaZero paper.  
  > **username_2**: @username_0: it doesn't "respond" to a "style". Like all chess engines it just tries to find the best move in a given position. It has no idea who the opponent is or what happened in the game so far, just the current position.  
  > **username_0**: @username_2 is it absolutely certain in case of a0. do we know for certain how a0 finds the best position in terms of what it "learns"  
  > **username_1**: @username_0 yes, read the paper, or Google for results such as this one: https://www.chess.com/article/view/whats-inside-alphazeros-brain  
  
  ---
  
  