-
Notifications
You must be signed in to change notification settings - Fork 1
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
Improve the algorithm which picks which rooms are connected #72
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JackAshwell11
force-pushed
the
room-connection-improvement
branch
from
October 26, 2022 21:30
f369854
to
4cc5d3c
Compare
Allowed diagonals in A* pathfinding. Eliminated symmetric and transitive relations. The transitive code needs more testing. May implement cellular automata as well.
Tried implementing Kruskal's algorithm. The implementation effort is not worth it and the rough version is much slower than Prim's. Switched to using rects for complete_graph and mst. Improved some comments. Optimised symmetric relation detection. Figured out idea for extra connections.
…imum spanning tree. Need to simplify create_hallways (McCabe rates it at 16). Done some refactoring to make map.py cleaner. May remove Map class as a functional approach could work better. Improved some docstrings in Rect.
Switched grid_bfs in hades_common.h to use INTERCARDINAL_OFFSETS.
…ot be kept however). Switched generation to built-in random library, so I can seed the Random object and log the state. Switched possible tiles to a set.
Fixed all generation tests. Optimised and reformatted some more stuff.
JackAshwell11
force-pushed
the
room-connection-improvement
branch
from
November 14, 2022 16:40
26f11fc
to
268b0fb
Compare
Fixed typing error. Fixed wall hole bug. The obstacle placement was wrong. Switched Rect.get_distance_to() and test_astar.heuristic() to Euclidean distance.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Changes
This PR improves the algorithm which determines which rooms get connected to which other rooms. It uses a minimum spanning tree to find the shortest path between all the rooms such that they are still reachable
Refs #71
Type of Changes
Tasks