0

I'm writing a minimax alpha beta algorithm in Java. What I did initially was create a minimax algorithm. This algorithm ALWAYS beat algorithm B, which I had also coded. Now I added Alpha beta pruning to this minimax algorithm and my algorithm always loses to algorithm B.

Is it possible that Alpha beta pruning made my algorithm worse? Or did I code it incorrectly?

And just for my curiosity; in a perfect world where I had implemented Alpha Beta correctly would I at least see my algorithm beat algorithm B 100% of the time if the minimax algorithm did?

Thank You.

TheRapture87
  • 1,403
  • 3
  • 21
  • 31
  • You probably have some errors, because alpha-beta does not change the hueristic function of the algorithm, it "just" speeds it up. If both of the algorithms are determinsitic, one of them will ALWAYS beat the other. 100% of the times. – TDG Mar 03 '16 at 19:46

1 Answers1

1

You coded it incorrectly.

There is (should be) no difference in outcome whether or not alpha-beta pruning is applied. It is merely a performance optimization where you avoid looking at options that are found quickly to be worse than other options already considered.