swap between algorithms based on size of board