Cuberite Forum
PathFinder status - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: PathFinder status (/thread-1571.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23


RE: Implementing Pathfinding - LogicParrot - 05-01-2015

Hello, the zombies are really polished now. I can't reproduce the air hanging error anymore, so I think it's fixed. Can you?
They don't freeze anymore, but at daylight, will not charge at you when they're hiding in the shadows unless provoked, this behavior will later be tweaked.


RE: Implementing PathFinding - jan64 - 05-01-2015

About the zombies following second best path, the correct behavior would be for the zombie to check if there is a line of sight to the player, and then get the best/second best path (vanilla does that, afaik) as long as the player is in some nearby area.


Merged! - LogicParrot - 05-01-2015

Update: The new AI and PathFinder branch has been merged and is now part of the official MCServer.


DoWithChunk - LogicParrot - 05-01-2015

xoft Wrote:Make Step() call the cWorld::DoWithChunk() function, then in the Item() function call the SingleStep() several times, passing the cChunk over to it for direct querying. Note that once you have a cChunk instance, you can simply get its neighboring chunks and thus query the neighborhood rather efficiently. I believe this would be such an improvement that it would invalidate the need for a cache completely.

Problem: The A* algorithm is sometimes jumpy: It won't necessarily query one chunk and then its neighbors, it could jump lots of blocks at a time.


RE: Implementing PathFinding - worktycho - 05-02-2015

It's still faster to do what xoft wrote because the slow bit is DoWithChunk, querying neighbors within DoWithChunk is cheap. The problem with that is that whilst it increases throughput, the depth limit becomes much more important because you hold the ChunkLayer lock for the entire time.


RE: Implementing PathFinding - LogicParrot - 05-02-2015

Deleted no longer relevant questions and submitted a pull request here. Please review.


RE: Implementing PathFinding - xoft - 05-02-2015

It's not so much about the locks - they are locked during the mob ticks anyway. It's about the chunk lookups. Each DoWithChunk() needs to locate the chunk within the world, which is not exactly trivial; if you do that for each queried block, it quickly becomes the bottleneck.


RE: Implementing PathFinding - LogicParrot - 05-02-2015

Oh, ok. You're referring to the name of the commit only, correct?
Is the PR much better performance wise?


RE: Implementing PathFinding - xoft - 05-02-2015

I have no idea; I'd expect so, but unless someone actually measures the performance, there's no way to know.


RE: Implementing PathFinding - tonibm19 - 05-02-2015

It's me or mobs can jump fences now?