[MLA-1824] make SensorComponent return ISensor[]#5181
Merged
Conversation
chriselion
commented
Mar 23, 2021
| $"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) |
Contributor
Author
There was a problem hiding this comment.
Disabled for now, might return later (depending on how I handle multiple board sizes)
surfnerd
reviewed
Mar 23, 2021
| for (var i = 0; i < m_NumCellTypes; i++) | ||
| var val = m_GridValues(r, c); | ||
|
|
||
| for (var i = 0; i < m_OneHotSize; i++) |
Contributor
There was a problem hiding this comment.
does this loop exist to 0 out the rest of one-hots? Could it be simplified to something like:
writer[offset + val] = 1.0f;
Contributor
Author
There was a problem hiding this comment.
Yeah, as long as we know the memory is initialized to zero, we could do that (plus an extra check that val < m_OneHotSize)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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