Answers.Body: <p>As described here the min-max algorithm is used in order to get the best strategy from any position in games, and therefore in chess. It uses tree ordering of the moves and each layer in the tree describes another player's move. The leaves at the bottom of the tree are the "values" gained from reaching this position with the sequence of moves from going down the tree. The algorithm assumes that the other player is playing his best possible moves also.
  This algorithm was used for example in Deep Blue, but the problems were that the branching factor of each node in the tree gets huge after couple of moves. So this is very hard to calculate.</p>
  
  <p>In the matter of your question, I don't think you could gain any knowledge about passive/agressive moves from min-max algorithm, as it only tells you the best moves (not knowing if it was passive or agressive).
  I think a better approach to determine wether a move is agressive or passive will be tagging a large amount of moves in different positions in the game (with tags being 'passive'/'agressive') and training a Neural Network to determine if a new move that it never saw is passive or agressive.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-22T03:46:35.557Z
Answers.Text: Thanks for the answer, I think the idea of just tagging a large amount of moves then running a neural network would work - however it would take a long time to do so. I looked online and haven't been able to find any data sets with already tagged data. Is there anydata sets you/others know of which has it?
Answers.UserDisplayName: Tarun R
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-22T09:32:05.627Z
Answers.Text: I don't know if there are any databases available for this goal, but when searching for one you might consider the scope of the question - wether you want a passive/agressive binary tags or a value, say between 0 and 1, indicating how passive or aggressive is that move (0 being the most passive in that case). Since Neural Networks could deal with both cases i'd say the second one will be more informative for your cause but more difficult to be tagged.
Answers.UserDisplayName: Roy Levy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-21T20:02:17.527Z
Answers.LastActivityDate: 2020-02-22T09:26:34.010Z
Answers.LastEditDate: 2020-02-22T09:26:34.010Z
Answers.UserDisplayName: Roy Levy
Answers.Body: <p>Other algorithms for solving chess problems are min-max algorithm. What it does it tries to maximize your position and to minimize opponent's moves.</p>
  
  <p>More detailed info:
  <a href="https://www.geeksforgeeks.org/minimax-algorithm-in-game-theory-set-1-introduction/" rel="nofollow noreferrer">https://www.geeksforgeeks.org/minimax-algorithm-in-game-theory-set-1-introduction/</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-21T14:18:20.150Z
Answers.Text: Thanks for the answer, can you please elaborate on what you mean by maximizing your position and minimizing opponents move, and how will I go calculate that.
Answers.UserDisplayName: Tarun R
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-21T16:41:36.920Z
Answers.Text: what does that have to do with passive vs aggressive?
Answers.UserDisplayName: edwina oliver
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-27T16:46:36.323Z
Answers.Text: @TarunR basically you need to convert chess position to a number that quantifies how good is your position. One simple implementation would be to count figures. Other more serious implementation would be to count active pieces in addition and to involve not only this position but to go in depth and analyze up to 10 moves ahead and incorporate all that chess position number to the first position number to signify good prospects of the position.
Answers.UserDisplayName: blackuprise
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-21T08:31:47.577Z
Answers.LastActivityDate: 2020-02-21T08:31:47.577Z
Answers.UserDisplayName: blackuprise
Answers.Body: <p>Rather than using the engine evaluation, I suggest you to review how the engine evaluate threats and how you could capture such data. </p>
  
  <p>For instance, a possible activity or aggresive order from more to less could be: A mate threat > loss of material > loss of space > overloading a piece > weakening the King's castle > pawns doubled > mobility reduced > piece with reduced mobility > piece  distance to own king, etc. </p>
  
  <p>An aditional element is how an engine determines which pieces or squares are insuficiently defended or attacked and how this was changed with the previous move. In a elementary book I read moves were classified as attacking moves, defending moves or developing moves. Later I learned that we must consider also in-between moves in dinamic positions.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-25T09:54:13.023Z
Answers.LastActivityDate: 2020-02-25T09:54:13.023Z
Answers.UserDisplayName: djnavas
Answers.Body: <p>The idea of an aggressive move and passive move is quite intuitive to my knowledge, but here is the general outline for whether a move is aggressive or not(These are very general and in some cases don't work):</p>
  
  <p>Aggressive: 2 square pawn move, pawn move which threatens a piece, moves which threaten common tactics(pin, fork, skewer, etc...), checkmate threats, aim to open up position, avoiding queen trade, and more..., flank pawn moves, sacrifices, and etc...</p>
  
  <p>Passive: 1 square pawn moves, Retreating moves, aim to close position, aiming at queen trades, and etc...</p>
  
  <p>Assign a value to each of these categories positive being aggressive and negative being passive. </p>
  
  <p>Example: A knight retreats and attacks the opponent's queen. A retreating move could be -10 and attacking the queen could be +15. This would give that move a value of +5. The rest is just as you said averaging for the entire game.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-21T07:26:34.727Z
Answers.LastActivityDate: 2020-02-21T07:26:34.727Z
Answers.UserDisplayName: SubhanKhan
Answers.Body: <p>By "margin error", i.e. "margin of error", HelloWorld probably means the standard deviation of the distribution of results, possibly implying that an aggressive move will converge on a result faster than a passive move. One way to classify using that idea would be to calculate the length of a game following each candidate move, sort in ascending order, and label the ones in the top half "aggressive" and the rest "passive". This way you can label all moves in a given game and decide whether a player is passive or aggro.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-21T16:39:09.273Z
Answers.LastActivityDate: 2020-02-21T17:31:55.333Z
Answers.LastEditDate: 2020-02-21T17:31:55.333Z
Answers.UserDisplayName: postoronnim
Body: <p>I'm currently trying to determine if a player on average plays more aggressive or defensive games. To do this I wanted to look at a game from that player, then average the amount of aggressive moves vs defensive moves. But the real issue is identifying if a move is aggressive or defensive. </p>
  
  <p>I am looking for a method to determine if it's aggressive or defensive using a Machine learning/AI type algorithm, rather then having a bunch of if-else statements. I've seen this other <a href="https://chess.stackexchange.com/questions/16262/how-to-determine-objectively-if-a-move-is-passive-or-aggressive">question</a> regarding this topic. In an answer to that question, user @HelloWorld recommended to use something called the "Monte-carlo tree search". I've done some basic research of the search, and I don't understand what they mean by "margin error". Can someone explain what that means and how it ties to this topic?</p>
  
  <p>Also if you have any other algorithms to determine if a move is passive or aggressive, I'd love to hear it.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-21T13:58:51.293Z
Comments.Text: some moves are both.    and what the move is depends on the position and what the other player is doing.   i doubt the information you ask about will have any practical use.
Comments.UserDisplayName: edwina oliver
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-21T14:45:27.000Z
Comments.Text: What kind of machine learning algorithm are you thinking of?  Supervised or Unsupervised?
Comments.UserDisplayName: Michael West
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-21T16:12:34.387Z
Comments.Text: @MichaelWest I'm more familiar with supervised algorithms, but I am also open to unsupervised. I just want the algorithm to be any type of ML.
Comments.UserDisplayName: Tarun R
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-21T19:33:10.327Z
Comments.Text: please define what you mean by passive aggressive moves
Comments.UserDisplayName: edwina oliver
Tags: <engines><analysis><strategy><style>
Title: Programmatic method to determine if a move is passive or aggressive
ThreadText: # Programmatic method to determine if a move is passive or aggressive
  
  (Asked by: username_0 on 2020-02-21)
  
  I'm currently trying to determine if a player on average plays more aggressive or defensive games. To do this I wanted to look at a game from that player, then average the amount of aggressive moves vs defensive moves. But the real issue is identifying if a move is aggressive or defensive.
  
  I am looking for a method to determine if it's aggressive or defensive using a Machine learning/AI type algorithm, rather then having a bunch of if-else statements. I've seen this other [question](https://chess.stackexchange.com/questions/16262/how-to-determine-objectively-if-a-move-is-passive-or-aggressive) regarding this topic. In an answer to that question, user @HelloWorld recommended to use something called the "Monte-carlo tree search". I've done some basic research of the search, and I don't understand what they mean by "margin error". Can someone explain what that means and how it ties to this topic?
  
  Also if you have any other algorithms to determine if a move is passive or aggressive, I'd love to hear it.
  
  **Tags:** engines, analysis, strategy, style
  
  > **Comments:**
  > **username_1**: some moves are both.    and what the move is depends on the position and what the other player is doing.   i doubt the information you ask about will have any practical use.  
  > **username_2**: What kind of machine learning algorithm are you thinking of?  Supervised or Unsupervised?  
  > **username_0**: @username_2 I'm more familiar with supervised algorithms, but I am also open to unsupervised. I just want the algorithm to be any type of ML.  
  > **username_1**: please define what you mean by passive aggressive moves  
  
  ---
  
  ## 5 answers
  
  ### Answer by username_3 on 2020-02-21. Score: 4
  
  As described here the min-max algorithm is used in order to get the best strategy from any position in games, and therefore in chess. It uses tree ordering of the moves and each layer in the tree describes another player's move. The leaves at the bottom of the tree are the "values" gained from reaching this position with the sequence of moves from going down the tree. The algorithm assumes that the other player is playing his best possible moves also.
  This algorithm was used for example in Deep Blue, but the problems were that the branching factor of each node in the tree gets huge after couple of moves. So this is very hard to calculate.
  
  In the matter of your question, I don't think you could gain any knowledge about passive/agressive moves from min-max algorithm, as it only tells you the best moves (not knowing if it was passive or agressive).
  I think a better approach to determine wether a move is agressive or passive will be tagging a large amount of moves in different positions in the game (with tags being 'passive'/'agressive') and training a Neural Network to determine if a new move that it never saw is passive or agressive.
  
  > **Comments:**
  > **username_0**: Thanks for the answer, I think the idea of just tagging a large amount of moves then running a neural network would work - however it would take a long time to do so. I looked online and haven't been able to find any data sets with already tagged data. Is there anydata sets you/others know of which has it?  
  > **username_3**: I don't know if there are any databases available for this goal, but when searching for one you might consider the scope of the question - wether you want a passive/agressive binary tags or a value, say between 0 and 1, indicating how passive or aggressive is that move (0 being the most passive in that case). Since Neural Networks could deal with both cases i'd say the second one will be more informative for your cause but more difficult to be tagged.  
  
  ---
  
  ### Answer by username_4 on 2020-02-21. Score: 1
  
  Other algorithms for solving chess problems are min-max algorithm. What it does it tries to maximize your position and to minimize opponent's moves.
  
  More detailed info:
  <https://www.geeksforgeeks.org/minimax-algorithm-in-game-theory-set-1-introduction/>
  
  > **Comments:**
  > **username_0**: Thanks for the answer, can you please elaborate on what you mean by maximizing your position and minimizing opponents move, and how will I go calculate that.  
  > **username_1**: what does that have to do with passive vs aggressive?  
  > **username_4**: @username_0 basically you need to convert chess position to a number that quantifies how good is your position. One simple implementation would be to count figures. Other more serious implementation would be to count active pieces in addition and to involve not only this position but to go in depth and analyze up to 10 moves ahead and incorporate all that chess position number to the first position number to signify good prospects of the position.  
  
  ---
  
  ### Answer by username_5 on 2020-02-25. Score: 1
  
  Rather than using the engine evaluation, I suggest you to review how the engine evaluate threats and how you could capture such data.
  
  For instance, a possible activity or aggresive order from more to less could be: A mate threat > loss of material > loss of space > overloading a piece > weakening the King's castle > pawns doubled > mobility reduced > piece with reduced mobility > piece distance to own king, etc.
  
  An aditional element is how an engine determines which pieces or squares are insuficiently defended or attacked and how this was changed with the previous move. In a elementary book I read moves were classified as attacking moves, defending moves or developing moves. Later I learned that we must consider also in-between moves in dinamic positions.
  
  
  ---
  
  ### Answer by username_6 on 2020-02-21. Score: 0
  
  The idea of an aggressive move and passive move is quite intuitive to my knowledge, but here is the general outline for whether a move is aggressive or not(These are very general and in some cases don't work):
  
  Aggressive: 2 square pawn move, pawn move which threatens a piece, moves which threaten common tactics(pin, fork, skewer, etc...), checkmate threats, aim to open up position, avoiding queen trade, and more..., flank pawn moves, sacrifices, and etc...
  
  Passive: 1 square pawn moves, Retreating moves, aim to close position, aiming at queen trades, and etc...
  
  Assign a value to each of these categories positive being aggressive and negative being passive.
  
  Example: A knight retreats and attacks the opponent's queen. A retreating move could be -10 and attacking the queen could be +15. This would give that move a value of +5. The rest is just as you said averaging for the entire game.
  
  
  ---
  
  ### Answer by username_7 on 2020-02-21. Score: 0
  
  By "margin error", i.e. "margin of error", HelloWorld probably means the standard deviation of the distribution of results, possibly implying that an aggressive move will converge on a result faster than a passive move. One way to classify using that idea would be to calculate the length of a game following each candidate move, sort in ascending order, and label the ones in the top half "aggressive" and the rest "passive". This way you can label all moves in a given game and decide whether a player is passive or aggro.
  
  
  ---
  
  