您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
18 行
606 B
18 行
606 B
using Unity.MLAgents;
|
|
using Unity.MLAgents.Actuators;
|
|
using Unity.MLAgents.Extensions.Match3;
|
|
|
|
namespace Unity.MLAgentsExamples
|
|
{
|
|
public class Match3ExampleActuatorComponent : Match3ActuatorComponent
|
|
{
|
|
/// <inheritdoc/>
|
|
public override IActuator CreateActuator()
|
|
{
|
|
var board = GetComponent<Match3Board>();
|
|
var agent = GetComponentInParent<Agent>();
|
|
var seed = RandomSeed == -1 ? gameObject.GetInstanceID() : RandomSeed + 1;
|
|
return new Match3ExampleActuator(board, ForceHeuristic, agent, ActuatorName, seed);
|
|
}
|
|
}
|
|
}
|