I have been pulling out my hair trying to figure out how the MinMax algorithm, and hopefully the alpha-beta pruning algorithms work. I'm confused as to the recursion that occurs.
- Firstly, does each intermediate board get scored? or only terminal game boards.
- Secondly, what exactly is being returned? how does the program know where to place the next move? I see that im supposed to return the board score (in tictactoe, -1,0,1) but how does the program know which move should be played next.
I have tried finding a simple C or c++ program to demonstrate this, but I have not had much luck. I am trying to learn this alogrithms I can create a presentation for the rest of my computer programming class.
Thanks a lot! V