In their paper about DeepChess, http://www.cs.tau.ac.il/~wolf/papers/deepchess.pdf, David et al show a cool way to train a net to play chess. I've trained my net to some degree of success and I want to test how well it performs in play. The neural net can only compare 2 positions to each other - it has no static evaluation function. The paper briefly talks about Alpha-Beta search for this net. I'm trying to write the pseudo-code for this algorithm, and would appreciate any help:
function alphabeta(node, depth, α, β, maximizingPlayer) if depth = 0 or node is a terminal node return eval(node, α, β, maximizingPlayer) if maximizingPlayer v := -∞ for each child of node α := alphabeta(child, depth – 1, α, β, FALSE) if net(β, α) == β //beta is the winner break (*β cut-off *) return α else v := ∞ for each child of node β := alphabeta(child, depth – 1, α, β, TRUE) if net(β, α) == α //alpha is the winner break (* α cut-off *) return β function eval(node, depth, α, β, maximizingPlayer) if maximizingPlayer and net(node,α) == α //alpha is the winner α = node if not maximizingPlayer and net(node,β) == β //beta is the winner β = node
Am I on the right track? Is this totally wrong? I know that I haven't account for no legal moves, which means I have to return negative infinity, and I'm also not sure how to initiate the call... Any help would be appreicated!