Closed benaslater closed 3 weeks ago
So, lets analyse this:
raysPerSide
calculated as: (totalRays-1)/2
. This does imply as your conclusion that there are 4 rays on both sides. rayMaxDegrees=30
setting means that the total field of view covered by the rays spans 60 degrees, centered on the agent's forward direction. This setup should not cause the rays to wrap around 360 degrees; they should be constrained within this 60-degree arc in front of the agent.Ray Spread calculation: I think we need to ensure that the rays are evenly distributed across the specified arc. Misinterpretation might occur if the rays are not evenly spaced or if the field of view is not properly centered. Raycast parser accuracy: If there's a concern about the raycast parser's accuracy, it's essential to validate how the parser interprets raw raycast data. This involves ensuring that it correctly accounts for the angles and distances of objects detected by each ray. I will conduct a bit more testing on this point to rule this out.
Having checked the unity setup, it seems the RAYS PER DIRECTION
parameter is set to 3
, meaning 7 total rays as opposed to 9. This could be the problem but I don't recall this parameter being modified in any way.
This could indicate the parameter is either overriding or being overridden.
This issue is stale because it has been open for 45 days with no activity.
Describe the bug I am trying to train an agent to go towards an immovable block, which will cause it to fall into a pit and receive a reward (see below image, attached as pitLI-sanitycheck.txt
I initialise AAI with the following code
Where the value of totalRays is 9. I understand this to mean that the agent will have 4 rays to the left, 4 to the right and one directly ahead. I understand
rayMaxDegrees=30
to mean that the rays will be spread out evenly over the 15 degrees to either side of the front of the agent.If I use the raycast parser to parse the input seen in the first frame (shown approximately in the screenshot) I get:
All the values seem reasonable except the final one in the IMMOVABLE list. This suggests to me that the agent is seeing an immovable block with it's furthest right ray. If I remove the protruding block from the arena (see below image, attached as pitLI-sanitycheck-altered.txt)
The agent only sees ARENA
This indicates that in the previous example the IMMOVABLE object being seen on the far right is the block that was removed.
Questions
To Reproduce Steps to reproduce the behavior: Run the provided configs (they need renaming to .yml files) and inspect the output of the raycast parser
Expected behavior A block is not seen on the far right in the raycast parser output
Version info Running with a version of python AAI pulled from pip in the last few weeks, and the unity version of AAI published on Oct 2, 2023