The instructions in your while
-loop never modify children
, but will only stop if children.empty()
is true. Therefore the loop inner is either never executed or executed infinitely.
Also here:
int score = curr.miniMax(alpha, beta, dummyBoard);
you call the function recursively with same parameters (except the third one which however is unused up to that point). Since the state of this
, alpha
and beta
seems to be unchanged up to this point (except maybe if checkDone()
or getPosition()
changes it) this will also result in an infinite recursion.
Then, I simply make *this (the current board) equal to the returned board.
No, you only make other board
s equal to *this
. I do not see *this =
anywhere in your code.