-
Notifications
You must be signed in to change notification settings - Fork 4.3k
[MLA-1824] make SensorComponent return ISensor[] #5181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
$"Current shape: Rows={m_Board.Rows} Columns={m_Board.Columns}, NumCellTypes={m_Board.NumCellTypes}" | ||
); | ||
} | ||
// if (m_Board.Rows != m_Rows || m_Board.Columns != m_Columns || m_Board.NumCellTypes != m_NumCellTypes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disabled for now, might return later (depending on how I handle multiple board sizes)
for (var i = 0; i < m_NumCellTypes; i++) | ||
var val = m_GridValues(r, c); | ||
|
||
for (var i = 0; i < m_OneHotSize; i++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this loop exist to 0 out the rest of one-hots? Could it be simplified to something like:
writer[offset + val] = 1.0f;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, as long as we know the memory is initialized to zero, we could do that (plus an extra check that val < m_OneHotSize
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Proposed change(s)
Note that Match3 models were only retrained partially, since I expect them to change again soon.
Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)
https://jira.unity3d.com/browse/MLA-1824
Types of change(s)
Checklist
Other comments