ml-agents icon indicating copy to clipboard operation
ml-agents copied to clipboard

Make (most) internals internal protected

Open BenedictWilkins opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe.

I am trying to create my own IPolicy and extend BehaviourParameters. There are a number of places where it would be nice to extend some functionality, for example, adding actuators without having to deal with Unity's component system - this requires access to the ActuatorManager, or atleast Agent.InitializeActuators. Why are these not accessible? Is there really any reason why someone should not be able to change them (at their own risk of course)?

Describe the solution you'd like

Remove (private) internal from basically everything, at least replace with protected internal, expose more classes and methods, make methods virtual. I understand that keeping things internal is good practice, and overriding some methods can seriously break things, but there is a good case to be made here given this is an experimental platform.

Describe alternatives you've considered

If this is not wanted in an official release (why not...), make a development version that lets people go wild :) The other option is to create a more flexible API in some other way, but the easiest option is just to do what is being requested here.

BenedictWilkins avatar May 05 '22 09:05 BenedictWilkins

Hi Benedict, Thanks for the suggestion. We’ve documented your feedback and will come back to you once we determine how best to support your request.

AKemendo avatar May 05 '22 16:05 AKemendo

I second this very strongly, sometimes I had to do very weird workaround just to get some simple debug information, e.g. the total reward that the agent has obtained in this step (I ended up having to use reflection, because the relevant attribute is private)

RedTachyon avatar May 07 '22 22:05 RedTachyon

Thank you @RedTachyon we'll add your input to the ticket as a +1 to the feature request.

AKemendo avatar May 09 '22 15:05 AKemendo