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

A* implementation takes too much memory #36

Open
stephanemagnenat opened this issue Feb 15, 2021 · 2 comments
Open

A* implementation takes too much memory #36

stephanemagnenat opened this issue Feb 15, 2021 · 2 comments
Labels
optimisation similar feature but with less memory or computational cost

Comments

@stephanemagnenat
Copy link
Contributor

stephanemagnenat commented Feb 15, 2021

The current A* algorithm used in Map::pathfindPointToPoint uses a rich AStarAlgorithmPoint for each point's position. However, it should be able to run with a much lower overhead because both the move cost as well the direction can be inferred by a simple derivative of explored points.

@stephanemagnenat stephanemagnenat added the optimisation similar feature but with less memory or computational cost label Feb 15, 2021
@Giszmo
Copy link
Contributor

Giszmo commented Nov 17, 2023

When I start glob2, pmap reports a mem usage total of 671MB. That goes up to 690MB in a four player game with about 600 units. I say it's premature optimisation to spend time on this. Any PR that increases the code complexity to save some MB on big games would be a net negative.

@stephanemagnenat
Copy link
Contributor Author

I never thought for this issue to be urgent, but I realized that while reading the code for something else, and thought that it was good to document that.

@stephanemagnenat stephanemagnenat changed the title A* implement takes too much memory A* implementation takes too much memory Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimisation similar feature but with less memory or computational cost
Projects
None yet
Development

No branches or pull requests

2 participants