For example, if the task is path planning in a robot simulation, one of the primitives might be a program that stretches the virtual robot's arm until its touch sensors encounter an obstacle. Other primitives may include various traditional AI path planners , artificial neural networks [78,42,5] or support vector machines  for classifying sensory data written into temporary internal storage, as well as instructions for repeating the most recent action until some sensory condition is met, etc.
For example, a probabilistic syntax diagram may specify high probability for executing the robot's stretch-arm primitive, given some classification of a sensory input that was written into temporary, task-specific memory by some previously invoked classifier primitive.
For example, there may be a primitive that counts the frequency of certain primitive combinations in previously frozen programs, and temporarily increases the probability of the most frequent ones. Another primitive may conduct a more sophisticated but also more time-consuming Bayesian analysis, and write its result into task-specific storage such that it can be read by subsequent primitives. Primitives for editing code may also invoke variants of Evolutionary Computation [40,67], Genetic Algorithms  and variants such as Genetic Programming [8,2], Probabilistic Incremental Program Evolution [44,45,46], Ant Colony Optimization [13,11], etc.