I asked to make the existing core news code in PHP a little smarter. Perhaps with relevance and variety. The client is not self-confident, he just wants something smart (sort of) like a Facebook news feed. I found this (maybe outdated, but has some tips)

Where:
Sigma is the sum of each individual rib. An edge is a story that can appear in your news feed, for example, status update, comment, like, tag, etc.
u is the affinity estimate. This is a factor that weighs how close you are to the person conducting the wiring. If you often interact with a person’s post, have several friends in common, or are related to each other, Facebook is more likely to give this content more weight.
w - . Facebook. , , , , -, .
d - . , , , . Facebook , .
, , :
function calculateFeedScore (){
foreach ($edges as $edge){
$friendshipWeight = 30
if ($edgeType = comment) $edgeWeight = 1;
if ($edgeType = like) $edgeWeight = 2;
if ($edgeType = tag) $edgeWeight = 3;
.....
$edgeAgeInDay = ...;
$decay = 0.5
$edgeDecayFactor = 1 * pow($decay ,$edgeAgeInHour+1 )
$edgeScore = friendshipWeight * $edgeWeight *$edgeDecayFactor
$feedItemScore += $edgeScore;
}
return $feedItemScore
}
u, w d. ? ? , , Production, ... .