Dab tsi yog greedy zoo tshaj plaws tshawb nrhiav hauv kev txawj ntse?
Dab tsi yog greedy zoo tshaj plaws tshawb nrhiav hauv kev txawj ntse?

Video: Dab tsi yog greedy zoo tshaj plaws tshawb nrhiav hauv kev txawj ntse?

Video: Dab tsi yog greedy zoo tshaj plaws tshawb nrhiav hauv kev txawj ntse?
Video: Vajtswv Txoj Lus: Kev Paub Vajtswv | Nqe Lus Uas Xaiv Tawm Los 50 2024, Tej zaum
Anonim

Zoo tshaj - thawj Nrhiav Algorithm ( Kev Nrhiav Siab ): Greedy zoo tshaj plaws - thawj nrhiav algorithm ib txwm xaiv txoj hauv kev uas tshwm sim zoo tshaj plaws lub sijhawm ntawd. Hauv zoo tshaj plaws thawj nrhiav algorithm, peb nthuav cov node uas yog ze tshaj rau lub hom phiaj node thiab tus nqi ze tshaj yog kwv yees los ntawm heuristic function, i.e. f(n) = g(n).

Ib yam li ntawd ib tug yuav nug, dab tsi yog greedy zoo tshaj plaws nrhiav thawj?

Zoo tshaj - thawj nrhiav yog a nrhiav algorithm uas tshawb txog ib daim duab los ntawm kev nthuav dav cov kev cog lus feem ntau xaiv raws li txoj cai. Hom tshwj xeeb ntawm no nrhiav hu ua greedy zoo tshaj plaws - thawj nrhiav los yog ntshiab heuristic nrhiav.

Tsis tas li ntawd, dab tsi yog qhov heuristic muaj nuj nqi ntawm greedy zoo tshaj plaws nrhiav thawj zaug? Greedy zoo tshaj plaws - thawj nrhiav sim nthuav cov node uas nyob ze rau lub hom phiaj, ntawm qhov chaw uas qhov no yuav ua rau muaj kev daws teeb meem sai. Yog li, nws ntsuas cov nodes los ntawm kev siv xwb heuristic muaj nuj nqi ; yog, f(n) = h(n).

Ib yam li ntawd, kev nrhiav kev ntshaw hauv kev txawj ntse yog dab tsi?

Hauv siab nrhiav , peb nthuav cov node ze tshaj rau lub hom phiaj node. Qhov "ze" yog kwv yees los ntawm ib tug heuristic h(x). Heuristic: Ib tug heuristic h txhais tau tias yog- h(x) = kwv yees qhov deb ntawm node x los ntawm lub hom phiaj node. Txo tus nqi ntawm h(x), ze dua yog qhov ntawm lub hom phiaj.

Dab tsi yog qhov txawv ntawm greedy best first search thiab A* search algorithm?

2 Teb. Zoo tshaj - thawj nrhiav algorithm mus xyuas lub xeev tom ntej raws li heuristics muaj nuj nqi f(n) = h nrog tus nqi qis tshaj heuristic (feem ntau hu ua siab ntshaw ). Yog li nws tsis xaiv lub xeev tom ntej nkaus xwb nrog tus nqi qis tshaj heuristics tab sis ib qho uas muab tus nqi qis tshaj thaum xav txog nws yog heuristics thiab tus nqi. ntawm mus rau lub xeev ntawd.

Pom zoo: