Multi-agent domestic robot environment documentation ---------------------------------------------------- * Acknowledgment: based on Domestic-Robot by Tristan Behrens as supplied with the GOAL platform. * Environment description A domestic robot has the goal of serving beer to its owner. In order to do so, the robot goes to the fridge, takes out a bottle of beer, and brings it to the owner. Multiple robots can co-operate to improve the efficiency and performance of the system. If a robot has to move a large distance holding a beer, the beer might fall. However, if a beer is transferred between two robots, it might also fall. The optimal number of agents for this task therefore varies according to the probabilities of the two fall events. This multi-agent system is based on an implementation by Tristan Behrens following the specification in Chapter 3 of "Programming Multi-Agent Systems in AgentSpeak using Jason" by Rafael H. Bordini, Jomi Fred Hübner and Michael Wooldridge, Wiley (2007). The agent as described in this book is inspired by the robot Willie in the paper "Intention is choice with commitment" by Philip R. Cohen and Hector J. Levesque, Artificial Intelligence 42(3), 1990, pp. 213 − 261. The agent in the paper is in turn very loosely based on the book "The Galactic Pot Healer" by Philip K. Dick (1969), in which the robot is actually called Willis. Quote: "I'm amazingly glad to see you," the robot declared. "In the center of my chest you will probably see the word 'Willis' stenciled. I am programmed to respond to any instruction beginning with that word." [...] "Take us there," Joe said. "No," Willis said, "you have to say, 'Willis, take us there.'" "Willis, take us there." "Yes, Mr. Fernwright." The robot led them across the foyer to the elevators. End quote. * Jar-file: domesticn.jar * Entities: 10 robots, one owner, and one supermarket * Actions - for robot entities: - open(fridge) - get(beer) - close(fridge) - hand_in(beer) - move_towards(Place,ID,N) - move_towards(X,Y,ID,N) - transfer_out(A,B,N) - for entity owner - sip(beer) - for entity supermarket - deliver(beer,N) The action get(beer) can only be used to retrieve a bottle from the fridge. A robot cannot perform a get action on another agent. Insted, the other agent has to perform a transfer_out action. The robots can move to an object, which is the fridge, the owner, or another agent, in which case the full name of the other agent must be specified (i.e., robot0 to robot9). Alternatively, the robots can move towards a coordinate in the grid. Both types of the move_towards action require the index of the action performing agent (0..9) as parameter ID, and the success indicator (either 0 or 1) as parameter N. As a result of the move_towards action the robot will move one step (horizontally, vertically or diagonally) towards the goal. The transfer_out action transfers a bottle from agent A to agent B (full names must be specified) with success indicator N. * Percepts - at(R,Place): Robot R (full name) will perceive either at(R,fridge) or at(R,owner), or of course no at(R,Place) percept at all (in case it is in neither of those places). - at(R,X,Y): If a robot is neither at the fridge nor at the owner, it will receive an at percept speficying its current location as coordinates on the grid. - obtained(N): a robot will perceive a bottle transferred to him by another agent using the transfer_out action. The variable N is used as a numerical identifier for the transfer action. This percept is continuously generated until a new succesful transfer is performed. - adjacent(A,B): Robot A will perceive to be adjacent to robot B (full names) when the robots are located on neighboring squares (horizontally, vertically or diagonally). - finished(delivery): All agents (including the owner and the supermarket) will perceive this percept when the fridge is empty and no robot is carrying a bottle. - stock(beer,N): when the fridge is open, the robots will perceive how many beers are stored in the fridge (the quantity is represented by the variable N). - has(owner,beer): is perceived by the robots and the owner when the owner has a (non-empty) bottle of beer. * Environment-management Agents operate on a 20*20 square grid. The fridge is located at (0,0) and the owner is located at (19,19). All 10 agents will always be positioned on the left of the environment. The fridge is displayed with a capital letter F followed by the current number of bottles in the fridge. The initial number of bottles is 10. The owner is displayed with a capital letter O followed by the number of bottles succesfully received from the robots. The environment supports INIT commands with two parameters: n=[1..10] for the number of active agents and gui={on,off} which controls visibility of the graphical interface. The first parameter controls how many agents will receive percepts. The second parameter controls visibility and speed: if the gui is visible a 100ms delay is used after every agent action to facilitate visual monitoring. Without the gui no delay is used, which is more convenient for batch processing. The gui displays robot agents in different colors: yellow when not carrying a bottle, orange when carrying a bottle and red when recently having dropped a bottle. The environment displays a message in the console when a bottle is dropped (during move or during transfer) and when the delivery is finished.