-
Notifications
You must be signed in to change notification settings - Fork 600
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
Grid observer is unusably slow #48
Comments
Hi Tobias, It's certainly something we can improve, if there's a need, but we're a bit surprised that you want a grid observation of that size. What are you trying to achieve? Tim |
Dear Tim, |
If you engineer the domain a bit, you can probably reduce the input dimensionality to This is the case because on the Y axis (i.e. the height in the world coordinate system) you probably want to perceive blocks that:
all of which should be roughly on the same height level as your agent. Unless you want to explore mines or multi-layer constructs, you should be able to get a relatively good amount of information. |
Exactly, that's what I want. However, that would restrict me to relatively flat biomes, otherwise I am back to a very local field of view that does not allow for meaningful path planning, which is what you do when navigating the world as a human player. Of course I don't ever need all 21^3 blocks, however, there is no interface to query only the visible surface blocks. |
Hi Tobias, Yes, that all makes sense. We'll have to think about how to make the grid observation faster. Until then, you could experiment with the path planning in different ways. Since you have control over the world you could do path planning around obstacles you create yourself. These wouldn't need grid observations since you know where they are. Another possibility is to use the depth data. See depth_map_runner.py for an example. Tim |
Dear Tim, |
Hi Tobias, it turns out there was indeed a "source of inefficiency", which we would not have spotted if you hadn't raised the question. [We were calling I've remedied this, and another bug (issue #52) which was also breaking the GridObserver, and I'm now not seeing any noticeable slowdown in Minecraft behaviour when sending a 21x21x21 grid. In fact, I'm only seeing a slight slowdown when sending 61x21x61 (around 78k blocks). Hopefully this will give you enough scope for your experiments. There is currently an upper limit on the size which occurs when the amount of data in each observation message exceeds 2^20 bytes - this is a limit in Minecraft's own messaging system. (You will easily hit this if you request, say, 61x61x61 blocks.) If there turns out to be a demand for grids of this size, we will look at ways to solve this problem. In the meantime, I'll close this issue.
|
Thanks for taking care of this. I am eager to check this out, so I'll try to compile the latest repository version. Don't worry about extremely large grids for now. |
Tested and works great. Thanks again! |
Adding the following grid observer:
(21 x 21 x 21 = 9261 blocks per observation) to my mission slows down the game (or the Malmö mod?) so much that the system is unusable. I see two possible behaviors, and I did not figure out yet when I get which of the two:
Reporting 10K blocks should not be a big deal, even at 20Hz, compared to rendering the scene. So I suspect that there is probably a source of inefficiency somewhere. The problem is "scalable" in the sense that requesting fewer blocks results in shorter lags, but also for 1K blocks the lags are clearly percievable.
The text was updated successfully, but these errors were encountered: