refactored minimax out of cpu and moved relevant tests