랜덤 임관시 제곱근에서 선형으로 변경
This commit is contained in:
@@ -137,12 +137,10 @@ class che_랜덤임관 extends Command\GeneralCommand{
|
|||||||
$notIn
|
$notIn
|
||||||
);
|
);
|
||||||
|
|
||||||
$allGen = Util::arraySum($nations, 'gennum');
|
|
||||||
|
|
||||||
$randVals = [];
|
$randVals = [];
|
||||||
foreach($nations as $testNation){
|
foreach($nations as $testNation){
|
||||||
$nationID = $nations['nation'];
|
$nationID = $nations['nation'];
|
||||||
$randVals[] = [$testNation, sqrt($allGen/$testNation['gennum'])];
|
$randVals[] = [$testNation, 1/$testNation['gennum']];
|
||||||
}
|
}
|
||||||
|
|
||||||
$destNation = Util::choiceRandomUsingWeightPair($randVals);
|
$destNation = Util::choiceRandomUsingWeightPair($randVals);
|
||||||
|
|||||||
Reference in New Issue
Block a user