Answers.Body: <p>When the number of levels is odd, it means the first player can do one more extra movement on the board. As it is an extensive form game, when decide using backward induction, as the last and the first move are for the first player, so the first player can act better than the situation that the second player will make the last move.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-29T18:56:11.730Z
Answers.Text: But if the AI evaluates up to level x + 1 (suppose x is odd), it means that it has evaluated all moves up to x and it is now evaluating the second player's next move. How can this degrade performance? At the most it should play about the same
Answers.UserDisplayName: Tom Dwan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-29T19:39:36.030Z
Answers.Text: @TomDwan Suppose you're playing chess. If you search to depth 1, you only consider your own moves, and don't consider possible responses by the opponent. This will probably often lead to very aggressive play (you can capture pieces and don't search deep enough to see your opponent replying). Increasing to depth 2 would often switch this around completely and lead to much more defensive play, since you no longer consider your own replies to your opponent's reply to your first move. Etc. In some games even may tend to be better, and in some games odd may tend to be better.
Answers.UserDisplayName: Dennis Soemers
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-29T19:52:03.717Z
Answers.Text: @DennisSoemers Ok, thanks for the clarification :)
Answers.UserDisplayName: Tom Dwan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-29T17:37:16.257Z
Answers.LastActivityDate: 2020-04-29T17:37:16.257Z
Answers.UserDisplayName: OmG
Body: <p>We are building an AI to play a board game. Leaving aside the implementation, we noticed that it plays worse when we set an even (2,4,6,...) level of depth. We use a minimax depth-first strategy.
  Do you have any ideas why it behaves like that?</p>
  
  <p>Edit: for example if we set a game between an AI with 5 levels of depth and an AI with 6 levels of depth, the first one usually wins (and this is weird).</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-29T18:47:34.733Z
Comments.Text: Have you tried checking for quiescense and going one layer deeper in that case?
Comments.UserDisplayName: Thomas Wagenaar
Tags: <game-theory><depth-first-search>
Title: Why does our AI play worse at even levels of depth?
UserDisplayName: Tom Dwan
ThreadText: # Why does our AI play worse at even levels of depth?
  
  (Asked by: username_0 on 2020-04-29)
  
  We are building an AI to play a board game. Leaving aside the implementation, we noticed that it plays worse when we set an even (2,4,6,...) level of depth. We use a minimax depth-first strategy.
  Do you have any ideas why it behaves like that?
  
  Edit: for example if we set a game between an AI with 5 levels of depth and an AI with 6 levels of depth, the first one usually wins (and this is weird).
  
  **Tags:** game-theory, depth-first-search
  > **Comments:**
  > **username_1**: Have you tried checking for quiescense and going one layer deeper in that case?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-04-29. Score: 1 | Accepted answer
  
  When the number of levels is odd, it means the first player can do one more extra movement on the board. As it is an extensive form game, when decide using backward induction, as the last and the first move are for the first player, so the first player can act better than the situation that the second player will make the last move.
  
  > **Comments:**
  > **username_0**: But if the AI evaluates up to level x + 1 (suppose x is odd), it means that it has evaluated all moves up to x and it is now evaluating the second player's next move. How can this degrade performance? At the most it should play about the same  
  > **username_3**: @TomDwan Suppose you're playing chess. If you search to depth 1, you only consider your own moves, and don't consider possible responses by the opponent. This will probably often lead to very aggressive play (you can capture pieces and don't search deep enough to see your opponent replying). Increasing to depth 2 would often switch this around completely and lead to much more defensive play, since you no longer consider your own replies to your opponent's reply to your first move. Etc. In some games even may tend to be better, and in some games odd may tend to be better.  
  > **username_0**: @DennisSoemers Ok, thanks for the clarification :)  
  
  ---
  
  