Download Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3ExampleActuatorComponent.cs from ashish2244/ppo-SnowballTarget: direct link, hf CLI and curl.
- Browser
- Download file 752 Bytes
-
https://huggingface.co/ashish2244/ppo-SnowballTarget/resolve/main/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3ExampleActuatorComponent.cs
- Command line
-
hf download hf://ashish2244/ppo-SnowballTarget/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3ExampleActuatorComponent.cs
-
curl -L -o Match3ExampleActuatorComponent.cs https://huggingface.co/ashish2244/ppo-SnowballTarget/resolve/main/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3ExampleActuatorComponent.cs
752 Bytes
| using Unity.MLAgents; | |
| using Unity.MLAgents.Actuators; | |
| using Unity.MLAgents.Integrations.Match3; | |
| namespace Unity.MLAgentsExamples | |
| { | |
| public class Match3ExampleActuatorComponent : Match3ActuatorComponent | |
| { | |
| /// <inheritdoc/> | |
| public override IActuator[] CreateActuators() | |
| { | |
| var board = GetComponent<Match3Board>(); | |
| var seed = RandomSeed == -1 ? CreateNewSeed() : RandomSeed + 1; | |
| return new IActuator[] { new Match3ExampleActuator(board, ForceHeuristic, ActuatorName, seed) }; | |
| } | |
| int CreateNewSeed() | |
| { | |
| return gameObject.GetEntityId().GetHashCode(); | |
| return gameObject.GetInstanceID(); | |
| } | |
| } | |
| } | |