Skip to content
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

Bad Cost Estimation in node3d #13

Closed
green7ea opened this issue Dec 20, 2018 · 1 comment
Closed

Bad Cost Estimation in node3d #13

green7ea opened this issue Dec 20, 2018 · 1 comment

Comments

@green7ea
Copy link

The cost estimation for a 3D node (getC) uses a g value that is a 3D cost and an h value that is from the 2D A*. The 3D cost is always higher than the 2D cost since it has more restrictions. This encourages the algorithm to plan from an early path which results in a breath first search.

By adding a weight to the value of g in node3d.hpp:

/// get the total estimated cost
float getC() const
{
    return 0.8 * g + h;
}

The results become more interesting:

improvement

Left is the original and right is after the change. This isn't a complete fix as making the costs equivalent is hard but improves the behavior a lot.

@karlkurzer
Copy link
Owner

Hey, thanks for your comment, this is a great idea in general, it is just very much dependend on the environment configuration and I belive that you will violate the admissibility and consistency of the algorithm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants