The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents using deep reinforcement learning and imitation learning.
As part of ML-Agents Release 1, we will be versioning the different packages that make up the release. NOTE: It is strongly recommended that you use packages from the same release together for the best experience.
Package | Version |
---|---|
com.unity.ml-agents (C#) | v1.0.0 |
ml-agents (Python) | v0.16.0 |
ml-agents-envs (Python) | v0.16.0 |
gym-unity (Python) | v0.16.0 |
Communicator (C#/Python) | v1.0.0 |
MLAgents
C# namespace was renamed to Unity.MLAgents
, and other nested namespaces were similarly renamed. (#3843)DecisionRequester
. (#3716)Agent.Heuristic()
was changed to take a float array as a parameter, instead of returning the array. This was done to prevent a common source of error where users would return arrays of the wrong size. (#3765)Agent
methods GiveModel
, Done
, InitializeAgent
, AgentAction
and AgentReset
have been removed. (#3770)SideChannelManager
to register, unregister and access side channels. (#3807)Academy.FloatProperties
was replaced by Academy.EnvironmentParameters
. See the Migration Guide for more details on upgrading. (#3807)SideChannel.OnMessageReceived
is now a protected method (was public). (#3807)Academy.Instance.StatsRecorder.Add(key, value)
. (#3660)CameraSensorComponent.m_Grayscale
and RenderTextureSensorComponent.m_Grayscale
were changed from public
to private
. These can still be accessed via their corresponding properties. (#3808)Agent.maxStep
was renamed to Agent.MaxStep
. For a full list of changes, see the pull request. (#3828)WriteAdapter
was renamed to ObservationWriter
. If you have a custom ISensor
implementation, you will need to change the signature of its Write()
method. (#3834)--load
and --train
command-line flags have been deprecated. Training now happens by default, and use --resume
to resume training instead of --load
. (#3705)mlagents-learn
for training, this should be a transparent change. (#3681)UnityEnv
class from the gym-unity
package was renamed UnityToGymWrapper
and no longer creates the UnityEnvironment
. Instead, the UnityEnvironment
must be passed as input to the constructor of UnityToGymWrapper
(#3812)StackingSensor
was changed from internal
visibility to public
. (#3701)Academy.AgentSetStatus
was renamed to Academy.AgentPreStep
and made public. (#3716)Agent.GetObservations()
was added, which returns a read-only view of the observations added in CollectObservations()
. (#3825)UnityRLCapabilities
was added to help inform users when RL features are mismatched between C# and Python packages. (#3831)file_name
parameter. If it is None
, 5004 (the editor port) will be used; otherwise 5005 (the base environment port) will be used. (#3673)mlagents-learn
with the same --run-id
twice will no longer overwrite the existing files. (#3705)num_updates
and train_interval
for SAC were replaced with steps_per_update
. (#3690)mlagents-learn
will no longer set the width and height of the executable window to 84x84 when no width nor height arguments are given. (#3867)vis_encode_type
was required only for SAC. (#3677)SetModel()
during training would use an excessive amount of memory. (#3664)Agent.CollectObservations
now takes a VectorSensor argument. (#3352, #3389)Agent.CollectDiscreteActionMasks
virtual method with a DiscreteActionMasker
argument to specify which discrete actions are unavailable to the Agent. (#3525)DiscreteActionMasker
. SetMask
takes two arguments : the branch index and the list of masked actions for that branch. (#3525)tf2onnx
python package is installed, models will be saved to .onnx
as well as .nn
format. Note that Barracuda 0.6.0 or later is required to import the .onnx
files properly. (#3101)--multi-gpu
option has been removed temporarily. (#3345)MLAgents.Sensors
. (#3519)MLAgents.SideChannels
. (#3533)Agent
class have been deprecated and will be removed in a later release (#3557):
InitializeAgent()
was renamed to Initialize()
AgentAction()
was renamed to OnActionReceived()
AgentReset()
was renamed to OnEpisodeBegin()
Done()
was renamed to EndEpisode()
GiveModel()
was renamed to SetModel()
RayPerceptionSensor.PerceiveStatic()
was changed to take an input class and write to an output class, and the method was renamed to Perceive()
. (#3527).cptk
to .ckpt
. (#3470)--port
to --mlagents-port
. (#3477)DemonstrationRecorder
can now record observations outside of the editor. (#3354)DemonstrationRecorder
now has an optional path for the demonstrations. This will default to Application.dataPath
if not set. (#3354)DemonstrationStore
was changed to accept a Stream
for its constructor, and was renamed to DemonstrationWriter
. (#3354)GetStepCount()
on the Agent class has been replaced with the property getter StepCount
. (#3476)RayPerceptionSensorComponent
and related classes now display the debug gizmos whenever the Agent is selected (not just Play mode). (#3484)RayPerceptionSensorComponent
can now be changed while the editor is in Play mode. The exceptions to this are fields that affect the number of observations. (#3484)CameraSensorComponent
and RenderTextureSensorComponent
were changed to private and replaced by properties with the same name. (#3564)Utilities
class (ShiftLeft, ReplaceRange, AddRangeNoAlloc, and GetSensorFloatObservationSize) were removed. (#3495)Agent
class is no longer abstract. (#3528)AgentInfo.actionMasks
has been renamed to AgentInfo.discreteActionMasks
. (#3539)DecisionRequester
has been made internal (you can still use the DecisionRequesterComponent from the inspector). RepeatAction
was renamed toTakeActionsBetweenDecisions
for clarity. (#3555)IFloatProperties
interface has been removed. (#3570)SideChannel
classes (on C# and python) have changed to use new IncomingMessage
and OutgoingMessage
classes. These should make reading and writing data to the channel easier. (#3596)batch_size
number of demonstrations. (#3591)OnEnable
, OnDisable
). (#3590)Product Name
in the example environments to remove spaces, so that the default build executable file doesn't contain spaces. (#3612)gail_config.yaml
to work with per-Agent steps (#3475)--num-runs
option was removed from mlagents-learn (#3155)--load
would reset Tensorboard steps (#3223)For instructions on how to migrate from 0.12.0 to 0.13.0 see the Migration Guide.
tf.compat.v1
interface (https://github.com/Unity-Technologies/ml-agents/pull/2665)For instructions on how to migrate from 0.11.0 to 0.12.0 see the Migration Guide.
For instructions on how to migrate from 0.10.x to 0.11.0 see the Migration Guide.
See the updated Getting Started and Basic Guide for more information.