SMS: The Master Algorithm