-
Notifications
You must be signed in to change notification settings - Fork 9
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
Allow configuring if agent can see through walls #30
Comments
Should the agent be able to see only in cardinal directions, like an orthogonal projection where perspective lines are all parallel, or with a traditional perspective? I made the following not-to-scale representation of the view to illustrate the difference. Orthogonal perspective would be easier to implement, but the traditional perspective would be more interesting and realistic. |
Good question. I prefer the latter. |
The occlusion described in that pull request modified a bidirectional orthogonal occlusion to allow corners like the one described in the description to cast shadows more realistic shadows, but that still does not create a system where occlusion can involve angles other than cardinal directions. I have a handful of approaches I'm thinking about to create a system which can incorporate viewing angle, but they all would contribute not-insignificant overhead before some optimizations I have in mind, and more than likely after them.
|
Hi @landrumb
Awesome! I think non-insignificant overhead is inevitable and acceptable. We can start from the first approach. The size of the agent's view is usually relatively small. We can compare the efficiency with the second approach. My intuition is that, the second approach doesn't seem to be very inefficient. The third approach also looks charming. As you said, it may be useful in statical environments. I think we can lazily cache the mask of the agent's view in this case. |
@findmyway I have an implementation working at least close to what I'm looking for, but I'm having a hard time incorporating it into Obviously, transparency has to be implemented on objects, which I have not done, but it seems like the best way to do transparency may be with an attribute, as certain objects like doors can be conditionally transparent or opaque. If you'd like to see what I have so far, it's on branch |
Currently the door has only two properties: symbol, color. We can add another field like
Then we can get all the opaque objects' mask by changing the GridWorlds.jl/src/grid_world_base.jl Line 84 in f46e78c
Here, we need to change the variable
|
Hi @landrumb Is there anything I can do to help to add this feature? 😃 |
@findmyway I was busy yesterday and haven't gotten a chance to sit down and try to incorporate it into |
@findmyway I've overestimated my ability. How do I get the object at a given index from the Bool arrays passed to |
Yes, and note that WordBase is a subtype of AbstractArray. |
Currently the agent can see through walls by default.
The text was updated successfully, but these errors were encountered: