user21575: 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 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.

user19970: 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/

user1766: 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.

user20620: 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.

21575: <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>
 19970: <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>
 1766: <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>
 20620: <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>
