Download data/Assets/Scripts/Learning/Agents/RewardRecorder.cs from introvoyz042/CRESSim: direct link, hf CLI and curl.
- Browser
- Download file 346 Bytes
-
https://huggingface.co/datasets/introvoyz042/CRESSim/resolve/main/data/Assets/Scripts/Learning/Agents/RewardRecorder.cs
- Command line
-
hf download hf://datasets/introvoyz042/CRESSim/data/Assets/Scripts/Learning/Agents/RewardRecorder.cs
-
curl -L -o RewardRecorder.cs https://huggingface.co/datasets/introvoyz042/CRESSim/resolve/main/data/Assets/Scripts/Learning/Agents/RewardRecorder.cs
346 Bytes
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using UnityEngine; | |
| public class RewardRecorder : EvalRecorder | |
| { | |
| public void RecordReward(string fileName, float reward) | |
| { | |
| using (StreamWriter writer = new StreamWriter(fileName, true)) | |
| { | |
| writer.WriteLine(reward); | |
| } | |
| } | |
| } | |