Skip to main content

Agent Oriented Programming


Agent-oriented programming is a fairly new programming paradigm that supports a societal view of computation. In AOP, objects known as agents interact to achieve individual goals. Agents can exist in a structure as complex as a global internet or one as simple as a module of a common program. Agents can be autonomous entities, deciding their next step without the interference of a user, or they can be controllable, serving as a mediary between the user and another agent.
An agent, according to (Shoham, 1993) is "an entity whose state is viewed as consisting of mental components such as beliefs, capabilities, choices, and commitments". This definition is cryptic at best and useless at worst. In his paper, Shoham narrows this definition by applying the criterion of Dennet and McCarthy. Dennet recognized that many simple, inanimate objects can be viewed as falling into this framework (which he calls the intentional stance). McCarthy suggests that mental attributes should be ascribed to objects when they are "useful".
Consider, for example, the agent 'gravity'. Gravity can be viewed as an entity that is capable of applying force to objects and chooses to do so to every object it encounters. Taking the example even further, we can say that gravity can choose to apply this force in any direction and with any strength; it merely chooses to do so in a 'down' direction at 9.8m/s2 (on Earth when the second object has negligible mass compared with the first). This is not too far from the belief of many individuals before Galileo's experiments. These days, however, this view gains us nothing; it is not useful.
Consider, now, an autonomous rover on the surface of Jupiter's moon, Europa. The robot can be viewed as an agent that believes that the places with the roughest ice patches are the thinnest layers of ice. It might desire to set up drilling in those areas. It might not be capable of navigating very rocky terrain, and might therefore want to avoid such situations. These are reasonable, and possibly useful, ascriptions of mental attributes. Indeed, it might be useful to produce code with this perspective in mind. This is the reasoning behind agent-oriented programming.
Shoham suggests that an AOP system needs each of three elements to be complete :
  • A formal language with clear syntax for describing the mental state. This would likely include structure for stating beliefs (e.g. the predicate calculus), passing messages, etc. Most of the research in the field has been on this portion and stresses the semantic issues related to artificial intelligence.
  • A programming language in which to define agents. The semantics of this language should be closely related to those of the formal language. In many situations, functionality will be difficult or impossible to implement and further limitations will be introduced. We will see this in more than one case.
  • A method for converting neutral applications into agents. This sort of tool would allow an agent to communicate with a non-agent by attributing intentions much the same way as we did with the inter-planetary rover above. 

Frameworks

There are multiple AOP 'frameworks', also called agent platforms, that implement Shoham's programming paradigm. The following examples illustrate how a basic agent is programmed as a hello-world program.

JADE

For the Java-platform one of the frameworks is JADE.
Here is a very basic example of an agent that runs code
package helloworld;
import jade.core.Agent;

public class Hello extends Agent {
               
                protected void setup() {
                                System.out.println("Hello World. ");
                                System.out.println("My name is "+ getLocalName());
                }
               
                public Hello() {
                                System.out.println("Constructor called");
                }

}
At the core of JADE's AOP model is that its API supports the standard FIPA Agent Communication Language

Agent Speak (Jason)

For a literal translation of agent-oriented concepts into a scheme unobfuscated as is JADE, behind Java and Object Orientedness, Agent Speak (Jason) provides a "natural" language for agents.
               
                started.

                +started <- .print("Hello World. ").

GOAL

GOAL is an agent programming language for programming cognitive agents. GOAL agents derive their choice of action from their beliefs and goals. The language provides the basic building blocks to design and implement cognitive agents by programming constructs that allow and facilitate the manipulation of an agent's beliefs and goals and to structure its decision-making. The language provides an intuitive programming framework based on common sense or practical reasoning.

SARL Language

SARL provides the fundamental abstractions for coding multiagent systems. It uses a script-like syntax .
package helloworld
import io.sarl.core.Initialize
agent HelloWorldAgent {
        on Initialize {         
             println("Hello World.")
        }
}

Comments

Popular posts from this blog

Team Work - Meaning and Tips for better Team Work

A single brain is not always capable of making key decisions on its own. To come up with an efficient solution, an individual requires the help and advice of others. A team is established when individuals get together on a common platform with the common goal of completing a task. To guarantee optimum compatibility, team members should ideally come from similar backgrounds and have a single aim. To provide their best, the team members must complement each other and function as a single unit in tight cooperation. "There is no I in Team Work," as the saying goes, and each member must put the needs of his team first. Personal interests must take a second seat. Any team's performance is directly proportionate to the relationship between its members and their combined efforts. What is the definition of teamwork? Teamwork is defined as the sum of each team member's efforts toward the fulfilment of the team's goal. In other words, any team's backbone is its ability t

Scientists discover a new theory / The fundamental property of light – 150 years after Maxwell

Light plays a vital role in our everyday lives and technologies based on light are all around us. So we might expect that our understanding of light is pretty settled. But scientists have just uncovered a new fundamental property of light that gives new insight into the 150-year-old classical theory of electromagnetism and which could lead to applications manipulating light at the nanoscale. It is unusual for a pure-theory physics paper to make it into the journal Science. So when one does, it’s worth a closer look. In the new study, researchers bring together one of physics' most venerable set of equations – those of James Clerk’s Maxwell’s famous theory of light – with one of the hot topics in modern solid-state physics: the quantum spin Hall effect and topological insulators . To understand what the fuss is about, let’s first consider the behaviour of electrons in the quantum spin Hall effect. Electrons possess an intrinsic spin as if they were tiny spinning-tops,

19 Types Of Content Writing Services For Your Business

  It’s hard to know which type of content writing service is the best for your business.  There are so many  different types of content writing services  out there that it’s easy to get confused. You end up wondering if you’re choosing the right one for you. In this post, we’ll get rid of this confusion, once and for all. I’m going to list out the different kinds of writing services you could use.  By the end of this article, you’ll know whether you need a copywriter, a content writer, or a social media marketer and how they can help you achieve your business goals. This post is also useful for writers who want to hone their writing skills in a specific area. Let’s dive in and learn what types of content writing services exist and when you should use them. (Bonus – if you want to  hire the top 1%  of writers, go to the bottom to learn how). Types of Content Writing Services As we go through the list of content writing services, you will find that many of them overlap. That’s perfectly