Minimax and alpha beta I want to implement a simple chess bot so I have been reading about this algorithm a lot. I can say I understand the basic idea of the algorithm but I can't clearly see how am I supposed to apply it on the board.
Let's say it's white turn, do i have to apply minimax on every possible move of all the white pieces ? And let's suppose the depth is greater than 1. Let's suppose I'm going to apply the algorithm on a pawn. As far as i understand I need to generate all the possible legal moves of my pawn, and for each move I'm going to apply (recursively) minimax again for the black side, at this point do I need to apply it on every single legal move of the black side? Is my understanding correct? If not would you please explain how is it supposed to work with an example?
Short answer:  Yes with minimax you have to search every move.

Minimax is not used due to the exponentially growing search which quickly becomes too big to be useful.  Think O(n2) sort functions. 
Many concepts are used to help reduce the number of nodes the search function.  Transposition Tables, fail-safe, branch pruning...

https://web.archive.org/web/20071026090003/http://www.brucemo.com/compchess/programming/index.htm is the Gerbil chess engine with good explanations. 

https://chessprogramming.wikispaces.com/Home is more general and discusses other algorithms, but is more technical and is closing soon.