Ejemplo n.º 1
0
	//----------------------------------------------------------------------------------
	//
	//----------------------------------------------------------------------------------
	MaterialCommand::MaterialCommand(NativeShader_Imp* shader, std::shared_ptr<MaterialPropertyBlock>& block)
		: shader(shader)
	{
		SafeAddRef(shader);

		auto b = (MaterialPropertyBlock_Imp*) block.get();

		b->AddValuesTo(shader, constantValues);
	}
void GoUctFeatureKnowledge::
SetPriorKnowledge(std::vector<SgUctMoveInfo>& moves)
{
    SG_ASSERT(UpToDate());
    ClearValues();
    switch (m_param.m_priorKnowledgeType)
    {
        case PRIOR_SIMPLE:
            SetPriorsSimple(moves);
            break;
        case PRIOR_SCALE_NU_GAMES:
            SetPriorsScaleNuGames(moves);
            break;
        case PRIOR_SCALE_PROBABILITIES_LINEAR:
            SetPriorsScaleProbabilitiesLinearly(moves);
            break;
        case PRIOR_TOP_N:
            SetPriorsTopN(moves);
            break;
        default:
            SG_ASSERT(false);
    }
    AddValuesTo(moves);
}