Introdução ao Arduino: Fundamentos e Aplicações de Microcontroladores
Implementação de Ambientes Inteligentes com Agentes e IoT
1. Suporte à Implementação de
Ambientes Inteligentes
Gerenciados por Agentes
Cognitivos
Disciplina de Computação
Ubíqua
• 1. Federal Center for Technological Education (CEFET/RJ), Brazil
• 2. Fluminense Federal University (UFF), Brazil
Heder Dorneles 2
Carlos Eduardo Pantoja 1,2
José Viterbo 2
November 16th, 2017
2. 2Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
SOCIAL MEDIA
FOLLOW ME!
https://goo.gl/cZ6FpQ
https://goo.gl/FXcaEG
https://goo.gl/KfMtwM
https://goo.gl/VoooxE
@prof.pantoja
3. OUTLINE 1. Introdução
2. Problema
3. Objetivo
4. Estendendo o Framework Jason
5. Trabalhos Relacionados
6. Conclusão
Referências Bibliográficas
4. 4Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
1. INTRODUÇÃO: IoT
IoT
5. 5Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
1. INTRODUÇÃO: AGENTE
Agente
Conforme [Wooldridge, 2000], agentes são
componentes autônomos e
cognitivos, originados da inteligência
artificial, situados em um ambiente e
possuem uma biblioteca de planos com
possíveis ações em resposta aos estímulos
percebidos, com a finalidade de atingir
seus objetivos de projeto e modificar o
ambiente em que estão inseridos.
6. 6Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
1. INTRODUÇÃO: AGENTE ROBÓTICO
MASRobô
É um agente físico que possui [Matarić, 2007]:
1. Hardware
2. Sensores e Atuadores
3. Software (raciocínio)
4. Middleware
7. 7Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
O Jason [Bordini et al., 2007] é um
framework para desenvolvimento de
Sistemas Multi-Agentes.
Além disso, o Jason implementa em Java
um interpretador para a linguagem
orientada a agentes AgentSpeak [Rao,
1996].
O Jason é um framework amplamente
utilizado na área de desenvolvimento de
sistemas multi-agentes para a
programação de agentes de software
BDI.
1. INTRODUÇÃO: JASON
Jason by Gustave Moreau
8. 8Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
1. INTRODUÇÃO: ARGO FOR JASON
ARGO [Pantoja et al., 2016] is a Jason’s
customized architecture for programming
robotic and automated agents using
microcontrollers (ATMEGA, PIC, Intel, etc.):
• Javino [Lazarin and Pantoja, 2015]
middleware for communication between
microcontrollers and high-level software
with error detection.
• Perceptions Filters [Stabile Jr e Sichman,
2015]
Perceptions Filters reduce the amount of
information perceived by the agent at
runtime.
The Argo
by Lorenzo Costa
9. 9Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
1. INTRODUÇÃO: ARGO FOR JASON
10. 10Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
2. PROBLEMA: SMA + IoT
A
A
A
A
A
A
A
A
11. 11Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
2. PROBLEMA: SMA + IoT
A
A
A
A
A
A
A
A
SMA 1 SMA 2
12. 12Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
3. OBJETIVO
IoT Middleware
A
A C
MAS
13. 13Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
4. ESTENDENDO O JASON: COMUNICAÇÃO
14. 14Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
A
A C
C
A
MAS A MAS B
Context Net
4. ESTENDENDO O JASON: AGENTES COMUNICADORES
15. 15Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
4. ESTENDENDO O JASON: REASONING CYCLE
16. 16Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
4. ESTENDENDO O JASON: AGENTE COMUNICADOR
17. 17Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
preamble field size sender
fffe 04
4 hex 2 hex up to 256 bytes
field size
2 hex
receiver
up to 256 bytes
field size
2 hex
force
up to 256 bytes
field size
2 hex
message
up to 256 bytes
kate 03 bob 07 achieve 08 Hello CN
4. ESTENDENDO O JASON: FORMATO DE MENSAGEM
18. 18Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
RECEIVERSENDER
Add the
preamble
Calculate the
size of all
fields
Mount the
message
Send the
message
using
ContexNet
Verify the
preamble
Is Ok?
Discard
message
Verify the size
of all fields
Is Ok?
Mount a
message
Start
sending a
message
Process it as
a Jason’s
Message
End of the
processyes
yes
no
no
4. ESTENDENDO O JASON: FLUXO DA MENSAGEM
19. 19Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
RECEIVERSENDER
Add the
preamble
Calculate the
size of all
fields
Mount the
message
Verify the
preamble
Is Ok?
Discard
message
Verify the size
of all fields
Is Ok?
Mount a
message
Start
sending a
message
Process it as
a Jason’s
Message
End of the
processyes
yes
no
no
Send the
message
using
ContexNet
4. ESTENDENDO O JASON: FLUXO DA MENSAGEM
20. 20Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
RECEIVERSENDER
Add the
preamble
Calculate the
size of all
fields
Mount the
message
Verify the
preamble
Is Ok?
Discard
message
Verify the size
of all fields
Is Ok?
Mount a
message
Start
sending a
message
Process it as
a Jason’s
Message
End of the
processyes
yes
no
no
Send the
message
using
ContexNet
4. ESTENDENDO O JASON: FLUXO DA MENSAGEM
21. 21Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
RECEIVERSENDER
Add the
preamble
Calculate the
size of all
fields
Mount the
message
Verify the
preamble
Is Ok?
Discard
message
Verify the size
of all fields
Is Ok?
Mount a
message
Start
sending a
message
Process it as
a Jason’s
Message
End of the
processyes
yes
no
no
Send the
message
using
ContexNet
4. ESTENDENDO O JASON: FLUXO DA MENSAGEM
22. 22Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
RECEIVERSENDER
Add the
preamble
Calculate the
size of all
fields
Mount the
message
Verify the
preamble
Is Ok?
Discard
message
Verify the size
of all fields
Is Ok?
Mount a
message
Start
sending a
message
Process it as
a Jason’s
Message
End of the
processyes
yes
no
no
Send the
message
using
ContexNet
4. ESTENDENDO O JASON: FLUXO DA MENSAGEM
23. 23Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
RECEIVERSENDER
Add the
preamble
Calculate the
size of all
fields
Mount the
message
Verify the
preamble
Is Ok?
Discard
message
Verify the size
of all fields
Is Ok?
Mount a
message
Start
sending a
message
Process it as
a Jason’s
Message
End of the
processyes
yes
no
no
Send the
message
using
ContexNet
4. ESTENDENDO O JASON: FLUXO DA MENSAGEM
24. 24Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
RECEIVERSENDER
Add the
preamble
Calculate the
size of all
fields
Mount the
message
Verify the
preamble
Is Ok?
Discard
message
Verify the size
of all fields
Is Ok?
Mount a
message
Start
sending a
message
Process it as
a Jason’s
Message
End of the
processyes
yes
no
no
Send the
message
using
ContexNet
4. ESTENDENDO O JASON: FLUXO DA MENSAGEM
25. 25Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
RECEIVERSENDER
Add the
preamble
Calculate the
size of all
fields
Mount the
message
Verify the
preamble
Is Ok?
Discard
message
Verify the size
of all fields
Is Ok?
Mount a
message
Start
sending a
message
Process it as
a Jason’s
Message
End of the
processyes
yes
no
no
Send the
message
using
ContexNet
4. ESTENDENDO O JASON: FLUXO DA MENSAGEM
26. 26Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
RECEIVERSENDER
Add the
preamble
Calculate the
size of all
fields
Mount the
message
Verify the
preamble
Is Ok?
Discard
message
Verify the size
of all fields
Is Ok?
Mount a
message
Start
sending a
message
Process it as
a Jason’s
Message
End of the
processyes
yes
no
no
Send the
message
using
ContexNet
4. ESTENDENDO O JASON: FLUXO DA MENSAGEM
27. 27Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
RECEIVERSENDER
Add the
preamble
Calculate the
size of all
fields
Mount the
message
Verify the
preamble
Is Ok?
Discard
message
Verify the size
of all fields
Is Ok?
Mount a
message
Start
sending a
message
Process it as
a Jason’s
Message
End of the
processyes
yes
no
no
Send the
message
using
ContexNet
4. ESTENDENDO O JASON: FLUXO DA MENSAGEM
28. 28Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
RECEIVERSENDER
Add the
preamble
Calculate the
size of all
fields
Mount the
message
Verify the
preamble
Is Ok?
Discard
message
Verify the size
of all fields
Is Ok?
Mount a
message
Start
sending a
message
Process it as
a Jason’s
Message
End of the
processyes
yes
no
no
Send the
message
using
ContexNet
4. ESTENDENDO O JASON: FLUXO DA MENSAGEM
29. 29Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
RECEIVERSENDER
Add the
preamble
Calculate the
size of all
fields
Mount the
message
Verify the
preamble
Is Ok?
Discard
message
Verify the size
of all fields
Is Ok?
Mount a
message
Start
sending a
message
Process it as
a Jason’s
Message
End of the
processyes
yes
no
no
Send the
message
using
ContexNet
4. ESTENDENDO O JASON: FLUXO DA MENSAGEM
30. 30Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
• ARGO Internal Actions:
• .sendOut(receiver, force, message)
• Define uma mensagem para ser enviada a um outro nó em uma rede IoT.
4. ESTENDENDO O JASON: AÇÃO INTERNA
31. 31Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
4. ESTENDENDO O JASON: CASO 1
32. 32Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
4. ESTENDENDO O JASON: CASO 2 (IC)
33. 33Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
4. ESTENDENDO O JASON: CASO 3 (LISA CEFET)
34. 34Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
5. TRABALHOS RELACIONADOS
Smart Homes
[Kazanavicius et al., 2009]
[Andrade et al. 2016]
[Martins and Meneguzzi 2013]
[Benta et al. ,2009]
Não Usa AOPL Específica
Jade [Bellifemine , 2004]
Jason [Bordini et al., 2007]
[Martins and Meneguzzi 2014]
[Conte et al. 2009]
[Lim et al. 2009]
[Sun et al. 2013]
[Hagras et al. 2004]
[Cook et al. 2003]
[Villarrubia et al. 2014]
35. 35Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
6. CONCLUSÃO E TRABALHOS FUTUROS
Como trabalho futuro, a arquitetura será empregada em um
ambiente real, contendo diversos dispositivos utilizando
tecnologias heterogêneas. O objetivo será de criar um testbed
para automatização de experimentos e compartilhamento de
recursos, visando auxiliar na experimentação e validação de novas
propostas englobando as tecnologias de Internet das coisas e
sistemas multiagentes.
Este trabalho apresentou uma proposta para implementação de
ambientes inteligentes utilizando agentes cognitivos para o
gerenciamento de dispositivos de internet da coisas. A abordagem
proposta foi implementada utilizando-se o framework Jason para
programação de agentes e o middleware ContextNet no suporte
à comunicação e gestão de contexto.
36. 36Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
REFERÊNCIAS BIBLIOGRÁFICA
•[Barros et al., 2014] R. S. Barros, V. H. Heringer, C. E. Pantoja, N. M. Lazarin, and L. M. de Moraes. An agent-
oriented ground vehicle's automation using jason framework. In ICAART (2), pages 261-266, 2014.
•[Bordini et al. 2007] Bordini, R.H., Hubner, J.F., Wooldridge, M. Programming Multi-Agent Systems in AgentSpeak
Using Jason. John Wiley & Sons Ltd., 2007.
•[Bratman, 1987] Bratman, M. Intentions, Plans, and Practical Reason. Harvard University Press, 1987.
•[Jensen, 2010] A. S. Jensen. Implementing lego agents using jason. Disponínel em: arXiv:1010.0150, 2010.
•[Huber, 1999]Huber MJ. Jam: a bdi-theoretic mobile agent architecture. In Proceedings of the third annual
conference on Autonomous Agents, AGENTS '99, pags. 236-243, New York, 1999
•[Guinelli et al., 2016] Guinelli, J. V. ; Junger, D. S. ; Pantoja, C. E. . An Analysis of Javino Middleware for Robotic
Platforms Using Jason and JADE Frameworks. In: Workshop-Escola de Sistemas de Agentes, Seus Ambientes e
Aplicações, Maceió. Anais do X Workshop-Escola de Sistemas de Agentes, seus Ambientes e Aplicações, 2016.
•[Lazarin and Pantoja, 2015] Lazarin, N.M., Pantoja, C.E. : A robotic-Agent Platform For Embedding Software
Agents Using Raspberry Pi and Arduino Boards. In: 9th Software Agents, Environments and Applications School,
2015
37. 37Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
REFERÊNCIAS BIBLIOGRÁFICA
•[Pantoja et al., 2016a] Pantoja, C. E.; Stabile Jr, M. F. ; Lazarin, N. M. ; Sichman, J. S. ARGO: A Customized
Jason Architecture for Programming Embedded Robotic Agents. In: Workshop on Engineering Multi-Agent
Systems, 2016, Singapore. Proceedings of the Third International Workshop on Engineering Multi-Agent
Systems (EMAS 2016), 2016.
•[Pantoja et al., 2016b] Pantoja, C. E.; Stabile Jr, M. F. ; Lazarin, N. M. ; Sichman, J. S. . ARGO: An Extended
Jason Architecture that Facilitates Embedded Robotic Agents Programming. In: Lecture Notes in Artificial
Intelligence, 2016.
•[Rao 1996] Rao, A.S.: AgentSpeak(L): BDI agents speak out in a logical computable language. In: de
Velde,W.V., Perram, J.W. (eds.) Proceedings of the 7th European workshop on Modelling autonomous
agents in a multi-agent world. Lecture Notes in Artificial Intelligence, vol. 1038, pp. 42-55. Springer-Verlag,
Secaucus. USA, 1996.
•[Stabile Jr. and Sichman, 2015] Stabile Jr., M.F., Sichman, J.S. Evaluating Perception Filters In BDI Jason
Agents. In: 4th Brazilian Conference On Intelligent Systems, 2015.
•[Winikoff, 2005] Winikoff M. Jack intelligent agents: An industrial strength platform. Em Bordini R, Dastani
M, Dix J, Fallah AS, Weiss G, editors. Multi-Agent Programming, volume 15 of Multiagent Systems, Articial
Societies, and Simulated Organizations, pags. 175-193. Springer US, 2005.
38. 38Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
REFERÊNCIAS BIBLIOGRÁFICA
•[Wooldridge, 2000] Wooldridge, M. Reasoning about rational agents. Intelligent robotics and autonomous
agents. MIT Press, 2000.
•[Wooldridge, 2009] Wooldridge M. An Introduction to MultiAgent Systems. John Wiley & Sons, 2009.
•[Zambonelli et al., 2001] Zambonelli F, Jennings NR, Omicini A, Wooldridge M. Agent-Oriented Software
Engineering for Internet Applications. In: Omicini A, Zambonelli F, Klusch M, Tolksdorf R, editors.
Coordination of Internet Agents. Springer Verlag; 2001. p.326-345, 2001
•[Wei and Hindricks, 2001] Wei, C., Hindriks, K.V. (2013) An agent-based cognitive robot architecture. In:
Programming Multi-Agent Systems, LNCS, vol. 7837, pp. 54–71. Springer, Berlin.
•[Soriano et al., 2001] Soriano, A.; Marín, L.; Valera, Á.; Vallés M. (2013) “Multi-Agent Systems
Integration in Embedded Systems with Limited Resources to Perform Tasks of Coordination and
Cooperation”. In: Proceedings of 10th International Conference on Informatics in Control, Automation and
Robotics , pp. 140 - 147, Reykjavik.
•[Pantoja et al., 2016c] Pantoja, C. E.; Jesus, V. S. ; Viterbo Filho, J. . Aplicando Sistemas Multi-Agentes
Ubíquos em um Modelo de Smart Home Usando o Framework Jason. In: 2º Workshop de Pesquisa e
Desenvolvimento em Inteligência Artificial, Inteligência Coletiva e Ciência de Dados, 2016, Niterói/RJ.
39. 39Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
REFERÊNCIAS BIBLIOGRÁFICA
•[Andrade et al. 2016] Andrade, J. P. B., Oliveira, M., Gonçalves, E. J. T., and Maia, M. E. F. (2016). Uma
Abordagem com Sistemas Multiagentes para Controle Autônomo de Casas Inteligentes. In XIII Encontro
Nacional de Inteligência Artificial e Computacional (ENIAC).
•[Conte et al. 2009] Conte, G., Morganti, G., Perdon, A. M., and Scaradozzi, D. (2009). Multi-agent system theory
for resource management in home automation systems. Journal of Physical Agents, 3(2):15–19.
•[Cook et al. 2003] Cook, D. J., Youngblood, G. M., Heierman III, E. O., Gopalratnam, K., Rao, S., Litvin, A., and
Khawaja, F. (2003). Mavhome: An agent-based smart home. In PerCom, volume 3, pages 521–524.
•[Hagras et al. 2004] Hagras, H., Callaghan, V., Colley, M., Clarke, G., Pounds-Cornish, A., and Duman, H. (2004).
Creating an ambient-intelligence environment using embedded agents. IEEE Intelligent Systems, 19(6):12–20.
•[Kazanavicius et al. 2009] Kazanavicius, E., Kazanavicius, V., and Ostaseviciute, L. (2009). Agent-based
framework for embedded systems development in smart environments. In Proceedings of International
Conference on Information Technologies (IT 2009), Kaunas.
•[Lim et al. 2009] Lim, C., Anthony, P., and Fan, L. (2009). Applying multi-agent system in a context aware.
Borneo Sci, 24:53–64.
40. 40Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
REFERÊNCIAS BIBLIOGRÁFICA
•[Benta et al. 2009] Benta, K.-I., Hoszu, A., Vacariu, L., and Cret, O. (2009). Agent based smart house platform
with affective control. In Proceedings of the 2009 Euro American Conference on Telematics and Information
Systems: New Opportunities to increase Digital Citizenship, page 18. ACM.
•[Chaouche et al. 2014] Chaouche, A.-C., Seghrouchni, A. E. F., Ilie, J.-M., and Saıdouni, D. E. (2014). A
higherorder agent model with contextual planning management for ambient systems. In Transactions on
Computational Collective Intelligence XVI, pages 146–169. Springer.
•[Martins and Meneguzzi 2013] Martins, R. and Meneguzzi, F. (2013). A smart home model to demand side
management. In Workshop on Collaborative Online Organizations (COOS13)@AAMAS.
•[Martins and Meneguzzi 2014] Martins, R. and Meneguzzi, F. (2014). A smart home model using jacamo
framework. In 2014 12th IEEE International Conference on Industrial Informatics (INDIN). IEEE.
•[Sun et al. 2013] Sun, Q., Yu, W., Kochurov, N., Hao, Q., and Hu, F. (2013). A multi-agent-based intelligent sensor
and actuator network design for smart house and home automation. Journal of Sensor and Actuator Networks,
2(3):557–588.
•[Villarrubia et al. 2014] Villarrubia, G., De Paz, J. F., Bajo, J., and Corchado, J. M. (2014). Ambient agents:
embedded agents for remote control and monitoring using the pangea platform. Sensors, 14(8):13955–13979.
41. 41Suporte à Implementação de Ambientes Inteligentes Gerenciados por Agentes Cognitivos
AGRADECIMENTOS
OBRIGADO!
pantoja@cefet-rj.br
heder.to@ic.uff.br
viterbo@ic.uff.br