-
Notifications
You must be signed in to change notification settings - Fork 0
Argo Hello World with JaCaMo
Examples | Tools | Wiki |
---|
In this tutorial you will learn how to import the Argo BDI-agent Architecture in a JaCaMo project and execute a Blink Project (hello world).
-
JaCaMo Framework already installed.
-
An IoT device using a serial communication channel, programmed using the Javino Blink Example.
Arduino SimulIDE Blink tutorial with Arduino Board Blink tutorial with SimulIDE
-
In a terminal command, create a Multiagent System Project, using the command below:
jacamo app create jacamoWithArgo --console
-
Include the Argo Package in the JaCaMo Project. Edit the project file jacamoWithArgo/jacamoWithArgo.jcm as follows:
mas jacamoWithArgo { agent bob: sample_agent.asl { ag-arch: jason.Argo } uses package: argo "com.github.chon-group:Argo:+" }
-
Change the file jacamoWithArgo/src/agt/sample_agent.asl including the content below:
/* Initial beliefs and rules */ serialPort(ttyACM0). /* physical Arduino Board in /dev/ttyACM0 */ //serialPort(ttyUSB0). /* physical Arduino Board in /dev/ttyUSB0 */ //serialPort(ttyEmulatedPort0). /* simulated arduino with simulIDE */ /* Initial goals */ !start. /* Plans */ +!start: serialPort(Port) <- .print("Ah, Mr. Anderson, I see you are as predictable in this world as you are in the other."); .argo.port(Port); .argo.percepts(open). +ledStatus(on) <- .print("Turning ON the Led in Arduino!"); .argo.act(ledOff). +ledStatus(off) <- .print("Turning OFF the Led in Arduino!"); .argo.act(ledOn). +port(Port,Status): Status = off | Status = timeout <- .argo.percepts(close); .print("It's not over, Mr. Anderson! It's not over!").
-
Execute the Multiagent System
jacamo jacamoWithArgo/jacamoWithArgo.mas2j
ARGO is licensed under a Creative Commons Attribution 4.0 International License. The licensor cannot revoke these freedoms as long as you follow the license terms:
- Attribution — You must give appropriate credit like below:
Pantoja, C.E., Stabile, M.F., Lazarin, N.M., Sichman, J.S. (2016). ARGO: An Extended Jason Architecture that Facilitates Embedded Robotic Agents Programming. In: Baldoni, M., Müller, J., Nunes, I., Zalila-Wenkstern, R. (eds) Engineering Multi-Agent Systems. EMAS 2016. Lecture Notes in Computer Science(), vol 10093. Springer, Cham. https://doi.org/10.1007/978-3-319-50983-9_8
BibTeX Citation
@InProceedings{ArgoAgent,
author="Pantoja, Carlos Eduardo and Stabile, M{\'a}rcio Fernando and Lazarin, Nilson Mori and Sichman, Jaime Sim{\~a}o",
editor="Baldoni, Matteo and M{\"u}ller, J{\"o}rg P. and Nunes, Ingrid and Zalila-Wenkstern, Rym",
title="{ARGO: An Extended Jason Architecture that Facilitates Embedded Robotic Agents Programming}",
booktitle="Engineering Multi-Agent Systems",
year="2016",
publisher="Springer International Publishing",
address="Cham",
pages="136--155",
isbn="978-3-319-50983-9"
doi="10.1007/978-3-319-50983-9_8"
}