You are on page 1of 5

Heuristic (computer science) - Wikipedia https://en.wikipedia.

org/wiki/Heuristic_(computer_science)

Преведено на: српски Прикажи оригинал Опције ▼

хеуристички (информатика)
У математичкој оптимизацији и рачунарској науци , хеуристичка (од грчког ευρισκω
„налазим, откривам“) је техника дизајнирана за брже решавање проблема када су класичне
методе сувише споре за проналажење тачног или приближног решења, или када класичне
методе не успевају да пронађу било које тачно решење у простору за претрагу . Ово се
постиже трговањем оптималношћу, потпуношћу, тачношћу или прецизношћу за брзину. На
неки начин, може се сматрати пречицом.

Хеуристичка функција , такође једноставно названа хеуристичка , је функција која


рангира алтернативе у алгоритмима претраге на сваком кораку гранања на основу
доступних информација како би се одлучило коју грану да прати. На пример, може бити
приближно тачно решење. [1]

Дефиниција и мотивација
Циљ хеуристике је да произведе решење у разумном временском оквиру које је довољно
добро за решавање проблема. Ово решење можда није најбоље од свих решења овог
проблема, или може једноставно бити приближно тачном решењу. Али и даље је вредан јер
за његово проналажење није потребно претерано дуго времена.

Хеуристика може сама да произведе резултате или се може користити заједно са


алгоритмима оптимизације да би се побољшала њихова ефикасност (нпр. могу се користити
за генерисање добрих почетних вредности).

Резултати о НП-тврдоћи у теоријској компјутерској науци чине хеуристику једином


одрживом опцијом за низ сложених проблема оптимизације које је потребно рутински
решавати у апликацијама из стварног света.

Хеуристика је у основи читавог поља вештачке интелигенције и компјутерске симулације


размишљања, јер се могу користити у ситуацијама када не постоје познати алгоритми . [2]

Компромис
Критеријуми компромиса за одлучивање да ли користити хеуристику за решавање датог
проблема укључују следеће:

Оптималност: Када постоји неколико решења за дати проблем, да ли хеуристика


гарантује да ће се наћи најбоље решење? Да ли је заиста потребно пронаћи најбоље
решење?
Потпуност: Када постоји неколико решења за дати проблем, може ли их хеуристика
пронаћи сва? Да ли су нам заиста потребна сва решења? Многе хеуристике су намењене
само проналажењу једног решења.

1 од 5 22.2.2024. 16:39
Heuristic (computer science) - Wikipedia https://en.wikipedia.org/wiki/Heuristic_(computer_science)

р уј д р
Тачност и прецизност: Може ли хеуристика да обезбеди интервал поверења за наводно

решење? Да ли је трака грешке на решењу неразумно велика?


Време извршења : Да ли је ово најпознатија хеуристика за решавање ове врсте
проблема? Неке хеуристике конвергирају брже од других. Неке хеуристике су само
незнатно брже од класичних метода, у ком случају 'општи трошкови' за израчунавање
хеуристике могу имати негативан утицај.

У неким случајевима може бити тешко одлучити да ли је решење пронађено хеуристиком


довољно добро јер теорија која лежи у основи хеуристике није много разрађена.

Примери

Једноставнији проблем

Један од начина да се постигне повећање перформанси рачунања које се очекује од


хеуристике састоји се од решавања једноставнијег проблема чије је решење такође решење
почетног проблема.

Проблем трговачког путника

Пример апроксимације је описао Џон Бентли за решавање проблема трговачког путника


(ТСП):

„С обзиром на листу градова и удаљености између сваког пара градова, која је најкраћа
могућа рута која посети сваки град тачно једном и врати се у изворни град?“

тако да се изабере редослед цртања помоћу оловке за цртање . Познато је да је ТСП НП-тврд
, тако да је оптимално решење чак и за проблем умерене величине тешко решити. Уместо
тога, похлепни алгоритам се може користити за давање доброг, али не и оптималног решења
(то је апроксимација оптималног одговора) у разумно кратком времену. Хеуристика
похлепног алгоритма каже да се изабере оно што је тренутно најбољи следећи корак без
обзира да ли то спречава (или чак онемогућава) добре кораке касније. То је хеуристика у
смислу да пракса указује да је довољно добро решење, док теорија указује да постоје боља
решења (па чак и указује колико боља, у неким случајевима). [3]

Search

Another example of heuristic making an algorithm faster occurs in certain search problems.
Initially, the heuristic tries every possibility at each step, like the full-space search algorithm. But it
can stop the search at any time if the current possibility is already worse than the best solution
already found. In such search problems, a heuristic can be used to try good choices first so that bad
paths can be eliminated early (see alpha–beta pruning). In the case of best-first search algorithms,
such as A* search, the heuristic improves the algorithm's convergence while maintaining its
correctness as long as the heuristic is admissible.

2 од 5 22.2.2024. 16:39
Heuristic (computer science) - Wikipedia https://en.wikipedia.org/wiki/Heuristic_(computer_science)

Newell and Simon: heuristic search hypothesis

In their Turing Award acceptance speech, Allen Newell and Herbert A. Simon discuss the heuristic
search hypothesis: a physical symbol system will repeatedly generate and modify known symbol
structures until the created structure matches the solution structure. Each following step depends
upon the step before it, thus the heuristic search learns what avenues to pursue and which ones to
disregard by measuring how close the current step is to the solution. Therefore, some possibilities
will never be generated as they are measured to be less likely to complete the solution.

