some exhaustive searching
kind of minimax