/About/About Jazzyk

About Jazzyk

Motivation

Different application domains require different knowledge representation techniques. Agent designers should therefore be able to easily exploit benefits of various knowledge representation technologies in a single agent system. Jazzyk was designed to exploit power of heterogeneous knowledge representation (KR) technologies in a single agent system.

Brief description

Jazzyk is an experimental, special-purpose programming language for development of knowledge intensive (intelligent) agent systems. Jazzyk agent consist of

Features

Underlying theory

Jazzyk is a concrete implementation of the theoretical computational model of Behavioural State Machines (BSM) we developed in the course of our research at Computational Inteligence Group at Clausthal University of Technology. Behavioural State Machines can be seen as an adaptation of the computational model of a well studied model of Gurevich’s Abstract State Machines.

An agent system modeled according to the model of Behavioural State Machines consists of a set of KR modules interactions of which are governed by a rule-based program encoding agent’s behaviours. BSM takes a radical behaviourist stance to design of agent’s behaviours: also internal interactions between agent’s internal components are considered an action worth an explicit expression in the corresponding agent program.

Each Jazzyk KR module encapsulates a distinct instance of an implemented KR technology possibly featuring its own reasoning and inference mechanisms and its own internal semantics, which is not constrained by the Jazzyk semantics. A KR module is required only to provide a simple generic interface consisting of a set of query and update operations which can be invoked from an agent program.

Theory of Behavioural State Machines, and in turn also Jazzyk, draws a strict distinction between agent’s knowledge representational and behavioural aspects. While an agent’s deliberation abilities reside in its KR modules, its behaviour is encoded as a Behavioural State Machine.

More on the underlying theory of BSM and Jazzyk can be found in the original paper An Open Agent Architecture: Fundamentals published as a technical report No. IfI-07-10 of Department of Informatics of Clausthal University of Technology.

Example

Consider a sample Jazzyk agent program:

declare module brain as prolog
declare module body as 3dsimulation

notify brain on initialize [{
    update_to_wall(X) :- 
        retract(dist_to_wall(_), 
        assert(dist_to_wall(X)).

    nearWall :- 
        dist_to_wall(X),
        X < 50.
}]

when sense body (Dist) [{ sonar distance_to_wall Dist }] 
then update brain (Dist) [{ update_to_wall(Dist)) }] 
;
when query brain [{nearWall}] then
{
    act first [{move backward 2}]
    ,
    act first [{rotate left 45}]
} else 
{
    act first [{move forward 3}]
}

The program above realizes a simple agent which uses Prolog knowledge base to store its beliefs and which is embodied in a simulated 3D environment.

The agent interacts with its environment is via a specialized KR module 3dsimulation. The belief base of the agent brain is realized by a Prolog-based KR module. The agent is equipped with a sonar and can move and turn. The belief base can store the current distance to the wall and can infer whether it is standing in front of a wall, or not.

At the beginning, the components of the agent are declared and labelled by identifiers brain and body. The agent’s belief base is initialized with a simple Prolog program using a declaration of a notification event, which is performed just before the agent program is about to be executed.

The agent program itself consists of a non-deterministic choice of two, so called, mental state transformers (mst) in a form of rules connected by a choice operator `;’ which encodes a non-deterministic choice. That means, that in each step of agent’s execution, one of the two mst’s is non-deterministically chosen and executed.

The first mst encodes agent’s perception. The agent senses its distance to the wall in front and stores this distance in its belief base. The second mst is a compound structure consiting of two cases. If the query (the agent believes it is near a wall) is true, the agent executes a sequence of primitive mst’s joined by a sequence operator `,’, i.e. 1) steps two steps backward and 2) then turns left by 45 degrees. In the case it does not believe it does not stand in front of a wall, it simply makes 3 steps forward.

Implicitely, an agent program can be visualized as a tree with internal nodes of two types: CHOICE and SEQUENCE, and with primitive mental state transformers (updates of some KR module) as leafs. After some primitive update is performed, the interpretation of the agent program starts from the beginning again.

History

Jazzyk was developed in a frame of a PhD. research of Peter Novák. To clarify the motivation behind development of Jazzyk, we briefly discuss the history of the project. It outlines also the future directions along which this experimental language will evolve and the setting in which we will use it.

Motivation and early considerations

The original motivation was to put the theory of Dynamic Logic Programming (see e.g. Leite 2003, or Eiter et. al. 2005), or also labelled Evolving Knowledge Bases, under a practical test in a challenging domain of multi-agent systems. The general setup is an agent using a belief base expressed in a form of a logic program meaning of which is established using Answer Set Programming (ASP) (i.e. Stable Model Semantics of logic programs).

The primary intention was to re-use and adapt some state-of-the-art existing BDI based agent-oriented programming language and embed ASP solver into an agent’s belief base.

However, soon we realized that it won’t work in a straightforward manner. Even though many state-of-the-art agent oriented programming langauges support computational logic based knowledge representation within an agent, their structure is bound to a particular KR technology of choice. Usually the employed KR technology was an embedded Prolog interpreter. In consequence representation of certain information about the agent’s environment (e.g. think of a map of a city) might become quite unnatural and tricky. Therefore a need to design a simple, yet clear programming language supporting heterogeneous KR technologies arose.

Modular BDI Architecture

Modular BDI Architecture was the first attempt to tackle the problem outlined above. The resulting paper was published in 2006 at Fifth International Joint Conference on Autonomous Agents and Multiagent Systems. The architecture of an agent was derived from the BDI architecture, however the agent’s component for belief base, base of desires and base of intentions were moved to plug-ins, similar to Jazzyk KR modules. However, the programming language for agent’s intelligence facilitating interactions between the BDI components was very plain and not suitable for a practical use. Rules featured the plain form of “Query—> Update”.

This naturally implied a need for a higher level structures supporting source code modularity and easier maintainability of agent programs.

Jazzyk, Jazzbot and future work

After some attempts in later 2006 and later in 2007 (see publications) we finally developed the computational model of Behavioural State Machines and finished the implementation of the Jazzyk interpreter. To motivate and drive the development and testing of the interpreter itself, as well as its underlying theory we started Jazzbot project aiming at development of a non-trivial bot operating in a 3D simulated environment of a computer game Nexuiz based on a well known Quake game engine.

Experiments and attempts to implement an inteligent bot for this challenging environment will drive the future development of higher level structures of Jazzyk programming language. We plan to study formal specification methods based on fragments of temporal modal logics which can be easily translated to the syntax of plain Jazzyk mental state transformers.