the exploration function