A heuristic method can accomplish its task by using search trees. However, instead of generating
all possible solution branches, a heuristic selects branches more likely to produce outcomes than
other branches. It is selective at each decision point, picking branches that are more likely to
produce solutions.[4]

Antivirus software

Antivirus software often uses heuristic rules for detecting viruses and other forms of malware.
Heuristic scanning looks for code and/or behavioral patterns common to a class or family of
viruses, with different sets of rules for different viruses. If a file or executing process is found to
contain matching code patterns and/or to be performing that set of activities, then the scanner
infers that the file is infected. The most advanced part of behavior-based heuristic scanning is that
it can work against highly randomized self-modifying/mutating (polymorphic) viruses that cannot
be easily detected by simpler string scanning methods. Heuristic scanning has the potential to
detect future viruses without requiring the virus to be first detected somewhere else, submitted to
the virus scanner developer, analyzed, and a detection update for the scanner provided to the
scanner's users.

Pitfalls
Some heuristics have a strong underlying theory; they are either derived in a top-down manner
from the theory or are arrived at based on either experimental or real world data. Others are just
rules of thumb based on real-world observation or experience without even a glimpse of theory.
The latter are exposed to a larger number of pitfalls.

When a heuristic is reused in various contexts because it has been seen to "work" in one context,
without having been mathematically proven to meet a given set of requirements, it is possible that
the current data set does not necessarily represent future data sets (see: overfitting) and that
purported "solutions" turn out to be akin to noise.

Statistical analysis can be conducted when employing heuristics to estimate the probability of
incorrect outcomes. To use a heuristic for solving a search problem or a knapsack problem, it is
necessary to check that the heuristic is admissible. Given a heuristic function meant to
approximate the true optimal distance to the goal node in a directed graph
containing total nodes or vertices labeled , "admissible" means roughly that the
heuristic underestimates the cost to the goal or formally that for all
where .

3 од 5 22.2.2024. 16:39
Heuristic (computer science) - Wikipedia https://en.wikipedia.org/wiki/Heuristic_(computer_science)

If a heuristic is not admissible, it may never find the goal, either by ending up in a dead end of
graph or by skipping back and forth between two nodes and where .

Etymology
The word "heuristic" came into usage in the early 19th century. It is formed irregularly from the
Greek word heuriskein, meaning "to find".[5]

See also
Constructive heuristic
Metaheuristic: Methods for controlling and tuning basic heuristic algorithms, usually with usage
of memory and learning.
Matheuristics: Optimization algorithms made by the interoperation of metaheuristics and
mathematical programming (MP) techniques.
Reactive search optimization: Methods using online machine learning principles for self-tuning
of heuristics.

References
1. Pearl, Judea (1984). Heuristics: intelligent search strategies for computer problem solving.
United States: Addison-Wesley Pub. Co., Inc., Reading, MA. p. 3. OSTI 5127296 (https://ww
w.osti.gov/biblio/5127296).
2. Apter, Michael J. (1970). The Computer Simulation of Behaviour (https://books.google.com/boo
ks?id=-b5aDwAAQBAJ&q=Heuristic). London: Hutchinson & Co. p. 83. ISBN 9781351021005.
3. Јон Лоуис Бентлеи (1982). Писање ефикасних програма (https://archive.org/details/writingef
ficient00bent) . Прентице Халл. стр. 11 (https://archive.org/details/writingefficient00bent/page/
11) . (https://archive.org/details/writingefficient00bent) (https://archive.org/details/writingefficient
00bent/page/11)
4. Ален Њуел и Херберт А. Сајмон (1976). „Рачунарска наука као емпиријско истраживање:
симболи и претрага“ (http://lidecc.cs.uns.edu.ar/~grs/InteligenciaArtificial/NewellSimon-1975.p
df)(ПДФ) . Цомм. АЦМ . 19 (3): 113–126. дои : 10.1145/360018.360022 (https://doi.org/10.114
5%2F360018.360022) . С2ЦИД 5581562 (https://api.semanticscholar.org/CorpusID:5581562) .
(http://lidecc.cs.uns.edu.ar/~grs/InteligenciaArtificial/NewellSimon-1975.pdf) (https://doi.org/10.
1145%2F360018.360022) (https://api.semanticscholar.org/CorpusID:5581562)
5. „Дефиниција (https://web.archive.org/web/20161023011059/https://en.oxforddictionaries.com/
definition/heuristic)хеуристике (https://web.archive.org/web/20161023011059/https://en.oxford
dictionaries.com/definition/heuristic) на енглеском“ (https://web.archive.org/web/20161023011
059/https://en.oxforddictionaries.com/definition/heuristic) . Окфорд Университи Пресс.
Архивирано из оригинала (https://en.oxforddictionaries.com/definition/heuristic) 23. октобра
2016 . Приступљено 22. 10. 2016 . (https://web.archive.org/web/20161023011059/https://en.o
xforddictionaries.com/definition/heuristic) (https://en.oxforddictionaries.com/definition/heuristic)

Retrieved from "https://en.wikipedia.org/w/index.php?title=Heuristic_(computer_science)&oldid=1178815381"

4 од 5 22.2.2024. 16:39
Heuristic (computer science) - Wikipedia https://en.wikipedia.org/wiki/Heuristic_(computer_science)

5 од 5 22.2.2024. 16:39

You might also like