ArticleslgStudy

mathematics

Event calculus

Event calculus is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Event calculus rather than just read about it. In short: The event calculus is a logical theory for representing and reasoning about events and about the way in which they change the state of some real or artificial world. It deals both with action events, which are performed by agents, and with external events, which are outside the control of any agent.

Key takeaways

  • Event calculus belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Event calculus to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Event calculus from memory before moving on to harder problems.

Reference excerpt

The event calculus is a logical theory for representing and reasoning about events and about the way in which they change the state of some real or artificial world. It deals both with action events, which are performed by agents, and with external events, which are outside the control of any agent. The event calculus represents the state of the world at any time by the set of all the facts (called fluents) that hold at the time. Events initiate and terminate fluents:

The event calculus differs from most other approaches for reasoning about change by reifying time, associating events with the time at which they happen, and associating fluents with the times at which they hold. The original version of the event calculus, introduced by Robert Kowalski and Marek Sergot in 1986, was formulated as a logic program and developed for representing narratives and database updates. Kave Eshghi showed how to use the event calculus for planning, by using abduction to generate hypothetical actions to achieve a desired state of affairs. It was extended by Murray Shanahan and Rob Miller in the 1990s and reformulated in first-order logic with circumscription. These and later extensions have been used to formalize non-deterministic actions, concurrent actions, actions with delayed effects, gradual changes, actions with duration, continuous change, and non-inertial fluents. Van Lambalgen and Hamm showed how a formulation of the event calculus as a constraint logic program can be used to give an algorithmic semantics to tense and aspect in natural language.

Fluents and events In the event calculus, fluents are reified. This means that fluents are represented by terms. For example, ℎ𝑜𝑙𝑑𝑠𝐴𝑡(on(green_block,table),1) expresses that the 𝑔𝑟𝑒𝑒𝑛_𝑏𝑙𝑜𝑐𝑘 is on the 𝑡𝑎𝑏𝑙𝑒 at time 1. Here ℎ𝑜𝑙𝑑𝑠𝐴𝑡 is a predicate, while 𝑜𝑛(𝑔𝑟𝑒𝑒𝑛_𝑏𝑙𝑜𝑐𝑘,𝑡𝑎𝑏𝑙𝑒) is a term. In general, the atomic formula

ℎ𝑜𝑙𝑑𝑠𝐴𝑡(fluent,time) expresses that the 𝑓𝑙𝑢𝑒𝑛𝑡 holds at the 𝑡𝑖𝑚𝑒. Events are also reified and represented by terms. For example, ℎ𝑎𝑝𝑝𝑒𝑛𝑠𝐴𝑡(move(green_block,red_block),3) expresses that the 𝑔𝑟𝑒𝑒𝑛_𝑏𝑙𝑜𝑐𝑘 is moved onto the 𝑟𝑒𝑑_𝑏𝑙𝑜𝑐𝑘) at time 3. In general:

ℎ𝑎𝑝𝑝𝑒𝑛𝑠𝐴𝑡(event,time) expresses that the 𝑒𝑣𝑒𝑛𝑡 happens at the 𝑡𝑖𝑚𝑒. The relationships between events and the fluents that they initiate and terminate are also represented by atomic formulae:

𝑖𝑛𝑖𝑡𝑖𝑎𝑡𝑒𝑠(event,fluent,time) expresses that if the 𝑒𝑣𝑒𝑛𝑡 happens at the 𝑡𝑖𝑚𝑒 then the 𝑓𝑙𝑢𝑒𝑛𝑡 becomes true after the 𝑡𝑖𝑚𝑒. 𝑡𝑒𝑟𝑚𝑖𝑛𝑎𝑡𝑒𝑠(event,fluent,time) expresses that if the 𝑒𝑣𝑒𝑛𝑡 happens at the 𝑡𝑖𝑚𝑒 then the 𝑓𝑙𝑢𝑒𝑛𝑡 ceases to be true after the 𝑡𝑖𝑚𝑒.

Domain-independent axiom The event calculus was developed in part as an alternative to the situation calculus, as a solution to the frame problem, of representing and reasoning about the way in which actions and other events change the state of some world. There are many variants of the event calculus. But the core axiom of one of the simplest and most useful variants can be expressed as a single, domain-independent axiom:

