Social media platform X will open its new algorithm to the public in seven days, Elon Musk said on Saturday, including the code used to decide what posts and advertisements are recommended to users.