implementation of drecon in unity 2022 lts forked from: https://github.com/joanllobera/marathon-envs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.5 KiB

7 months ago
using System.Collections.Generic;
using System.Linq;
using Unity.MLAgents;
using UnityEngine;
public class MarathonTestBedDecision //: Decision
{
// Brain _brain;
// MarathonTestBedController _controller;
// // [Tooltip("Lock the top most element")]
// // /**< \brief Lock the top most element*/
// // public bool FreezeTop = false;
// // bool _lastFreezeTop;
// public override float[] Decide(
// List<float> vectorObs,
// List<Texture2D> visualObs,
// float reward,
// bool done,
// List<float> memory)
// {
// // lazy init
// if (_controller == null)
// {
// _controller = FindObjectOfType<MarathonTestBedController>();
// // _brain = GetComponent<Brain>();
// // Actions = Enumerable.Repeat(0f, _brain.brainParameters.vectorActionSize[0]).ToArray();
// // Actions = Enumerable.Repeat(0f, 100).ToArray();
// }
// if (_controller.ApplyRandomActions)
// {
// for (int i = 0; i < _controller.Actions.Length; i++)
// _controller.Actions[i] = Random.value * 2 - 1;
// }
// return _controller.Actions;
// }
// public override List<float> MakeMemory(
// List<float> vectorObs,
// List<Texture2D> visualObs,
// float reward,
// bool done,
// List<float> memory)
// {
// return new List<float>();
// }
}