浏览代码

Misc doc fixes (#4483)

* Fix inheritdoc usage

* undo barracuda changes

* fix \'the the\'

* reword

* tweaks to env build instructions

* changelog

* Update docs/Learning-Environment-Executable.md

Co-authored-by: Vincent-Pierre BERGES <vincentpierre@unity3d.com>

Co-authored-by: Vincent-Pierre BERGES <vincentpierre@unity3d.com>
/release_7_branch
GitHub 4 年前
当前提交
3893adcc
共有 9 个文件被更改,包括 33 次插入58 次删除
  1. 1
      com.unity.ml-agents/CHANGELOG.md
  2. 3
      com.unity.ml-agents/Documentation~/filter.yml
  3. 10
      com.unity.ml-agents/Runtime/Actuators/ActionSegment.cs
  4. 4
      com.unity.ml-agents/Runtime/Actuators/ActuatorDiscreteActionMask.cs
  5. 54
      com.unity.ml-agents/Runtime/Actuators/ActuatorManager.cs
  6. 4
      com.unity.ml-agents/Runtime/Actuators/IActionReceiver.cs
  7. 4
      com.unity.ml-agents/Runtime/Actuators/VectorActuator.cs
  8. 4
      com.unity.ml-agents/Runtime/Agent.cs
  9. 7
      docs/Learning-Environment-Executable.md

1
com.unity.ml-agents/CHANGELOG.md


(#4434)
- You can now again specify a default configuration for your behaviors. Specify `default_settings` in
your trainer configuration to do so. (#4448)
- Improved the executable detection logic for environments on Windows. (#4485)
### Bug Fixes
#### com.unity.ml-agents (C#)

3
com.unity.ml-agents/Documentation~/filter.yml


uidRegex: ^Unity.MLAgents\.Tests\.Communicator$
type: Namespace
- exclude:
uidRegex: ^Unity.MLAgents\.Tests\.Actuators$
type: Namespace
- exclude:
uidRegex: ^Unity.MLAgents\.Editor$
type: Namespace
- exclude:

10
com.unity.ml-agents/Runtime/Actuators/ActionSegment.cs


System.Array.Clear(Array, Offset, Length);
}
/// <inheritdoc cref="IEnumerable{T}.GetEnumerator"/>
/// <inheritdoc/>
/// <inheritdoc cref="IEnumerable{T}"/>
/// <inheritdoc/>
/// <inheritdoc cref="ValueType.Equals(object)"/>
/// <inheritdoc/>
public override bool Equals(object obj)
{
if (!(obj is ActionSegment<T>))

return Equals((ActionSegment<T>)obj);
}
/// <inheritdoc cref="IEquatable{T}.Equals(T)"/>
/// <inheritdoc/>
/// <inheritdoc cref="ValueType.GetHashCode"/>
/// <inheritdoc/>
public override int GetHashCode()
{
unchecked

4
com.unity.ml-agents/Runtime/Actuators/ActuatorDiscreteActionMask.cs


m_BranchSizes = branchSizes;
}
/// <inheritdoc cref="IDiscreteActionMask.WriteMask"/>
/// <inheritdoc/>
public void WriteMask(int branch, IEnumerable<int> actionIndices)
{
LazyInitialize();

}
}
/// <inheritdoc cref="IDiscreteActionMask.GetMask"/>
/// <inheritdoc/>
public bool[] GetMask()
{
#if DEBUG

54
com.unity.ml-agents/Runtime/Actuators/ActuatorManager.cs


m_DiscreteActionMask.ResetMask();
}
/// <summary>
/// Sorts the <see cref="IActuator"/>s according to their <see cref="IActuator.Name"/> value.
/// </summary>

* IList implementation that delegates to m_Actuators List. *
*********************************************************************************/
/// <summary>
/// <inheritdoc cref="IEnumerable{T}.GetEnumerator"/>
/// </summary>
/// <inheritdoc/>
/// <summary>
/// <inheritdoc cref="IList{T}.GetEnumerator"/>
/// </summary>
/// <inheritdoc/>
/// <summary>
/// <inheritdoc cref="ICollection{T}.Add"/>
/// </summary>
/// <param name="item"></param>
/// <inheritdoc/>
public void Add(IActuator item)
{
Debug.Assert(m_ReadyForExecution == false,

}
/// <summary>
/// <inheritdoc cref="ICollection{T}.Clear"/>
/// </summary>
/// <inheritdoc/>
public void Clear()
{
Debug.Assert(m_ReadyForExecution == false,

}
/// <summary>
/// <inheritdoc cref="ICollection{T}.Contains"/>
/// </summary>
/// <inheritdoc/>
/// <summary>
/// <inheritdoc cref="ICollection{T}.CopyTo"/>
/// </summary>
/// <inheritdoc/>
/// <summary>
/// <inheritdoc cref="ICollection{T}.Remove"/>
/// </summary>
/// <inheritdoc/>
public bool Remove(IActuator item)
{
Debug.Assert(m_ReadyForExecution == false,

return false;
}
/// <summary>
/// <inheritdoc cref="ICollection{T}.Count"/>
/// </summary>
/// <inheritdoc/>
/// <summary>
/// <inheritdoc cref="ICollection{T}.IsReadOnly"/>
/// </summary>
/// <inheritdoc/>
/// <summary>
/// <inheritdoc cref="IList{T}.IndexOf"/>
/// </summary>
/// <inheritdoc/>
/// <summary>
/// <inheritdoc cref="IList{T}.Insert"/>
/// </summary>
/// <inheritdoc/>
public void Insert(int index, IActuator item)
{
Debug.Assert(m_ReadyForExecution == false,

}
/// <summary>
/// <inheritdoc cref="IList{T}.RemoveAt"/>
/// </summary>
/// <inheritdoc/>
public void RemoveAt(int index)
{
Debug.Assert(m_ReadyForExecution == false,

m_Actuators.RemoveAt(index);
}
/// <summary>
/// <inheritdoc cref="IList{T}.this"/>
/// </summary>
/// <inheritdoc/>
public IActuator this[int index]
{
get => m_Actuators[index];

4
com.unity.ml-agents/Runtime/Actuators/IActionReceiver.cs


DiscreteActions.Clear();
}
/// <inheritdoc cref="ValueType.Equals(object)"/>
/// <inheritdoc/>
public override bool Equals(object obj)
{
if (!(obj is ActionBuffers))

ab.DiscreteActions.SequenceEqual(DiscreteActions);
}
/// <inheritdoc cref="ValueType.GetHashCode"/>
/// <inheritdoc/>
public override int GetHashCode()
{
unchecked

4
com.unity.ml-agents/Runtime/Actuators/VectorActuator.cs


m_ActionReceiver.WriteDiscreteActionMask(actionMask);
}
/// <summary>
/// <inheritdoc cref="IActionReceiver.ActionSpec"/>
/// </summary>
/// <inheritdoc/>
public ActionSpec ActionSpec { get; }
/// <inheritdoc />

4
com.unity.ml-agents/Runtime/Agent.cs


/// <summary>
/// Returns a read-only view of the observations that were generated in
/// <see cref="CollectObservations(VectorSensor)"/>. This is mainly useful inside of a
/// <see cref="Heuristic(float[], int[])"/> method to avoid recomputing the observations.
/// <see cref="Heuristic(in ActionBuffers)"/> method to avoid recomputing the observations.
/// </summary>
/// <returns>A read-only view of the observations list.</returns>
public ReadOnlyCollection<float> GetObservations()

/// three values in the action array to use as the force components. During
/// training, the agent's policy learns to set those particular elements of
/// the array to maximize the training rewards the agent receives. (Of course,
/// if you implement a <seealso cref="Heuristic(float[], int[])"/> function, it must use the same
/// if you implement a <seealso cref="Heuristic(in ActionBuffers)"/> function, it must use the same
/// elements of the action array for the same purpose since there is no learning
/// involved.)
///

7
docs/Learning-Environment-Executable.md


- You can exchange executable with other people without having to share your
entire repository.
- You can put your executable on a remote machine for faster training.
- You can use `Headless` mode for faster training.
- You can use `Server Build` (`Headless`) mode for faster training (as long as the executable does not need rendering).
- You can keep using the Unity Editor for other tasks while the agents are
training.

1. Open Player Settings (menu: **Edit** > **Project Settings** > **Player**).
1. Under **Resolution and Presentation**:
- Ensure that **Run in Background** is Checked.
- Ensure that **Display Resolution Dialog** is set to Disabled.
- Ensure that **Display Resolution Dialog** is set to Disabled. (Note: this
setting may not be available in newer versions of the editor.)
1. Open the Build Settings window (menu:**File** > **Build Settings**).
1. Choose your target platform.
- (optional) Select “Development Build” to

- `<run-identifier>` is a string used to separate the results of different
training runs
For example, if you are training with a 3DBall executable you exported to the
For example, if you are training with a 3DBall executable, and you saved it to
the directory where you installed the ML-Agents Toolkit, run:
```sh

正在加载...
取消
保存