Skip to content

Conversation

@Sahilkumar19
Copy link
Contributor

Fixes #3565
This PR improving the content of Greedy Best First algorithm.I have added point which were missing or unclear in the provided explanation.

Improving Greedy Best First Search algorithm.
@CLAassistant
Copy link

CLAassistant commented Oct 12, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@SSwiniarski SSwiniarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sahilkumar19 I did a first review and had one suggestion revising your edits for clarity. You also need to sigh the CLA.


**Greedy best-first search** is an informed search algorithm where the evaluation function is strictly equal to the heuristic function, disregarding the edge weights in a weighted graph. To get from a start node to a target node, the lowest value resulting from some heuristic function, **h(x)**, is considered as the successive node to traverse to. The goal is to choose the quickest and shortest path to the target node.

**Greedy best-first search** is an informed search algorithm where the evaluation function is strictly equal to the heuristic function, disregarding the edge weights in a weighted graph(because we care about the heuristic value). In ordre to search for a goal node expand the node that is closest to the goal as determined by the heuristic function.Assume that is likely to lead a solution quickly.The solution from Greedy Best First Search may not be optimal since a shorter path may exist.In this algorithm search cost is minimum since solution found without expanding a node that is not on the solution path.This algorithm is minimal but not complete since it can lead to a dead end.It's called "Greedy" since at each step it tries to get as close to the goal as it can.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Greedy best-first search** is an informed search algorithm where the evaluation function is strictly equal to the heuristic function, disregarding the edge weights in a weighted graph(because we care about the heuristic value). In ordre to search for a goal node expand the node that is closest to the goal as determined by the heuristic function.Assume that is likely to lead a solution quickly.The solution from Greedy Best First Search may not be optimal since a shorter path may exist.In this algorithm search cost is minimum since solution found without expanding a node that is not on the solution path.This algorithm is minimal but not complete since it can lead to a dead end.It's called "Greedy" since at each step it tries to get as close to the goal as it can.
**Greedy best-first search** is an informed search algorithm where the evaluation function is strictly equal to the heuristic function, disregarding the edge weights in a weighted graph because it only cares about the heuristic value. In order to search for a goal node it expands the node that is closest to the goal as determined by the heuristic function. This assumes that it is likely to lead to a solution quickly. However, the solution from Greedy best-first search may not be optimal since a shorter path may exist.
In this algorithm the search cost is at a minimum since the solution is found without expanding a node that is not on the solution path. This algorithm is minimal, but not complete, since it can lead to a dead end. It's called "Greedy" because at each step it tries to get as close to the goal as it can.

@Sahilkumar19
Copy link
Contributor Author

@Sahilkumar19 I did a first review and had one suggestion revising your edits for clarity. You also need to sigh the CLA.

Thanks for reviewing and suggestions.

Copy link
Contributor

@SSwiniarski SSwiniarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sahilkumar19 I made one typo edit and looks good for a second review.

@SSwiniarski
Copy link
Contributor

@Sahilkumar19 I did my review. The second review will be by one of the other maintainers.

@caupolicandiaz caupolicandiaz removed the request for review from yangc95 October 30, 2023 21:42
@caupolicandiaz caupolicandiaz added the status: under review Issue or PR is currently being reviewed label Oct 30, 2023
Copy link
Contributor

@caupolicandiaz caupolicandiaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sahilkumar19 @SSwiniarski I just made some direct edits to clean up a couple of typos and adjust the phrasing a bit. LGTM

@caupolicandiaz caupolicandiaz added status: review 2️⃣ completed hacktoberfest-accepted Indicates the PR was approved, merged, and pertains to Hacktoberfest and removed status: ready for next review status: under review Issue or PR is currently being reviewed labels Oct 30, 2023
@SSwiniarski SSwiniarski merged commit e25c691 into Codecademy:main Oct 31, 2023
@github-actions
Copy link

👋 @Sahilkumar19
You have contributed to Codecademy Docs, and we would like to know more about you and your experience.
Please take a minute to fill out this four question survey to help us better understand Docs contributions and how we can improve the experience for you and our learners.
Thank you for your help!

🎉 Your contribution(s) can be seen here:

https://www.codecademy.com/resources/docs/ai/search-algorithms/greedy-best-first-search

Please note it may take a little while for changes to become visible.
If you're appearing as anonymous and want to be credited, see here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai Artificial Intelligence entries enhancement New feature or request hacktoberfest hacktoberfest-accepted Indicates the PR was approved, merged, and pertains to Hacktoberfest status: review 1️⃣ completed status: review 2️⃣ completed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Edit] Subject: Greedy Best First Search Algorithm

4 participants