Anytime algorithms are designed so that it can be told to stop at any time and would return the best result it has found so far.<ref name="Grass"/> This is why it is called an interruptible algorithm. Anytime algorithms also maintain the last result, so that if they are given more time, they can continue from where they left off to obtain an even better result.<ref name="Grass"/>
== Construction ==
Make an algorithm with a parameter that influences [[Analysis of algorithms|running time]]. For example, as time increases, this variable also increases. After for a period of time, the search is stopped without having the goal met. This is similar to Jeopardy when the time runs out.<ref name="Bender"/> The contestants have to represent what they believe is the closest answer, although they may not know it or come even close to figuring out what it could be. This is similar to an hour-long test. Although the test questions are not in themselves limiting for time, the test must be completed within the hour. Likewise, the computer has to figure out how much time and resources to spend on each problem.<ref name="Bender"/>