ℎ𝑜𝑙𝑑𝑠𝐴𝑡(F,T2)← [ℎ𝑎𝑝𝑝𝑒𝑛𝑠𝐴𝑡(E1,T1)∧𝑖𝑛𝑖𝑡𝑖𝑎𝑡𝑒𝑠(E1,F,T1)∧(T1<T2)∧ ¬∃E2,T[ℎ𝑎𝑝𝑝𝑒𝑛𝑠𝐴𝑡(E2,T)∧𝑡𝑒𝑟𝑚𝑖𝑛𝑎𝑡𝑒𝑠(E2,F,T)∧(T1≤T<T2)] The axiom states that

a fluent F holds at a time T2 if an event E1 happens at a time T1 and E1 initiates F at T1 and T1 is before T2 and it is not the case that there exists an event E2 and a time T such that E2 happens at T and E2 terminates F at T and T1 is before or at the same time as T and T is before T2. The event calculus solves the frame problem by interpreting this axiom in a non-monotonic logic, such as first-order logic with circumscription or, as a logic program, in Horn clause logic with negation as failure. In fact, circumscription is one of the several semantics that can be given to negation as failure, and it is closely related to the completion semantics for logic programs (which interprets if as if and only if). The core event calculus axiom defines the holdsAt predicate in terms of the happensAt, initiates, terminates, < and ≤ predicates. To apply the event calculus to a particular problem, these other predicates also need to be defined. The event calculus is compatible with different definitions of the temporal predicates < and ≤. In most applications, times are represented discretely, by the natural numbers, or continuously, by non-negative real numbers. However, times can also be partially ordered.

Domain-dependent axioms To apply the event calculus in a particular problem domain, it is necessary to define the initiates and terminates predicates for that domain. For example, in the blocks world domain, an event move(Object,Place) of moving an object onto a place initiates the fluent on(Object,Place), which expresses that the object is on the place and terminates the fluent on(Object,Place1), which expresses that the object is on a different place:

𝑖𝑛𝑖𝑡𝑖𝑎𝑡𝑒𝑠(move(Object,Place),on(Object,Place),Time). 𝑡𝑒𝑟𝑚𝑖𝑛𝑎𝑡𝑒𝑠(move(Object,Place),on(Object,Place1),Time)←different(Place1,Place). If we want to represent the fact that a Fluent holds in an initial state, say at time 1, then with the simple core axiom above we need an event, say initialise(Fluent), which initiates the Fluent at any time:

𝑖𝑛𝑖𝑡𝑖𝑎𝑡𝑒𝑠(initialise(Fluent),Fluent,Time).

Problem-dependent axioms To apply the event calculus, given the definitions of the holdsAt, initiates, terminates, < and ≤ predicates, it is necessary to define the happensAt predicates that describe the specific context of the problem. For example, in the blocks world domain, we might want to describe an initial state in which there are two blocks, a red block on a green block on a table, like a toy traffic light, followed by moving the red block to the table at time 1 and moving the green block onto the red block at time 3, turning the traffic light upside down:

ℎ𝑎𝑝𝑝𝑒𝑛𝑠𝐴𝑡(initialise(on(red_block,green_block),0) ℎ𝑎𝑝𝑝𝑒𝑛𝑠𝐴𝑡(initialise(on(green_block,table),0) ℎ𝑎𝑝𝑝𝑒𝑛𝑠𝐴𝑡(move(red_block,table),1) ℎ𝑎𝑝𝑝𝑒𝑛𝑠𝐴𝑡(move(green_block,red_block),3)

A Prolog implementation The event calculus has a natural implementation in pure Prolog (without any features that do not have a logical interpretation). For example, the blocks world scenario above can be implemented (with minor modifications) by the program:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Event calculus

Start with the simplest possible case. Write down what Event calculus claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Event calculus before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Event calculus ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Event calculus

In research
Event calculus appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Event calculus in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Event calculus is common in secondary-school and first-year university syllabi. It links to neighbouring topics 1986 introductions, Knowledge representation, Logic in computer science, so understanding it makes those chapters shorter.
In everyday life
Look for Event calculus outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Event calculus” →

How to study Event calculus in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Event calculus means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Event calculus out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Event calculus in simple terms?

The event calculus is a logical theory for representing and reasoning about events and about the way in which they change the state of some real or artificial world. It deals both with action events, which are performed by agents, and with external events, which are outside the control of any agent.

Why does Event calculus matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Event calculus?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Event calculus.

Tags

  • 1986 introductions
  • Knowledge representation
  • Logic in computer science
  • Logic programming
  • Logical calculi

Keep exploring