3 ms·
I can only come up with a recursive algorithm which depends on a PerfectPlay(state, player) like so: WinnerWithPerfectPlay(state,currentPlayer): if W
by d4rti 8y ago
I can only come up with a recursive algorithm which depends on a PerfectPlay(state, player) like so:
WinnerWithPerfectPlay(state,currentPlayer):
if Winner(state)
return Winner(state)
else
nextPlayer <- "white" if currentPlayer = "black" else "black"
return WinnerWithPerfectPlay(PerfectPlay(state, player), nextPlayer)
Which doesn't allow for stalemate moves.