Process of Minimax algorithm:
Our aim is just to write the best of best score on the top branches of the tree that player one can guarantee to score if he chooses that move. For this , we have to reached at starting at the bottom, we will write the final scores on unsccessively higher branches on the search tree until we reach the top. Moreover there is a choice of scores to write on a particular branch, we will imagine that player two will choose the card that minimises player one's final score or player one will choose the card which maximises his and her score. Our aim is to move on the proper scores all the way up the graph to the top, that all will enable player one to choose the card that can be leads to the most best guaranteed score for the overall game. If we try to write firstly the scores on the edges of the tree in the bottom two branches: Now we want to move on the proper scores up to the next level of branches in the tree. Whenever, there is a choice. For example, mostly for the first branch on the second row, if we could write 10 either -12 or 8. Whenever this is our best guess about rationality comes into account. If we try write 10 there, this means that, supposing that player two has in reality chosen the 5, other of them player one can choose either 8 or 7. Choosing 7 would product in a score of 10 for player 1, choosing 8 would result in a score of -12. Clearly, player 1 would choose the 7, for that the score we write on this branch is 10.