AI Glossary / Graphs and symbolic AI / Intermediate

Macrops

Definition

Macrops are macro-operators: reusable planning structures that package a sequence of actions so a planner can consider the sequence as a larger unit. The term is associated with early STRIPS planning and the learning of generalized plans. A useful macrop represents when its component actions can work and what their combined execution achieves.

What it means

A planner may repeatedly discover similar action sequences, such as picking up an item, moving it, and putting it down. Remembering a reusable sequence can avoid reconstructing the same pattern from primitive actions every time.

The benefit is in organizing planning knowledge, not making the physical actions disappear. A three-step sequence remains three steps when executed, unless the environment provides a genuine combined action. Also, a stored successful plan is not automatically reusable everywhere. It needs conditions that explain why the sequence succeeds and parameters that can be instantiated appropriately in a new problem.

How it works

Start with a useful action sequence and analyze the preconditions and effects of its components. Determine which requirements must hold initially and which are established by earlier actions in the sequence. Account for effects that can remove conditions needed later.

Generalization replaces particular objects with parameters where the action relationships permit it. A planner can then match the macrop's applicability conditions against a new state and use the represented sequence or an appropriate supported portion.

Historical STRIPS work used triangle-table representations to support generalized plan reuse and execution monitoring. A modern implementation may use another representation, but still needs a clear relationship between the macro and its primitive expansion. Costs, side effects, and relevant execution conditions must remain visible to the planning model.

Three practical examples

1. A warehouse-planning exercise stores a pick-move-place pattern with parameters for the item and locations, checking its conditions before reusing it.

2. A workflow planner reuses a validated sequence for preparing and registering a document, provided the required inputs and permissions are represented in the model.

3. A research planner learns recurring action sequences from solved problems and tests whether adding them improves search on new instances without changing the underlying task requirements.

Think of it this way

Think of a reusable recipe section such as “prepare the filling,” which expands into several smaller steps. A cook can plan with that larger unit while still checking that the ingredients and equipment are available.

The analogy has limits: a planning macrop should have explicit modeled conditions and effects. A recipe title alone does not establish applicability. Nor does treating several steps as one planning unit mean their durations, resource use, or possible execution failures can be ignored.

Worked example

Consider an invented deterministic model with an item, a robot, a source S, and a destination T. A three-action sequence is PickUp(item,S), Move(S,T), and PutDown(item,T).

PickUp requires the robot and item at S and an empty hand. It makes the robot carry the item, removes the item's location at S, and removes HandEmpty. Move requires the robot at S and an allowed connection from S to T; carrying an item is permitted. It changes the robot's location to T. PutDown requires the robot at T, the item carried, and DockReady(T). It places the item at T and restores HandEmpty.

Assume DockReady and the connection are unchanged by these actions. The combined initial requirements include robot-at-S, item-at-S, HandEmpty, the connection, and DockReady(T). The result includes robot-at-T, item-at-T, and HandEmpty, with the carrying condition removed.

If every primitive action costs one, the macro costs three, even if the planner selects it in one search decision. The example demonstrates modeled composition, not a guarantee that a real robot can execute the sequence without monitoring.

Illustrative case study

Fictional case: Alder Automation notices that a planning prototype repeatedly constructs the same transfer sequence. Engineers add a parameterized macro and compare planning effort on a held-out collection of small transfer problems.

They also test a destination whose dock is unavailable and a route that does not permit the required move. The macro must fail its applicability check in those cases, rather than bypassing the missing conditions. During execution tests, the team still checks whether the expected intermediate states occur. This fictional scenario reports no measured planning speedup or physical throughput gain.

Common misconceptions and mistakes

Do not assume the macro's preconditions are simply all facts in the state where it was first learned. Many may be irrelevant, while some necessary relationships require careful generalization. Conversely, omitting an initial requirement because it appears only in a later action can make reuse invalid.

Do not compute combined effects by blindly joining every action's add list. A later action can undo an earlier effect. The final summary must reflect the ordered sequence.

Finally, adding many macros can increase the number of choices the planner must consider. Reuse has retrieval and applicability costs, so a larger macro library is not automatically better.

Business use

Macrops are useful when workflows contain repeatable action patterns and the planner can represent their applicability accurately. Select patterns that recur across tasks rather than storing every successful sequence without evaluation.

Track the primitive expansion, total cost, resource assumptions, and model version with each macro. Test whether it improves planning under representative workloads and whether its effects remain correct after domain rules change. Keep planning abstraction separate from execution assurance: a concise high-level plan still needs appropriate checks when actions have uncertain outcomes or the environment can change.

People also ask

Does a macrop execute as one physical action?

Usually it represents several primitive actions. Treating them as one planning choice does not make their execution instantaneous or indivisible.

Can a macrop apply to different objects?

Yes, if it has been correctly parameterized and the new objects satisfy its required relationships and conditions.

Do macros always make planning faster?

No. They may shorten useful search paths but also add choices and matching overhead. Their value needs workload-specific evaluation.

Check your understanding

Why must DockReady(T) be an initial condition in the worked example even though only PutDown uses it?

Answer: No earlier action establishes it. The sequence can reach its final step successfully only if that condition already holds and remains true under the stated model.

Related terms

  • Precondition
  • Execution monitoring
  • Macro-operator
  • automated planning
  • STRIPS
  • action model
  • effect
  • plan reuse

Learn next

Compose two or three simple actions by hand, distinguishing initial requirements from conditions established internally. Then check the final effects and cost against the full primitive sequence before generalizing object names into parameters.

More in Graphs and symbolic AI

  • Loss function - A loss function assigns a numerical penalty to a model's output according to a specified objective.
  • Louvain Community Detection
  • Machine reading - Machine reading is the use of AI to interpret information expressed in text and make it available for tasks such as answering questions, extracting...
  • Magic set - A magic set is an auxiliary relation used in a logic-program rewriting technique to identify which bindings are relevant to a particular query.
  • Maintaining Arc Consistency - Maintaining Arc Consistency, often abbreviated MAC, is a constraint-search strategy that restores arc consistency after each decision during backtracking.
  • Makespan - Makespan is the time at which all scheduled work has finished, measured from a specified scheduling origin.

Sources

Fikes and Nilsson, STRIPS retrospective, MACROPS context, action representation, and execution monitoring: https://ai.stanford.edu/~nilsson/OnlinePubs-Nils/PublishedPapers/stripsrevisit.pdf

Original generalized-plan publication record: https://www.sciencedirect.com/science/article/pii/0004370272900513

The original publisher's full text was unavailable in this check; the author retrospective was read. The transfer model and fictional case are original teaching examples.

Previous: Macroprogramming Next: Magic set

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer