fix depth issue and change score function to reflect minimax conventions