pass in rank function to mini-max