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

Bug/bidirectional search #466

Closed

Conversation

Panda8Bamboo
Copy link
Contributor

Fixes: #465

Description
This pull request addresses the issue with the bidirectional_search function in algorithms/bidirectional_bfs.py, which currently fails to return the correct (i.e. shortest) path between the start and target nodes. The algorithm itself executes but returns incorrect results, as highlighted by the failing test test_path in Tests/algorithms/test_bidirectional_bfs.py.

Fix: This PR reverts the implementation of bidirectional_search to an earlier, correct version (as seen in PR #322). The updated code ensures the correct calculation of the shortest path between the start and target nodes, and it successfully passes the test_path test.

Testing:
After implementing the fix, I ran test_path and verified that it now passes as expected with the correct shortest path.

Copy link
Contributor

👋 Thank you for opening this pull request! We're excited to review your contribution. Please give us a moment, and we'll get back to you shortly!

Feel free to join our community on Discord to discuss more!

@github-actions github-actions bot requested a review from UTSAVS26 November 13, 2024 07:47
@UTSAVS26 UTSAVS26 closed this Nov 19, 2024
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

Successfully merging this pull request may close these issues.

[Bug]: Incorrect path returned by bidirectional_search in algorithms/bidirectional_bfs.py
2 participants