-
Notifications
You must be signed in to change notification settings - Fork 599
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
Request for raycasting #184
Comments
Yes, this fits in with a few conversations we've had over the last few days - people want to avoid the vision problem and don't want to have to use the grid observation with the player's yaw. But one thing I can't see yet: what sort of format would you want the data returned in? |
Maybe JSON, since that seems to be what most things are when dealing with On Wed, Jul 13, 2016, 10:57 PM Tim Hutton notifications@github.com wrote:
|
Minecraft itself keeps track of the object (block or entity) that is directly in the line of sight (eg the block that gets the black highlight). We can add this as an observation (indeed, we used to do this in an earlier version). |
That would be fantastic! That would solve the issue of being able to see On Thu, Jul 14, 2016, 6:16 AM David Bignell notifications@github.com
|
It includes mobs, though (if memory serves) it doesn't include floating items. Hopefully we can do something about that though. |
All things in time. Just being able to identify threats and keep away from On Thu, Jul 14, 2016, 10:05 AM David Bignell notifications@github.com
|
I think this will be really useful and i'm looking forward to it! News about when this'll be released? |
@bcesarg6 it just fell through the cracks during some refactoring - it's always been on the list to get reinstated. As you can see, we added this issue to the Camel milestone, so the intention was to have it done by Camel's due-date. Hopefully we're still on track for that, though it might end up getting descoped to Dolphin if we run out of time. |
Have added ObservationFromRay - it will return a json object called "LineOfSight" - see the XSD for details. At the moment it has a range of 50 blocks, directly along the player's line of sight. We can easily extend this to allow users to specify the range / angle themselves, and to request multiple angles. (So you can have eyes in the back of your head, for example...) For the time being, I think this default behaviour is the most useful. |
Would this be able to detect something smaller than a single block; say On Mon, Jul 25, 2016, 10:34 AM David Bignell notifications@github.com
|
It should work with torches, and small things like flowers etc, but yes, the ray has to collide with the hitbox. It's essentially the same code Minecraft uses to determine what the player will interact with when they attack/use. Not sure about transparent blocks, will have to do some investigation. |
Being able to raycast from the agent's eye position at a block would be a large benefit for being able to detect what the agent can actually "see", as opposed to the observation grid which allows the agent to see blocks that might be obscured. As an even better improvement, being able to return information about the block hit by the ray would provide an easy way to gather information about the world from a distance without needing an obscenely large observation grid. Even better if the raycast could also return information about mobs that have been hit as well, allowing the agent to react to mobs before they are basically on top of it; which would be of particular use for skeletons whose ranged attack might be able to strike the agent from outside the observation grid, leaving them essentially defenseless.
The text was updated successfully, but these errors were encountered: