mirror of
https://github.com/furyfire/trueskill.git
synced 2025-03-20 16:48:04 +00:00
Tenative pass at getting prior layer working. Found out about division by zero and closure differences.
This commit is contained in:
@ -35,11 +35,12 @@ class PlayerPriorValuesToSkillsLayer extends TrueSkillFactorGraphLayer
|
||||
{
|
||||
$currentTeamPlayerRating = $currentTeam->getRating($currentTeamPlayer);
|
||||
$playerSkill = $this->createSkillOutputVariable($currentTeamPlayer);
|
||||
$this->addLayerFactor($this->createPriorFactor($currentTeamPlayer, $currentTeamPlayerRating, $playerSkill));
|
||||
$priorFactor = $this->createPriorFactor($currentTeamPlayer, $currentTeamPlayerRating, $playerSkill);
|
||||
$this->addLayerFactor($priorFactor);
|
||||
$currentTeamSkills[] = $playerSkill;
|
||||
}
|
||||
|
||||
$outputVariablesGroups = $this->getOutputVariablesGroups();
|
||||
$outputVariablesGroups = &$this->getOutputVariablesGroups();
|
||||
$outputVariablesGroups[] = $currentTeamSkills;
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ class PlayerSkillsToPerformancesLayer extends TrueSkillFactorGraphLayer
|
||||
array_map(
|
||||
function($likelihood)
|
||||
{
|
||||
return $this->scheduleStep("Skill to Perf step", $likelihood, 0);
|
||||
return new ScheduleStep("Skill to Perf step", $likelihood, 0);
|
||||
},
|
||||
$this->getLocalFactors()),
|
||||
"All skill to performance sending");
|
||||
|
Reference in New Issue
Block a user