Changes

Jump to: navigation, search

Iterative Search

127 bytes added, 15:30, 25 December 2020
no edit summary
'''[[Main Page|Home]] * [[Search]] * Iterative Search'''
[[FILE:SpaghettiCode.JPG|border|right|thumb|Spaghetti Code <ref>[[Arts#:Category:Irmgard Potthoff|Irmgard Potthoff]] - Keine Schonkost, 2010, Überschriften aus Tageszeitungen, Teller, Messer, Gabel, Tisch (headlines from daily newspapers, plate, knife, fork, table), [http://flottmann-hallen.de/event/884/flottmann-30-hoch Flottmann 30 hoch] - 30 years anniversary exhibition, [[Arts#:Category:Flottmann|Flottmann-Hallen]] in [https://en.wikipedia.org/wiki/Herne,_North_Rhine-Westphalia Herne], [https://en.wikipedia.org/wiki/North_Rhine-Westphalia North Rhine-Westphalia], [https://en.wikipedia.org/wiki/Germany Germany], part of [[Arts#IndustrialHeritageTrail:Category:Industrial Heritage Trail|The Industrial Heritage Trail]] of the [https://en.wikipedia.org/wiki/Ruhr Ruhr area], Photo by [[Gerd Isenberg]], September 18, 2016</ref> ]]
The more common search structure is the [[Recursion|recursive]] [[Depth-First|depth-first search]], as used in the [[Negamax|Negamax algorithm]] example. The function calls itself with a decremented depth parameter until depth reaches zero. Opposed to that the '''Iterative Search''' always remains on the same layer on the call [[Stack|stack]].
It is interesting to convert this recursive procedure to an iterative (non-recursive) form by a sequence of mechanical transformations, and to apply simple optimizations which preserve program correctness. The resulting procedure is surprisingly simple, but not as easy to prove correct as the recursive form.
=Considerations=
Generally every Recursive Function can also be converted into an Iterative Search by means of replacing the function calls by jumps ([[C#Goto|goto]], break, continue) within the function itself <ref>[http://c-faq.com/style/stylewars.html comp.lang.c FAQ list · Question 17.10]</ref>. The result is usually more efficient as the calling of a function is slower than just jumps within the function. The main downside however is the increased complexity and decreased readability <ref>[https://en.wikipedia.org/wiki/Spaghetti_code Spaghetti code from Wikipedia]</ref>.
* [https://www.stmintz.com/ccc/index.php?id=478627 Iterative alpha-beta search?] by [[Andrew Wagner]], [[CCC]], January 11, 2006
* [http://www.talkchess.com/forum/viewtopic.php?t=14832 Iterative DTS] by [[Fritz Reul]], [[CCC]], July 02, 2007
* [http://www.open-aurec.com/wbforum/viewtopic.php?f=4&t=49618&p=187476 Interesting Scorpio design] by [[KerwinMedina]], [[Computer Chess Forums|Winboard Forum]], November 05, 2008
* [http://www.talkchess.com/forum/viewtopic.php?topic_view=threads&p=264977 Iterative version of Alpha-beta instead recursive] by Samuele Giraudo, [[CCC]], May 02, 2009
==2010 ...==
'''[[Search|Up one level]]'''
[[Category:Flottmann]]
[[Category:Industrial Heritage Trail]]
[[Category:Irmgard Potthoff]]

Navigation menu