working min/max algorithm and explanation of "why?" the AI chose the move it did