AI Glossary / Graphs and symbolic AI / Advanced
Cyclic solution
Definition
A cyclic solution is a plan or policy that can return to an earlier state or decision point and repeat actions. In nondeterministic planning, such loops can represent useful retries, but a claim that they eventually reach the goal depends on the model and its termination assumptions.
What it means
A fixed action sequence cannot express every sensible response to uncertain outcomes. A device may fail to respond temporarily, a robot may need another attempt, or a process may return for correction. A cyclic policy states what to do after each observed result, including when to repeat an action.
The presence of a loop alone does not make a plan a solution. A policy that repeatedly enters a state from which the goal is impossible is defective. Even a loop with a possible exit can run forever if the environment is allowed to withhold that exit indefinitely.
This entry concerns cyclic solutions in automated planning, rather than periodic solutions of differential equations or repeated routes in patrolling problems.
How it works
Represent the environment as states, available actions and their possible successor states. A policy maps the observed state to an action. Its execution graph shows all outcomes that can arise while following that policy.
A weak plan needs a successful possibility. A strong plan must reach the goal for every possible execution under the model. A strong-cyclic policy allows loops but retains a route to the goal from every reachable state under the policy; its usual eventual-success interpretation relies on fairness.
In this setting, fairness concerns outcomes, not ethical treatment. Informally, when the same action is taken in the same state indefinitely, its possible outcomes cannot be systematically withheld forever. This excludes certain endless unsuccessful executions. It does not provide a deadline or a maximum number of retries.
Probabilities are another modeling choice. An independent positive success probability can support an almost-sure termination argument, but a nondeterministic model does not supply that probability automatically. A permanently broken device or an adversarial response can invalidate a fairness assumption that seemed plausible for temporary failures.
Three practical examples
- A robot repeats a positioning action after a harmless slip, while its policy includes recovery from every represented outcome.
- An automated workflow returns a document for correction and rechecks the revised version before accepting it.
- A service agent retries a transient request and separately handles outcomes that require escalation instead of another identical attempt.
Think of it this way
Think of trying a door key again after an awkward insertion. Repeating the action can make sense if the mechanism is functional and success remains attainable. Repeating forever cannot repair a broken lock.
The analogy illustrates the difference between a recoverable outcome and an invalid assumption. It does not prove that any particular physical retry process is fair or safe to repeat.
Worked example
A retry loop and its limits
Consider two states: Pending and Done. In Pending, action Try can either remain Pending or move to Done. The policy is “Try while Pending; stop in Done.” Its graph contains a self-loop at Pending and an exit to the goal.
A successful outcome is possible from every state reached before termination. Under the usual fairness assumption, an execution that stays Pending forever while continually taking Try is excluded. The policy therefore has the strong-cyclic interpretation, but it is not a strong solution when arbitrary repeated failure is permitted.
Add a separate probabilistic assumption: each trial succeeds independently with probability 0.25. The probability of still being Pending after four trials is 0.75⁴=0.31640625, about 31.64%. After ten trials it is about 5.63%. The expected number of trials is 1/0.25=4, yet four is not a guaranteed limit.
These numerical conclusions come from the added probability model, not from the loop structure or fairness alone.
Illustrative case study
A fictional warehouse operator, Willow Logistics, develops a policy for scanning parcel labels. A failed scan usually leaves the parcel available for another attempt, so the initial plan simply repeats the scan.
During review, the team adds an unreadable-label condition that repeated scanning cannot fix. That outcome needs a separate manual-identification route; treating it as a temporary failure had hidden a state with no effective progress.
The operator also adds a retry limit for service management. Reaching that limit triggers escalation, so the deployed workflow differs from an unlimited theoretical retry policy. The team evaluates whether the complete workflow reaches its business goal rather than claiming that the original cyclic-plan argument proves a delivery deadline.
Common misconceptions and mistakes
- A possible exit guarantees eventual exit in every environment. An adversarial or permanently failed environment can keep the process in the loop.
- Fairness specifies a success probability. It constrains allowed infinite behavior without necessarily assigning probabilities.
- A strong-cyclic plan has a fixed maximum completion time. The usual guarantee does not provide such a bound.
- A retry limit automatically preserves the original goal guarantee. The escalation or stopping outcome must be analyzed as part of the revised policy.
Business use
Cyclic planning is useful for agents that must recover from uncertain outcomes instead of abandoning a task after one failed action. Its business value depends on recognizing which failures are genuinely recoverable and which require a different action.
Review each loop for observability, reachable failure states and justified progress assumptions. If actions consume resources or have side effects, include those effects in the state model. A repeatable network request may need an idempotency mechanism so that uncertainty about the response does not produce duplicate real-world actions.
People also ask
Is every loop an infinite loop?
No. A loop can have an exit and terminate, although termination still needs justification.
Can a cyclic solution be represented finitely?
Yes. A finite policy graph can describe arbitrarily many repetitions.
Does fully observable planning mean outcomes are predictable?
No. The current state can be observable while the next outcome of an action remains nondeterministic.
Check your understanding
A retry policy has a possible success transition, but permanent failure can legally keep it in the same state forever. Does the existence of the success transition prove guaranteed completion?
Answer: No. That claim needs additional assumptions or a policy that handles the permanent-failure condition differently.
Related terms
- Policy
- Nondeterministic planning
- strong planning
- strong-cyclic planning
- fairness assumption
- termination
- retry
Learn next
Draw the Pending/Done policy and add an unrecoverable Error state. Decide which action, if any, can recover from Error. Then state separately what is guaranteed under adversarial outcomes, fairness and an explicit probability model.
More in Graphs and symbolic AI
- Cutset conditioning - Cutset conditioning is a method for solving a constraint problem by trying assignments to a selected set of variables whose removal leaves an acyclic...
- Cycle - A cycle is a route through a graph that returns to its starting vertex. In a simple cycle, no other vertex is repeated.
- Cycle cutset - A cycle cutset is a set of vertices whose removal leaves a graph without cycles.
- CYK algorithm - The CYK algorithm, named for Cocke, Younger and Kasami, is a dynamic programming method for recognizing and parsing strings with a context-free grammar.
- D* - D*, or Dynamic A*, is an incremental path-planning algorithm that repairs a route when new information changes edge costs in a graph.
- D-Separation - D-separation is a graphical criterion for determining which conditional independences are implied by a directed acyclic graph.
Sources
Cimatti and colleagues, Weak, strong, and strong cyclic planning via symbolic model checking, author-institution record: https://iris.unitn.it/handle/11572/74586
Camacho and McIlraith, Strong-Cyclic Planning when Fairness is Not a Valid Assumption: https://ktiml.mff.cuni.cz/~bartak/KnowProS2016/papers/paper11.pdf
The retry probabilities and warehouse case are original illustrations under stated assumptions.
Previous: Cycle cutset Next: Cyclical effect