The weak anthropic principle and the landscape of string theory