Gold Miners (Jomi Hübner and Rafael Bordini)
This is a simulation of a scenario similar to that used by the Multi-Agent Programming Contest. A team of gold-mining agents has to retrieve pieces of gold scatters in a grid-like territory, finding suitable paths to then take the retrieved gold to a depot. In the actual competition, two team of agents compete against each other.
Domestic Robot (Rafael Bordini and Jomi Hübner)
This is a very didactic example, although a bit complex if you are just starting with Jason. It’s based on the scenario used by Cohen & Levesque. A domestic robot is ordered by its owner to get beer from the fridge. We have also added a “supermarket” that makes deliveries of beer when the robot places an order (when there’s no beer left in the fridge), and the robot has been programmed by the Department of Health to avoid giving too much beer to its owner.
Room (Rafael Bordini)
This is the most simple, but rather didactic, example we have. There is a room and a “porter” agent. There are two other agents in the room: one is claustrophobic (so it doesn’t like it when the door is locked) and the other paranoid (so it doesn’t like it when the door is not locked). The two “personality disorder” agents keep sending contradictory requests to the poor porter, who cannot please both agents. This examples uses “open world”, even though it is very simply and use of open world wouldn’t be necessary here, it may be useful for users interested in this feature of Jason.
Sniffer (Jomi Hübner)
This is an example of architecture customisation in order to implement a sniffer agent (i.e., an agent that intercepts all messages sent between agents in the society).
Iterated Prisoner’s Dilemma (Rafael Bordini)
Contract Net Protocol (Jomi Hübner)
This is an implementation of the well-known Contract Net Protocol for task allocation in cooperative distributed problem solving.
Mining Robots (Rob Clarke and Andy Buck)
The scenario of this small Jason application is as follows. A “builder” agent is located at the centre of the grid (representing some spatial environment). That agent is doing some construction work for which it needs 3 different types of resources. There are 3 “miner agents” in the simulation, represented as black squares with A, B, and C written in them. When searching for mines, the miners search the grid exhaustively, but in different directions. Agent A goes left to right, top to bottom; agent B goes right to left, bottom to top; and agent C goes top to bottom, left to right. To represent the idea of “mining for resources”, an agent only perceives if there is resource in a cell of the grid once it is located in that particular cell. It also perceives the type of resource found in the mine. If it is the resource the agent is looking for, it grabs one unit of it and take it to the builder agent, then goes back to the position where the mine was found. Each mine has 5 units of a certain type of resource. Initially the resource type needed is known to be type 1 (shown as orange circles on the grid) and miners go after that type of resource. When a certain (random) number of units of a type has been used by the builder, it asks all agents to go after resource type 2 (shown as green circles), and then type 3 (shown as blue circles). When the construction is finished, the builder informs this to all miners who then make their way back to the builder’s location. The code in this Jason application was written by Rob Clarke and Andy Buck as 2nd coursework for the Multi-Agent Systems Module run in 2004-2005 at the University of Durham, U.K. The AgentSpeak code and planetEnv.java were edited by Rafael Bordini.
Auction (Rafael Bordini and Jomi Hübner)
This is a very simple example where auctions are announced by an auctioneer and three other agents participate in the auctions (they simply place a fixed arbitrary bid). Two of the agents eventually agree to form an alliance to win the auctions. This is an example where no environment exists. This scenario, as well as the Cleaning Robots, was used in model checking experiments by Bordini et al.
Cleaning Robots (Rafael Bordini and Jomi Hübner)
This is a very simple example, showing a robot that searches the whole grid for pieces of garbage, and when one is found, it takes it to another robot, located in the centre of the grid, where there is an incinerator; the moving robot then goes back to the place where the last piece of garbage was found and continues the search from there. It is based on the original scenario that Anand Rao used when he introduced the AgentSpeak language.
Airport Robots (Jomi Hübner)
This is an ongoing implementation of a futuristic scenario where robots work as staff in an airport, helping passengers, doing security checks, etc. (the scenario was conceived by Rafael Bordini). In its current stage, the main point of this example is to show how Jason users can customise the Agent and AgentArch classes.