浏览代码

clarify BoardSize.NumCellTypes and BoardSize.NumSpecialTypes

/2.0-verified
Chris Goy 3 年前
当前提交
ca8f66e2
共有 3 个文件被更改,包括 5 次插入5 次删除
  1. 4
      com.unity.ml-agents/Runtime/Integrations/Match3/AbstractBoard.cs
  2. 2
      com.unity.ml-agents/Runtime/Integrations/Match3/Match3SensorComponent.cs
  3. 4
      docs/Integrations-Match3.md

4
com.unity.ml-agents/Runtime/Integrations/Match3/AbstractBoard.cs


/// <summary>
/// Returns the "color" of the piece at the given row and column.
/// This should be between 0 and NumCellTypes-1 (inclusive).
/// This should be between 0 and BoardSize.NumCellTypes-1 (inclusive).
/// The actual order of the values doesn't matter.
/// </summary>
/// <param name="row"></param>

/// <summary>
/// Returns the special type of the piece at the given row and column.
/// This should be between 0 and NumSpecialTypes (inclusive).
/// This should be between 0 and BoardSize.NumSpecialTypes (inclusive).
/// The actual order of the values doesn't matter.
/// </summary>
/// <param name="row"></param>

2
com.unity.ml-agents/Runtime/Integrations/Match3/Match3SensorComponent.cs


return Array.Empty<ISensor>();
}
var cellSensor = Match3Sensor.CellTypeSensor(board, m_ObservationType, m_SensorName + " (cells)");
// This can be null if numSpecialTypes is 0
// This can be null if BoardSize.NumSpecialTypes is 0
var specialSensor = Match3Sensor.SpecialTypeSensor(board, m_ObservationType, m_SensorName + " (special)");
m_Sensors = specialSensor != null
? new ISensor[] { cellSensor, specialSensor }

4
docs/Integrations-Match3.md


##### `public abstract int GetCellType(int row, int col)`
Returns the "color" of piece at the given row and column.
This should be between 0 and NumCellTypes-1 (inclusive).
This should be between 0 and BoardSize.NumCellTypes-1 (inclusive).
This should be between 0 and NumSpecialTypes (inclusive).
This should be between 0 and BoardSize.NumSpecialTypes (inclusive).
The actual order of the values doesn't matter.
##### `public abstract bool IsMoveValid(Move m)`

正在加载...
取消
保存