docs
docs copied to clipboard
add corrected image to media file; update URL used in doc
Description
Added an updated image to the media directory, a-star-example-graph_corrected.png
Updated the MD doc to point to the updated image
Issue Solved
Originally flagged by Customer Support here in Slack: https://codecademy.slack.com/archives/CG06LKH6C/p1708200676747209
user feedback from Slack: For A* search, you state, "For the algorithm to generate the correct result, the evaluation function must be admissible, meaning that it never overestimates the cost to arrive at the goal node." In order for the evaluation function to be admissible, the heuristic function must also be admission (since f = g + h). But then, the example heuristic you use in the graph violates admissibility. I to G has a path cost of 3 but the heuristic value for I is 4 ... it's overestimating!
Jira ticket here: https://codecademy.atlassian.net/browse/CQ-6840
CQA Chris DeGuira wrote: I have looked at the docs and found that this is a valid issue with a quick fix. For each node in the example graph, the heuristic (represented by the number in the parenthesis) should be smaller than the cost from that node to the end of the graph (Node G). The actual cost is the number along the lines. This holds true for all nodes except for the connection between I and G. I have marked up the image to show where the issue is. Fortunately, the solution does not fall along that route so the rest of the Doc should be fine (that route is not considered due to it being too expensive). The only required fix is to change the cost from I to G (the 3 circled in red) to be a larger number than 4 (such as 5).
I don't see an issue in the repo that corresponds with this fix.
Type of Change
- Editing an existing entry (fixing a typo, bug, issues, etc)
Checklist
- [x] All writings are my own.
- [x] My entry follows the Codecademy Docs style guide.
- [x] My changes generate no new warnings.
- [x] I have performed a self-review of my own writing and code.
- [x] I have checked my entry and corrected any misspellings.
- [x] I have made corresponding changes to the documentation if needed.
- [x] I have confirmed my changes are not being pushed from my forked
mainbranch. - [x] I have confirmed that I'm pushing from a new branch named after the changes I'm making.
- [x] I have linked any issues that are relevant to this PR in the
Issues Solvedsection.