(eds.) distributed computing and artificial intelligence

65
123 ADVANCES IN INTELLIGENT SYSTEMS AND COMPUTING 217 Distributed Computing and Artificial Intelligence 10th International Conference Sigeru Omatu José Neves Juan M. Corchado Rodríguez Juan F. De Paz Santana Sara Rodríguez González (Eds.)

Upload: others

Post on 10-Jan-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

123

ADVANCES IN INTELLIGENT SYSTEMS AND COMPUTING 217

Distributed Computingand Artificial Intelligence10th International Conference

Sigeru OmatuJosé NevesJuan M. Corchado RodríguezJuan F. De Paz SantanaSara Rodríguez González (Eds.)

Advances in Intelligent Systems and Computing

Volume 217

Series Editor

J. Kacprzyk, Warsaw, Poland

For further volumes:http://www.springer.com/series/11156

Sigeru Omatu · José NevesJuan M. Corchado RodríguezJuan F. De Paz SantanaSara Rodríguez GonzálezEditors

Distributed Computingand Artificial Intelligence

10th International Conference

ABC

EditorsSigeru OmatuGraduate School of EngineeringOsaka Prefecture UniversityOsakaJapan

José NevesDepartment of Computing ScienceUniversity of MinhoBraga CodexPortugal

Juan M. Corchado RodríguezDepartment of Computing Science and

ControlFaculty of ScienceUniversity of SalamancaSalamancaSpain

Juan F. De Paz SantanaDepartment of Computing Science and

ControlFaculty of ScienceUniversity of SalamancaSalamancaSpain

Sara Rodríguez GonzálezDepartment of Computing Science and

ControlFaculty of ScienceUniversity of SalamancaSalamancaSpain

ISSN 2194-5357 ISSN 2194-5365 (electronic)ISBN 978-3-319-00550-8 ISBN 978-3-319-00551-5 (eBook)DOI 10.1007/978-3-319-00551-5Springer Cham Heidelberg New York Dordrecht London

Library of Congress Control Number: 2013937503

c© Springer International Publishing Switzerland 2013This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part ofthe material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,broadcasting, reproduction on microfilms or in any other physical way, and transmission or informationstorage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodologynow known or hereafter developed. Exempted from this legal reservation are brief excerpts in connectionwith reviews or scholarly analysis or material supplied specifically for the purpose of being enteredand executed on a computer system, for exclusive use by the purchaser of the work. Duplication ofthis publication or parts thereof is permitted only under the provisions of the Copyright Law of thePublisher’s location, in its current version, and permission for use must always be obtained from Springer.Permissions for use may be obtained through RightsLink at the Copyright Clearance Center. Violationsare liable to prosecution under the respective Copyright Law.The use of general descriptive names, registered names, trademarks, service marks, etc. in this publicationdoes not imply, even in the absence of a specific statement, that such names are exempt from the relevantprotective laws and regulations and therefore free for general use.While the advice and information in this book are believed to be true and accurate at the date of pub-lication, neither the authors nor the editors nor the publisher can accept any legal responsibility for anyerrors or omissions that may be made. The publisher makes no warranty, express or implied, with respectto the material contained herein.

Printed on acid-free paper

Springer is part of Springer Science+Business Media (www.springer.com)

Preface

The International Symposium on Distributed Computing and Artificial Intelligence2013 (DCAI 2013) is a forum to present applications of innovative techniques forsolving complex problems. Artificial intelligence is changing our society. Its appli-cation in distributed environments, such as the internet, electronic commerce, en-vironment monitoring, mobile communications, wireless devices, distributed com-puting, to mention only a few, is continuously increasing, becoming an element ofhigh added value with social and economic potential, in industry, quality of lifeand research. These technologies are changing constantly as a result of the large re-search and technical effort being undertaken in both universities and businesses. Theexchange of ideas between scientists and technicians from both the academic andindustry sector is essential to facilitate the development of systems that can meet theever-increasing demands of today’s society. The present edition brings together pastexperience, current work and promising future trends associated with distributedcomputing, artificial intelligence and their application in order to provide efficientsolutions to real problems.

This conference is a stimulating and productive forum where the scientific com-munity can work towards future cooperation in Distributed Computing and ArtificialIntelligence areas. Nowadays it is continuing to grow and prosper in its role as oneof the premier conferences devoted to the quickly changing landscape of distributedcomputing, artificial intelligence and the application of AI to distributed systems.This year’s technical program will present both high quality and diversity, withcontributions in well-established and evolving areas of research. Specifically, 101papers were submitted from over 19 different countries (Colombia, Czech Repub-lic, Finland, France, Germany, Greece, Italy, Japan, Libya, Mauritius, Mexico, Mo-rocco, Poland, Portugal, Romania, Slovakia, Spain, Thailand, Tunisia), representinga truly “wide area network” of research activity. The DCAI’13 technical programhas selected 75 papers. As in past editions, it will be special issues in journals suchas Journal of Artificial Intelligence (IJAI), the International Journal of Imaging andRobotics (IJIR) and the International Journal of Interactive Multimedia and Artifi-cial Intelligence (IJIMAI). These special issues will cover extended versions of themost highly regarded works.

VI Preface

This symposium is organized by the Bioinformatics, Intelligent System andEducational Technology Research Group (http://bisite.usal.es/) of the University ofSalamanca. The present edition was be held in Salamanca, Spain, from 22nd to 24thMay 2013.

We thank the sponsors (Telefónica Digital, Indra, INSA, Ingeniería de SoftwareAvanzado S.A., IBM, JCyL, IEEE Systems Man and Cybernetics Society Spain,AEPIA Asociación Española para la Inteligencia Artificial, APPIA Associação Por-tuguesa Para a Inteligência Artificial, CNRS Centre national de la recherche scien-tifique), the Local Organization members and the Program Committee members fortheir hard work, which was essential for the success of DCAI’13.

Salamanca Sigeru OmatuMay 2013 José Neves

Juan M. Corchado RodríguezJuan F. De Paz Santana

Sara Rodríguez González (Eds.)

Organization

General Chairs

Ajith Abraham Norwegian University of Science and TechnologyJuan M. Corchado University of Salamanca (Spain)James Llinas State University of New York (USA)José M. Molina Universidad Carlos III de Madrid (Spain)Andre Ponce de Leon University of Sao Paulo at Sao Carlos (Brazil)

Scientific Chair

Sigeru Omatu (Chairman) Osaka Institute of Technology (Japan)José Neves (Chairman) Universidade do Minho, Braga (Portugal)

Organizing Committee

Jesús García Herrero University Carlos III of Madrid (Spain)Juan M. Corchado (Chairman) University of Salamanca(Spain)Sara Rodríguez (Co-Chairman) University of Salamanca (Spain)Juan F. De Paz (Co-Chairman) University of Salamanca (Spain)Javier Bajo Polytechnic University of Madrid (Spain)Dante I. Tapia University of Salamanca (Spain)Fernando de la Prieta Pintado University of Salamanca (Spain)Davinia Carolina

Zato Domínguez University of Salamanca (Spain)Gabriel Villarrubia González University of Salamanca (Spain)Alejandro Sánchez Yuste University of Salamanca (Spain)Antonio Juan Sánchez Martín University of Salamanca (Spain)Cristian I. Pinzón University of Salamanca (Spain)Rosa Cano University of Salamanca (Spain)Emilio S. Corchado University of Salamanca (Spain)

VIII Organization

Eugenio Aguirre University of Granada (Spain)Manuel P. Rubio University of Salamanca (Spain)Belén Pérez Lancho University of Salamanca (Spain)Angélica González Arrieta University of Salamanca (Spain)Vivian F. López University of Salamanca (Spain)Ana de Luís University of Salamanca (Spain)Ana B. Gil University of Salamanca (Spain)Ma Dolores Muñoz Vicente University of Salamanca (Spain)

Scientific Committee

Zbigniew Pasek IMSE/University of Windsor (Canada)Adriana Giret Politechnich University of Valencia (Spain)Alberto Fernández University Rey Juan Carlos (Spain)Álvaro Herrero University of Burgos (Spain)Ana Carolina Lorena Federal University of ABC (Brazil)Andre Coelho University of Fortaliza (Brazil)Ângelo Costa University of Minho (Portugal)Antonio Moreno University Rovira y Virgili(Spain)Antonio Pereira Instituto Politécnico de Leiria (Portugal)Araceli Sanchís University Carlos III of Madrid (Spain)Ayako HIRAMATSU Osaka Sangyo University (JAPAN)B. Cristina Pelayo

García-Bustelo University of Oviedo (Spain)Bianca Innocenti University of Girona (Spain)Bogdan Gabrys Bournemouth University (UK)Bruno Baruque University of Burgos (Spain)Carina González University of La Laguna (Spain)Carlos Carrascosa Politechnich University of Valencia (Spain)Carmen Benavides University of Leon (Spain)Daniel Glez-Peña University of Vigo (Spain)David Griol Barres University Carlos III of Madrid (Spain)Davide Carneiro University of Minho (Portugal)Dídac Busquets University of Girona (Spain)Dongshik KANG Ryukyu University (JAPAN)Eladio Sanz Unversity of Salamanca (Spain)Eleni Mangina University College Dublin (Ireland)Emilio Corchado University of Burgos (Spain)Eugenio Aguirre University of Granada (Spain)Eugénio Oliveira University of Porto (Portugal)Evelio J. González University of La Laguna (Spain)Faraón Llorens Largo University of Alicante (Spain)Fernando Díaz Univesity of Valladolid (Spain)Fidel Aznar Gregori University of Alicante (Spain)Florentino Fdez-Riverola University of de Vigo (Spain)

Organization IX

Francisco Pujol López Polytechnic University of Alicante (Spain)Grzegorz Bocewicz -Koszalin University of technology (Poland)Helder Coelho University of Lisbon (Portugal)Ichiro Satoh Thammasat University (Japan)Ivan López Arévalo Lab. of Information Technology

Cinvestav-(Mexico)Jamal Dargham University of Malaysia, Saba, (Malaysia)Javier Carbó University Carlos III of Madrid (Spain)Javier Martínez Elicegui Telefónica I+D (Spain)Jesús García Herrero University Carlos III of Madrid (Spain)Joao Gama University of Porto (Portugal)Johan Lilius Åbo Akademi University (Finland)José R. Villar University of Oviedo (Spain)Juan A. Botia University of Murcia (Spain)Juan Pavón Complutense University of Madrid (Spain)José M. Molina University Carlos III of Madrid (Spain)José R. Méndez University of Vigo (Spain)José V. Álvarez-Bravo University of Valladolid (Spain)Joseph Giampapa Carnegie Mellon (USA)Juan Manuel Cueva Lovelle University of Oviedo (Spain)Juan Gómez Romero University Carlos III of Madrid (Spain)Kazutoshi Fujikawa Nara Institute of Science and Technology (Japan)Lourdes Borrajo University of Vigo (Spain)Luis Alonso University of Salamanca (Spain)Luis Correia University of Libon(Portugal)Luis F. Castillo Autonomous University of Manizales (Colombia)Luís Lima Polytechnic of Porto, (Portugal)Manuel González-Bedia University of Zaragoza (Spain)Manuel Pegalajar Cuéllar University of Granada (Spain)Manuel Resinas University of Sevilla (Spain)Marcilio Souto Federal University of Rio Grande do Norte (Brazil)Margarida Cardoso ISCTE (Portugal)Maria del Mar Pujol López University of Alicante (Spain)Michael Zaki University Rostok (Germany)Michifumi Yoshioka Osaka Prefecture University, (JAPAN)Masanori Akiyoshi Osaka University (JAPAN)Masaru Teranishi Hiroshima Institute of Technology (Japan)Masatake Akutagawa University of Tokushima (JAPAN)Michifumi Yoshioka Osaka Prefecture University, (JAPAN)Miguel Ángel Patricio University Carlos III of Madrid (Spain)Miguel Delgado University of Granada(Spain)Miguel Molina University of Granada(Spain)Miguel Rebollo University of Vigo (Spain)Mohd Saberi Mohamad University of Technology Malaysia (MALAYSIA)Noki Mori Osaka Prefecture University (Japan)

X Organization

Nora Muda National University of Malaysia (Malaysia)Norihisa Komoda Osaka University (Japan)Paulo Novais Polytechnic University of Minho (Portugal)Pawel Pawlewski Poznan University of Technology (Poland)Peter Fobrig University Rostok (Germany)Ichiro Satoh Thammasat University (Japan)Rafael Corchuelo Catholic University of Sevilla (Spain)Ramón Rizo University of Alicante (Spain)René Leistikow University Rostok (Germany)Rodrigo Mello University of Sao Paulo (Brazil)Rubén Fuentes Complutense University of Madrid (Spain)Rui Camacho University of Porto (Portugal)Sebastian Bader University of Rostock (Germany)Seiichi Ozawa Kobe University, JAPANSeiji Ito Hiroshima Institute of Technology (Japan)Seyedsaeid Mirkamali University of Mysore (India)Shanmugasundaram Hariharan B.S.A. Rahman University Vandalur (India)Silvana Aciar University of Girona (Spain)Shiro Tamaki University of the Ryukyus (Japan)Sofya V. Zhukova St. Petersburg State University (Russia)Toru Yamamoto Hiroshima University (JAPAN)Takuya Maekawa Osaka University (JAPAN)Vicente Botti Politechnich University of Valencia (Spain)Vicente Julián Politechnich University of Valencia (Spain)Victor J. Sosa-Sosa Laboratory of Inf. Technology (LTI) (México)Viet-Hoang VU Hanoi University of Technology (Vietnam)Waldo Fajardo University of Granada(Spain)Worawan Diaz Carballo National Institute of Informatics (Thailand)Yi Fang Purdue University (USA)Yusuke NOJIMA Osaka Prefecture University (JAPAN)Yutaka MAEDA Kansai University (JAPAN)Zbigniew Banaszak University of Koszalin (Poland)

Contents

Image Processing, Tracking, Robotic, Controland Industrial Systems

Improving the Performance of NEAT Related Algorithm viaComplexity Reduction in Search Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Heman Mohabeer, K.M.S. Soyjaudah

Intelligent Application to Reduce Transit Accidentsin a City Using Cultural Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Fernando Maldonado, Alberto Ochoa, Julio Arreola, Daniel Azpeitia,Ariel De la Torre, Diego Canales, Saúl González

Synchronization Policies Impact in Distributed Agent-BasedSimulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Omar Rihawi, Yann Secq, Philippe Mathieu

Parallel Hoeffding Decision Tree for Streaming Data . . . . . . . . . . . . . . . . . 27Piotr Cal, Michał Wozniak

Stochastic Decentralized Routing of Unsplittable Vehicle Flows UsingConstraint Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Maksims Fiosins

Extending Semantic Web Tools for Improving Smart SpacesInteroperability and Usability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Natalia Díaz Rodríguez, Johan Lilius, Manuel Pegalajar Cuéllar,Miguel Delgado Calvo-Flores

OPTICS-Based Clustering of Emails Represented by QuantitativeProfiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Vladimír Špitalský and Marian Grendár

XII Contents

Optimal Saving and Prudence in a PossibilisticFramework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61Ana Maria Lucia Casademunt, Irina Georgescu

Semantic Annotation and Retrieval of Servicesin the Cloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69Miguel Ángel Rodríguez-García, Rafael Valencia-García,Francisco García-Sánchez, José Javier Samper-Zapater,Isidoro Gil-Leiva

Simulating a Team Behaviour of Affective Agents Using Robocode . . . . . 79António Rebelo, Fábio Catalão, João Alves, Goreti Marreiros,Cesar Analide, Paulo Novais, José Neves

New Algorithms

Qualitative Acceleration Model: Representation, Reasoningand Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87Ester Martinez-Martin, Maria Teresa Escrig, Angel P. del Pobil

Framework of Optimization Methodology with Use of an IntelligentHybrid Transport Management System Based on Hopfield Networkand Travelling Salesman Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95Natalia Kubiak, Agnieszka Stachowiak

Selecting the Shortest Itinerary in a Cloud-Based Distributed MobilityNetwork . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103Jelena Fiosina, Maksims Fiosins

Application of Genetic Algorithms to Determine Closest Targetsin Data Envelopment Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111Raul Martinez-Moreno, Jose J. Lopez-Espin, Juan Aparicio,Jesus T. Pastor

Odor Classification Based on Weakly Responding Sensors . . . . . . . . . . . . 121Sigeru Omatu, Mitsuaki Yano, Toru Fujinaka

A Model to Visualize Information in a Complex Streets’ Network . . . . . . 129Taras Agryzkov, José L. Oliver, Leandro Tortosa, José F. Vicent

Case-Based Reasoning Applied to Medical Diagnosis and Treatment . . . . 137Xiomara Blanco, Sara Rodríguez, Juan M. Corchado, Carolina Zato

Multiple Agents for Data Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147Ichiro Satoh

Migrants Selection and Replacement in Distributed EvolutionaryAlgorithms for Dynamic Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155Yesnier Bravo, Gabriel Luque, Enrique Alba

Contents XIII

Multi-agent Systems

Ubiquitous Computing to Lower Domestic Violence RateBased on Emotional Support Social Network (Redsiam) . . . . . . . . . . . . . . 163Maria De Lourdes Margain, Guadalupe Obdulia Gutiérrez,Begoña García, Amaia Méndez, Alberto Ochoa, Alejandro de Luna,Gabriela Hernández

Multiobjective Local Search Techniques for Evolutionary PolygonalApproximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171José L. Guerrero, Antonio Berlanga, José M. Molina

GSched: An Efficient Scheduler for Hybrid CPU-GPU HPC Systems . . . 179Mariano Raboso Mateos, Juan Antonio Cotobal Robles

Comparison of K-Means and Fuzzy C-Means Data MiningAlgorithms for Analysis of Management Information:An Open Source Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187Angélica Urrutia, Hector Valdes, José Galindo

Mobile-Based Distributed System for Managing Abandoned or LostPets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197Daniel Garrote-Hildebrand, José-Luis Poza-Luján,Juan-Luis Posadas-Yagüe, José-Enrique Simó-Ten

Robust Optimization of Intradomain Routing Using EvolutionaryAlgorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201Vitor Pereira, Pedro Sousa, Paulo Cortez, Miguel Rio,Miguel Rocha

A MAS for Teaching Computational Logic . . . . . . . . . . . . . . . . . . . . . . . . . 209Jose Alberto Maestro-Prieto, Ma Aránzazu Simón-Hurtado,Juan F. de-Paz-Santana, Gabriel Villarrubia-González

Fast Post-Disaster Emergency Vehicle Scheduling . . . . . . . . . . . . . . . . . . . 219Roberto Amadini, Imane Sefrioui, Jacopo Mauro,Maurizio Gabbrielli

Creating GPU-Enabled Agent-Based Simulations Usinga PDES Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227Worawan Marurngsith, Yanyong Mongkolsin

Agent and Knowledge Models for a Distributed Imaging System . . . . . . . 235Naoufel Khayati, Wided Lejouad-Chaari

DPS: Overview of Design Pattern Selection Based on MASTechnology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243Eiman M. Salah, Maha T. Zabata, Omar M. Sallabi

XIV Contents

Representing Motion Patterns with the Qualitative RectilinearProjection Calculus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251Francisco Jose Gonzalez Cabrera, Jose Vicente Álvarez-Bravo,Fernando Díaz

Event Management Proposal for Distribution Data Service Standard . . . 259José-Luis Poza-Luján, Juan-Luis Posadas-Yagüe,José-Enrique Simó-Ten

Trajectory Optimization under Changing Conditionsthrough Evolutionary Approach and Black-Box Modelswith Refining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267Karel Macek, Jirí Rojícek, Vladimír Bicík

Modelling Agents’ Risk Perception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275Nuno Trindade Magessi, Luis Antunes

On the Use of PSO with Weights Adaptation in ConcurrentMulti-issue Negotiations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283Kakia Panagidi, Kostas Kolomvatsos, Stathes Hadjiefthymiades

Monitoring Weight and Physical Activity Using an AmI Setting . . . . . . . . 291João Ferreira, Rafaela Rosário, Ângelo Costa, Paulo Novais

Distributed Computing, Grid Computing, CloudComputing

An Emotional Aware Architecture to Support Facilitator in GroupIdea Generation Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299João Laranjeira, Goreti Marreiros, João Carneiro, Paulo Novais

Social Networks Gamification for Sustainability RecommendationSystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307Fábio Silva, Cesar Analide, Luís Rosa, Gilberto Felgueiras,Cedric Pimenta

Web-Based Solution for Acquisition, Processing, Archivingand Diffusion of Endoscopy Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317Isabel Laranjo, Joel Braga, Domingos Assunção, Andreia Silva,Carla Rolanda, Luís Lopes, Jorge Correia-Pinto, Victor Alves

Texture Classification with Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . 325William Raveane, María Angélica González Arrieta

A Context Aware Architecture to Support People with Partial VisualImpairments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333João Fernandes, João Laranjeira, Paulo Novais, Goreti Marreiros,José Neves

Contents XV

Automatic Prediction of Poisonous Mushrooms by ConnectionistSystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341María Navarro Cáceres, María Angélica González Arrieta

Adaptive Learning in Games: Defining Profiles of CompetitorPlayers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351Tiago Pinto, Zita Vale

Bioinformatics, Biomedical Systems, e-health, AmbientAssisting Living

Associative Learning for Enhancing Autonomous Bots in VideogameDesign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361Sergio Moreno, Manuel G. Bedia, Francisco J. Serón,Luis Fernando Castillo, Gustavo Isaza

An Integral System Based on Open Organization of Agentsfor Improving the Labour Inclusion of Disabled People . . . . . . . . . . . . . . . 369Alejandro Sánchez, Carolina Zato, Gabriel Villarrubia-González,Javier Bajo, Juan Francisco De Paz

+Cloud: An Agent-Based Cloud Computing Platform . . . . . . . . . . . . . . . . 377Roberto González, Daniel Hernández, Fernando De la Prieta,Ana Belén Gil

Representation of Propositional Data for Collaborative Filtering . . . . . . . 385Andrzej Szwabe, Pawel Misiorek, Michal Ciesielczyk

Face Identification by Real-Time Connectionist System . . . . . . . . . . . . . . . 393Pedro Galdámez, Angélica González

QoS Synchronization of Web Services: A Multi Agent-Based Model . . . . 401Jaber Kouki, Walid Chainbi, Khaled Ghedira

Data mining, Information Extraction, Semantic,Knowledge Representation

Comparing Basic Design Options for Management AccountingSystems with an Agent-Based Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . 409Friederike Wall

Potential Norms Detection in Social Agent Societies . . . . . . . . . . . . . . . . . . 419Moamin A. Mahmoud, Aida Mustapha,Mohd Sharifuddin Ahmad, Azhana Ahmad, Mohd Zaliman M. Yusoff,Nurzeatul Hamimah Abdul Hamid

Collision Avoidance of Mobile Robots Using Multi-Agent Systems . . . . . . 429Angel Soriano, Enrique J. Bernabeu, Angel Valera, Marina Vallés

XVI Contents

Multi-agent Architecture for Intelligent InsuranceSystems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439Egons Lavendelis

Evaluation Framework for Statistical User Models . . . . . . . . . . . . . . . . . . 449Javier Calle, Leonardo Castaño, Elena Castro, Dolores Cuadra

Agent Mediated Electronic Market Enhancedwith Ontology Matching Services and Emergent SocialNetworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457Virgínia Nascimento, Maria João Viamonte, Alda Canito,Nuno Silva

Artificial Intelligence Applications

Semantic Multi-agent Architecture to Road Traffic InformationRetrieval on the Web of Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465José Javier Samper-Zapater, Dolores M. Llidó Escrivá,Juan José Martínez Durá, Ramon V. Cirilo

Personalised Advertising Supported by Agents . . . . . . . . . . . . . . . . . . . . . . 473Bruno Veloso, Luís Sousa, Benedita Malheiro

Two Approaches to Bounded Model Checking for a Soft Real-TimeEpistemic Computation Tree Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483Artur Meski, Bozena Wozna-Szczesniak, Agnieszka M. Zbrzezny,Andrzej Zbrzezny

Towards an AOSE: Game Development Methodology . . . . . . . . . . . . . . . . 493Rula Al-Azawi, Aladdin Ayesh, Ian Kenny,Khalfan Abdullah AL-Masruri

Periodic Chemotherapy Dose Schedule Optimization Using GeneticAlgorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503Nadia Alam, Munira Sultana, M.S. Alam, M.A. Al-Mamun,M.A. Hossain

Mobile-Agent Based Delay-Tolerant Network Architecturefor Non-critical Aeronautical Data Communications . . . . . . . . . . . . . . . . . 513Rubén Martínez-Vidal, Sergio Castillo-Pérez, Sergi Robles,Miguel Cordero, Antidio Viguria, Nicolás Giuditta

A Preliminary Study on Early Diagnosis of Illnesses Based on ActivityDisturbances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521Silvia González, José R. Villar, Javier Sedano, Camelia Chira

Contents XVII

Towards an Adaptable Mobile Agents’ ManagementSystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529Mohammad Bashir Uddin Khan, Ghada Abaza, Peter Göhner

Glove-Based Input for Reusing Everyday Objects as Interfacesin Smart Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537Ionut-Alexandru Zaiti, Stefan-Gheorghe Pentiuc

Suboptimal Restraint Use as an Emergent Norm via Social Influence . . . 545Felicitas Mokom, Ziad Kobti

Implementing MAS Agreement Processes Based on ConsensusNetworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553Alberto Palomares, Carlos Carrascosa, Miguel Rebollo, Yolanda Gómez

Agent-Based Interoperability for e-Government . . . . . . . . . . . . . . . . . . . . . 561Fábio Marques, Gonçalo Paiva Dias, André Zúquete

Context- and Social-Aware User Profiling for AudiovisualRecommender Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569César A. Mantilla, Víctor Torres-Padrosa, Ramón Fabregat

Current Trends in Bio-Ontologies and Data Integration . . . . . . . . . . . . . . 579Rafael Pereira, Rui Mendes

Challenges in Development of Real Time Multi-Robot System UsingBehaviour Based Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587Aleksis Liekna, Egons Lavendelis, Agris Nikitenko

Application of Hybrid Agents to Smart Energy Managementof a Prosumer Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597Pasquale Caianiello, Stefania Costantini, Giovanni De Gasperis,Niva Florio, Federico Gobbo

Structuring and Exploring the Biomedical Literature Using LatentSemantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609Sérgio Matos, Hugo Araújo, José Luís Oliveira

Upper Ontology for Multi-Agent Energy Systems’ Applications . . . . . . . . 617Gabriel Santos, Tiago Pinto, Zita Vale, Hugo Morais, Isabel Praça

A Practical Mobile Robot Agent Implementation Based on a GoogleAndroid Smartphone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625Dani Martínez, Javier Moreno, Davinia Font, Marcel Tresanchez,Tomàs Pallejà, Mercè Teixidó, Jordi Palacín

XVIII Contents

Cloud-Based Platform to Labor Integration of DeafPeople . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633Amparo Jiménez, Amparo Casado, Javier Bajo,Fernando De la Prieta, Juan Francisco De Paz

Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641

Mobile-Agent Based Delay-Tolerant Network Architecturefor Non-critical Aeronautical Data Communications . . . . . . . . . . . . . . . . .Rubén Martínez-Vidal, Sergio Castillo-Pérez, Sergi Robles,Miguel Cordero, Antidio Viguria, Nicolás Giuditta

Erratum

E1

S. Omatu et al. (Eds.): Distrib. Computing & Artificial Intelligence, AISC 217, pp. 1–7. DOI: 10.1007/978-3-319-00551-5_1 © Springer International Publishing Switzerland 2013

Improving the Performance of NEAT Related Algorithm via Complexity Reduction in Search Space

Heman Mohabeer and K.M.S. Soyjaudah

Department of Electrical and Electronics Engineering, University of Mauritius, Reduit, Mauritius [email protected], [email protected]

Abstract. In this paper, we focus on the learning aspect of NEAT and its variants in an attempt to solve benchmark problems through fewer generations. In NEAT, genetic algorithm is the key technique that is used to complexify artificial neural network. Crossover value, being the parameter that dictates the evolution of NEAT is reduced. Reducing crossover rate aids in allowing the algorithm to learn. This is because lesser interchange among genes ensures that patterns of genes carrying valuable information is not split or strayed during mating of two chromosomes. By tweaking the crossover parameter and with some minor modification, it is shown that the performance of NEAT can be improved. This enables NEAT algorithm to evolve slowly and retain information even while undergoing complexification. Thus, the learning process in NEAT is greatly enhanced as compared to evolution

Keywords: Crossover, NEAT, Learning, Evolution, Genetic algorithm, artificial neural network.

1 Introduction

Neuroevolution of augmented topologies (NEAT) is the offspring developed from the fusion of genetic algorithms (GA) and artificial neural network (ANN). In 2004, K.Stanley et al. [1] postulated NEAT which has since then emerged as an exciting prospect in the development of artificial intelligence. When applied to reinforcement learning task, NEAT has outpaced other conventional method [2], [3], [4] initially developed to cater for this task. The major change in NEAT when applied to reinforcement learning task is its ability to learn and complexify, thus enabling it to perform while requiring no supervision.

So far, NEAT has not yet been applied to major applications except in benchmarks problems to enable one to compare the performance of NEAT to other methods such as simulated annealing and hill climbing [5], [6]. Instead, several variants [7], [8] based on NEAT have been created. These variants

2 H. Mohabeer and K.M.S. Soyjaudah

enhanced the behavior of NEAT while solving both reinforcement and sparse reinforcement tasks. Feature selection NEAT (FS-NEAT) [9] is one such variant that helps the algorithm to choose its own input from a set of data which enables it to perform with fewer inputs and provides better performance. This is achieved by learning the network’s inputs, topology, and weights simultaneously. Inputs are one of the major parameters affecting the behaviour of a machine learning system. FS- NEAT allows important data to be selectively chosen from a set input so as to trigger the minimum effect on the complexity of the network. Doing so reduce time to find the desired solution and greatly broadens the set of tasks to which they can be practically applied.

Until now, GA has been a major attribute in the performance of Neuroevolution. Its ability to emulate evolution has made it a vital component of ANN. The two main parameters that contribute to evolution are crossover and mutation. Mutations, in NEAT can modify both connection weights and network structures [1], [9]. Connection weights mutate as in any neuroevolution system; structural mutations, which allow complexity to increase, add either a new connection or node to the network. Through mutation, genomes of varying sizes are created, sometimes with completely different connections specified at the same positions. Crossover is solely possible if the system is able to identify the genes matchup between any individuals in a population. This is the main reason for assigning an innovation number to every gene so as to have their chronological representation in the system. When crossing over, the genes in both genomes with the same innovation numbers are lined up. Genes that do not match are inherited from the more fit parent, or if they are equally fit, from both parents randomly.

Crossover value in NEAT has been input as per reported theoretical value originally used in GA. Initially, it was postulated that the crossover rate for maximum efficiency in GA was around 0.7 to 0.9. In this paper we present the effect of varying the crossover value bearing in mind that GA exclusively evolves ANN and does not directly solve the particular problem to which NEAT is applied. It is shown that hypothetical value for crossover rate only works best when GA is used to solve problems in which it is applied autonomously. In this paper, the aspect of learning, which is a slow process, has been taken into consideration. We propose a new crossover rate for NEAT that outperforms the current rate used for every variant of NEAT. Section one provides insights about crossover as one of the major parameter in NEAT. Section two describes the simulations and results while section three describes the discussions. Finally, we conclude and provide ground for future works in section four.

1.1 Crossover

In biological world, mating is important to ensure the continual survival of a species. It also helps to create diversity among the species since traits from each parent are transferred in the resulting offspring. In this way the offspring is said to carry a portion of both parents. Normally, in real world the genes are evenly

Improving the Performance of NEAT Related Algorithm 3

distributed and the offspring may carry a genotype from parent one while another genotype from parent two. The selection of genotype is a random process. No genotype of a parent is predominant on the other parent. When homologous chromosomes are lined up during meiosis, they can, in a very precise way, exchange genetic material [10]. Variation in the genome is greatly increased by two processes occurring during meiosis: independent assortment and crossing over. Both these processes are extremely complex, but in themselves are not subject to selection. They rearrange the genetic material randomly, resulting in new combinations of the material. As this reshuffling occurs at the level of the genotype, it is not subject to natural selection until the new combinations have been expressed in the phenotype [10]. In this way, it is almost impossible to predict the precise trait of the offspring.

Fortunately, in artificial world, it is possible to control the behavior of the genotype during the mating process and thus embark only those which are fittest into the next generation. To achieve this feat, each gene is assigned a fitness value. This value is calculated based on its position relative to the solution in the state space. In this way the next generation of offspring can be cultivated with genes that have higher fitness value and this continues until the solution is reached. The transfer of genes with higher fitness from parent to offspring contributes to the learning process in the ANN. Single handedly GA cannot learn. It follows the concept of survive or die. However when applied to other algorithms such as neural network as in the case of NEAT, it hugely contributes to the learning process.

1.2 Learning in NEAT

Machine learning, which has always been an area of interest in AI, is concerned with the study of computer algorithms that improve automatically through experience [11]. Reinforcement learning (RL) [12], [13] deals with the problem of how an agent, situated in an environment and interacting with it, can learn a policy, a mapping of states to actions, in order to maximize the total amount of reward it receives over time, by inferring on the immediate feedback returned in the form of scalar rewards as a consequence of its actions. Neural network has the ability to deal with reinforcement learning. It has been successfully been applied to task such as task such as XOR, pole balancing and the double pole balancing. The rate of learning in NN is quite slow and the system requires large amount of training to be able to provide efficient solution. This is mostly dependant on the topology and complexity of the system. In the case of NEAT, learning has not really been the prime concern. Instead, focus was made on the complexification of neat in order to achieve a state whereby the system was able to solve a given reinforcement problem. The complexification of NEAT in this paper was computed in terms of number of generations achieved in order to solve the problem.

4 H. Mohabeer and K.M.S. Soyjaudah

1.3 Methodology

The methodology adopted in this paper was quite straightforward. It was argued that crossover had an impact on learning and thus the ability to solve a reinforcement problem in fewer complexifications. The NEAT algorithm was tweaked so that only the crossover rate acted as a variable. In this way, the other parameters such as mutation and speciation were kept at bay. The crossover rate determines the percentage of offspring which will be generated from crossover in the offspring at each generation. If you do not crossover enough, there is not enough sharing of genes. If you crossover too much, good sections of individuals get split up a lot. According to this statement a balance has to be searched for in order to get the optimal workability of the system. The benchmark problems that were used for experimentation purposes were the XOR, pole balancing and the double pole balancing. Since it comprises of reinforcement learning task, learning is an integral phase along with the process of complexification. Simulations were carried out using the NEAT algorithms from [14]. The program was slightly modified to tailor it to a more systematic approach. Figure 1 shows a small portion of the code. The part which is circled highlights the parameters that have been varied from a range of 0.1 to 0.9. A new feature, which consists of monitoring the learning rate of the neural network, has also been added. The main purport is to provide evidence on the influence of crossover rate on the learning aspect of the neural network.

Fig. 1 Sample code displaying the crossover parameters in NEAT.

2 Simulations and Results

It is argued that crossover has an impact on learning and thus the ability to solve a reinforcement problem in fewer complexifications. The NEAT algorithm has been tweaked so that only the crossover rate acted as a variable. In this way, the other parameters such as mutation and speciation have been kept at bay. The crossover rate determines the percentage of offspring which will be generated from

Improving the Performance of NEAT Related Algorithm 5

crossover in the offspring at each generation. The benchmark problems that were used for experimentation purposes were the XOR, pole balancing and the double pole balancing. Since it comprises reinforcement learning task, learning is an integral phase along with the process of complexification. Simulations were carried out using the NEAT algorithms from [14]. The algorithm was slightly modified to tailor it to a more systematic approach. The first problem to be tackled was the XOR problem. The reason for this choice was that among the three benchmark problem, XOR was the one that invited a minimalistic degree of complexity in NEAT. At each stage where the crossover rate were modified, fifty simulations were carried out to ensure that the result obtained were consistent. It was noted that the best results was obtained from a crossover rate of 0.3. The same concept was applied for the pole balancing and the double pole balancing. Table 1 shows the number of generations achieved by NEAT for solving each problem using a crossover of 0.3 as compared to the theoretical value used while designing NEAT. The initial number of generation is the number achieved while using theoretical value of crossover rate. The new number of generation provides novel values achieved when the crossover rate was reduced to 0.3.

Table 1 Depicts the number of generations to solve the stated reinforcement learning

Initial number of generations

New number of generations

XOR 67 7

Pole balancing 250 75

Double pole balancing 286 114

3 Discussions and Future Works

This paper provides evidence that a balance between evolution and learning contributes to a significant improvement NEAT. Based on the simulations performed, it has been shown that learning and crossover has a close relationship. By reducing the crossover rate it was observed that the benchmark problems could be solved more quickly and with minimal amount of complexity. Probability of crossover or crossover rate is the parameter that affects the rate at which the crossover operator is applied. A higher crossover rate introduces new strings more quickly into the population, that is, the population quickly evolves. Normally, in the case of GA, it should make the system more efficient and converge toward the solution more quickly. However in NEAT the converse is observed. This is because quick evolution prevents the system from learning thus the ability of NN in NEAT is stripped off its main ability. Theoretically, a low crossover rate may cause stagnation due to the lower exploration rate. However, a rate of 0.3 in a properly designed NEAT algorithm ensures the balance between learning and exploring the state space. Exploration is much slower but the leap in the state

6 H. Mohabeer and K.M.S. Soyjaudah

space from the current position toward the optimal solution is much more significant. Consider the following argument: useful information carried by a chromosome may consist of a bundle of genes. These genes are individually assigned with a higher fitness value compared to others in the same chromosome. When performing crossover using high rates, the bundle may be broken and thus their information capacity may diminish. However, while reducing crossover rate the bundle is preserved and this reflects on their learning capabilities therefore converging toward the results in a more efficient manner. Moreover, the work presented in this paper has a significant impact since lots of applications have been developed with NEAT as the core algorithm therefore, variants of NEAT such as RBF-NEAT and FS- NEAT is also likely to have their performance improved significantly.

Reinforcement learning task is mostly concerned situations where the solution is achieved through actions induced from response to external environment. Being an intelligent agent, the learning ability of NN is predominant on the exploration skills provided by GA since GA is only secondary toward solving the problem in NEAT. GA only helps to optimize NN via its topology and weight optimization. Alone GA is unable to learn, nonetheless, like genetic algorithms, reinforcement learning is an unsupervised learning problem. However, unlike genetic algorithms, agents can learn during their lifetimes. It is also noted that since the benchmark problems are solved in fewer generations, this ensures that the complexity of the system is nominal. This results in faster computational processing and lesser time to search for solution. It is expected that the proposed change will have an impact on all the variants of NEAT such as the compositional pattern producing network and the real time NEAT. A study could also be conducted on the relationship of crossover and learning in the context of intelligent agents such as the one described in this paper.

Acknowledgment. The financial contribution of the Tertiary Education Commission is gratefully acknowledged.

References

1. Stanley, K.O., Miikkulainen, R.: Efficient Evolution of Neural Network Topologies. In: Proceedings of the 2002 Congress on Evolutionary Computation (CEC 2002), Honolulu, Hawaii (2002)

2. Gomez, F., Miikkulainen, R.: Solving non-Markovian control tasks with neuroevolution. In: Proceedings of the 16th International Joint Conference on Artificial Intelligence. Morgan Kaufmann, Denver (1999)

3. Moriarty, D.E.: Symbiotic Evolution of Neural Networks in Sequential Decision Tasks. PhD thesis, Department of Computer Sciences, The University of Texas at Austin, Technical Report UT-AI97-257 (1997)

4. Zheng, Z.: A benchmark for classifier learning. Technical Report TR474, Basser Department of Computer Science, University of Sydney, N.S.W. Australia (2006), Anonymous ftp from http://ftp.cs.su.oz.au.in/pub/tr

Improving the Performance of NEAT Related Algorithm 7

5. Granville, V., Krivanek, M., Rasson, J.P.: Simulated annealing: A proof of convergence. IEEE Transactions on Pattern Analysis and Machine Intelligence 16(6), 652–656 (1994)

6. Cano, A., Gomez, M., Moral, S.: Application of a hill-climbing algorithm to exact and approximate inference in credal networks. In: 4th International Symposium on Imprecise Probabilities and Their Applications, Pittsburgh, Pennsylvania (2005)

7. Stanley, K.O.: Exploiting Regularity without Development. In: Proceedings of the 2006 AAAI Fall Symposium on Developmental Systems. AAAI Press, Menlo Park (2006)

8. Stanley, K.O., Miikkulainen, R.: Competitive coevolution through evolutionary complexification. Journal of Artificial Intelligence Research 21, 63–100 (2004)

9. Whiteson, S., Stanley, K.O., Miikkulainen, R.: Automatic Feature Selection in Neuroevolution. In: Proceedings of the Genetic and Evolutionary Computation Conference Workshop on Self-Organization (GECCO 2004), Seattle, WA (2004)

10. http://amazingdiscoveries.org/Cdeception_gene_chromosome_sexual_reproduction.hmtl (accessed December 17, 2011)

11. Moriarty, D.E., Miikkulainen, R.: Efficient reinforcement learning through symbiotic evolution. Machine Learning 22, 11–32 (1996)

12. Baird, L.C.: Residual Algorithms: Reinforcement Learning with Function Approximation. In: Prieditis, A., Russell, S. (eds.) Proceedings of the Twelfth International Conference on Machine Learning, July 9-12 (1995)

13. Sutton, R.S., Barto, A.G.: Reinforcement Learning: An Introduction. MIT Press, Cambridge (1998)

14. http://www.cs.utexas.edu/users/ai-lab/?neatmatlab (accessed on October 25, 2010)

S. Omatu et al. (Eds.): Distrib. Computing & Artificial Intelligence, AISC 217, pp. 9–17. DOI: 10.1007/978-3-319-00551-5_2 © Springer International Publishing Switzerland 2013

Intelligent Application to Reduce Transit Accidents in a City Using Cultural Algorithms

Fernando Maldonado, Alberto Ochoa*, Julio Arreola, Daniel Azpeitia, Ariel De la Torre, Diego Canales, and Saúl González

Autonomous University of Ciudad Juárez [email protected]

Abstract. Ciudad Juárez, a large city located along the Mexico-United States border with a population over a million people in 87 km2 has recently experienced a history of violence and insecurity related directly to organized crime: assaults, kidnappings, multi-homicides, burglary, between others. However the second leading cause of death in the city is associated with traffic accidents: 1,377 deaths in 2011 alone. For this reason, citizens have actively pursued specific programs that would decrease the overwhelming statistics: 3,897 deaths from 2008 to 2012. The reason of the following project is to provide drivers with a technological tool with indicators and sufficient information based off statistics compiled by the Centro de Investigaciones Sociales (Social Research Centre) at Autonomous Uni-versity of Ciudad Juárez and other public sources. Then drivers would have more information on possible traffic accidents before they happened. This research tries to combine a Mobile Device based on Cultural Algorithms and Data Mining to determine the danger of suffering a traffic accident in a given part of the city dur-ing a specific time.

Keywords: Data Mining, Cultural Algorithms and Mobile Devices.

1 Introduction

According to literature is feasible to use an application to determine the possibility that a traffic accident will occur using data associated with most frequented areas. Then the users will be aware of alternate routes to their destination, among other advantages. Using technological tools, data analysis and mathematical models would then decrease drivers’ chances of suffering a traffic accident. The aim of this project is to create a model that uses these tools in a mobile geographic information system (SIGMA) on levels of traffic accidents in specific areas of Ciudad Juárez, which is presented in detail below, this research include the analysis of Cultural Algorithms to determine the danger that a traffic accident would occur during a specific time. We realize an exhaustive analysis of other

* Corresponding author.

10 F. Maldonado et al.

similar research, the only similar context is explain in [6], where the authors calculated the insecurity of a vehicular group which requires product delivery in different places with random scheduling, but this research does not considers real on-time statistics and the perspective to suggest a different route to travel or stay for a determinate period of time.

2 Project Development

We developed this research project into three sections, which are: modules of application development, implementation of the server and the intelligent module associated with Cultural Algorithms and Data Mining. We will use the operating system Android since it has a considerable market segment while there has been a lot of development using inexpensive equipment, especially in developing countries. Android is free software, so any developer can download the SDK (development kit) that contains your API [2]. However we consider some minor drawbacks: there are Android users that had complained about the fragmentation of the platform due to the different versions. This research’s scope is to prevent traffic accidents in Ciudad Juárez, where there were 27 deaths per 100,000 people in 2011.

3 Components of the Application

The first step is to get the coordinates where the user is located, and then sent them to the server, which calculates the number of traffic incidents within the closest radio specified in the configuration of the mobile device, the results are processed to determine a numerical index which will then be represented with a color for better end-user visualization. All this information is obtained from a transit databases and analyzed with Data Mining. After the values are sent to the mobile device and interpreted to construct an URL which is then sent to the Google Maps API. Then a map will be ultimately display with the area indicators.

The figure 1 shown below represents the operation of the SIGMA, which is di-vided into two parts, the mobile application and Web services hosted on the serv-er. The database, where the incidences data is stored, has 3 tables:

Type_accident: Where the different types of traffic accidents are characterized. Neighborhood: Here is the geo-reference of the neighborhood. Accidents: It lists the incidents raised in the different regions of Ciudad Juárez, which are also expressed in decimal degrees geo-referenced to facilitate further calculations, and a narrative guide associated with features of the accident.

Intelligent Application to Reduce Transit Accidents 11

Fig. 1 Functional diagram of the SIGM including hybrid methodology

The structure of the database has a table called accidents, where each record contains the geographic coordinates expressed in decimal degrees, which determine the specific position of the accidents [1] and is visualized I Figure 2. To locate nearby points within a radius requires four parameters: latitude, longitude, and distance equatorial radius, the latter determines the maximum distance the search radius, these parameters are part of a method based on havesine formula, which is used to calculate great circle distances between two points on a sphere. Haversine function that is different from haversine formula is given by the function of semiversine where: = = =

Haversine formula for any two points on a sphere: d is the distance between two points (along a great circle of the sphere), R is the radius of the sphere, φ 1 is the latitude of point 1, φ 2 is the latitude of point 2, and Δ λ is the length difference haversine dR = haversin φ1 φ2 cos φ1 cos φ2 haversine Δ λ

Solving haversine formula can calculate the distance, either by applying the function inverse haversine or by using the arcsine where: = d = R haversine h = 2R arcsin √h

12 F. Maldonado et al.

With this formula we can construct the following instructions, taking into account

the role of semiversine we have: = . . = √

For performance reasons when haversine implements the function using SQL statements used a similar formula but in terms of spherical cosine law called cosine. =

This is only an approximation when applied to land, since the Earth is no a perfect sphere radius, as we approach the poles it varies. The SQL statement based on the formula haversine find all locations that are within the range of the variable $ radius and groups them by type of traffic accident. Calculate of the uncertainty is modeled on the human development index (HDI) prepared by the United Nations Program for Development (PNDU). The traffic insecurity index is composed of two components Number of Events (Q) and time (H) each component represents half the total value of the index:

Each expressed with a value from 0 to 1 for which we use the following general formula:

Component index = (Value – minimum) / (Maximum – minimum)

The component Q is calculated by the number of events in the area, determined by the position to calculate the maximum and minimum, accidents are grouped by neighborhood. According to the CIS-ICSA at Autonomous University of Ciudad Juárez, Cuatro Siglos Avenue has the most accidents, and thus is the maximum, with 47 deaths. Whenever an avenue exceeds this number, there would be a new maximum; which means that the maximum is dynamic depending on the data entering the database. To calculate the H component data are grouped in ranges of time, for example suppose that areas of 300 m radius 13 deaths are grouped in the following form and consult the index at 4:38 pm, as is shown in Table 1.

Table 1 Example of Neighborhood number of homicides range by hour

Amount Time Range 5 5:00 a 6:00 pm. 3 4:00 a 5:00pm. 3 11:00 a 12:00pm. 2 9:00 a 10:00am.

The time when we consulted put us in the range of 4:00 to 5:00 pm. And the

calculation of the H component would be: = = .

Using data from the previous example would be the component Q: = =.

The index would be as follows = . . = .

Intelligent Application to Reduce Transit Accidents 13

Having calculated the numerical index, a color is assigned depending on the range in which is positioned according to the table 2 divided into eight classes.

Table 2 Ranges of colors according to the numeric index

0 - .125 .56 - .625 .126 - .25 .626 - .75 .26 - .375 .751 - .875 .376 - .5 .876 - 1

Fig. 2 Intelligent Tool recommend another two routes after obtain data from a transit accident

4 Implementation of the Intelligent Application

There are several aspects that need to be taken into account when designing mo-bile applications: limited screen size, different resolution and screen sizes across devices. Therefore, the designer has to develop the interface uniformly so that it suits most devices. This module explains how to work with different layouts pro-vided for the Android API. The programming interface we will work on is XML. There are several ways to obtain the geographical position of the device, however we would thoroughly use GPS and access points (Wi-Fi) nearby; both perform similarly but differ in accuracy, speed and resource consumption. Data Server Communication is the most important module because it allows communication with the server, allowing you to send the GPS position obtained by receiving the processed image and map of our location, thus showing the outcome of your ap-plication that is the indicator of insecurity. To communicate to a server requires a HTTP client which sends parameters and establishes a connection using TCP / IP. The HTTP client can access any other server or service as this is able to get re-sponse from the server and interpret by a stream of data. The Android SDK has two classes with which we can achieve this, HttpClient and HTTPPOST. With the class HttpClient is done to connect to a remote server, it needs HTTPPOST class

14 F. Maldonado et al.

will have the URI or URL of the remote server. This method receives a URL as a parameter and using classes HTTPPOST HttpClient and the result is obtained and received from the server, in this specific case is only text, which can be JSON or XML format. Here, the server responds with a JSON object that would give the indicator is then used to create the map. For the construction of the polygon that indicates the rate of incidents in a certain radius of the current position is not poss-ible to create it using the GPS coordinates that yields, as these are specified in "degrees" and requires the unit to convert to meters. For this you need to know how an arc equals the terrestrial sphere, which depends on the place on earth where it is located and the address where you are, the simplest case is to measure an arc in Equator, considering that the earth is 3670 km radius, the perimeter of serious Equator radio 2, which would be equal to 40.024 miles. With this you can get a relationship that would be as follows. If 360 degrees is 40.024 miles then a degree is 111,000.18 miles, this relationship can add and subtract yards to the position, as shown in the Figure 3.

Fig. 3 Acquisition of polygon map with the position of the Android application

For the preparation of graphics, we use a class supported with Cultural Algo-rithm proposed which facilitates the manipulation of data to express visually, us-ing different types of graphs: as in the Figure 4.

Fig. 4 Statistics Graphics related with deaths in traffic accidents

Intelligent Application to Reduce Transit Accidents 15

To implement the model, the application is installed in operating system devices with Android 2.2 or higher, which tests the system in different areas of the city based on the previously research related with Cultural Algorithms on Urban Transport [5], by answering a questionnaire of seven questions to all users after a scholar semester have elapsed since installing the application. The questions’ purpose is to raise awareness of the performance, functionality and usability of the system, the demonstration of this application is shown in figure 5. To understand in a proper manner the functionality of this Intelligent Tool, we proposed evaluate our hybrid approach and compare with only data mining analysis and random select activities to protect in the city, we analyze this information based on the unit named “époques”, which is a time variable to determine if a change exists in the proposed solution according at a different situation of traffic accidents.

Fig. 5 Implementation and use of Hybrid Intelligent Application based on Cultural Algo-rithms and Data Mining

Fig. 6 Solutions proposed to the problem of traffic accidents: (blue) our hybrid approach; (red) only using data mining analysis and (green) using randomly actions to improve the safety of the users

We consider different scenarios to analyze during different time, as is possible see in the Figure 6, and apply a questionnaire to a sample of users to decide search a safety place in the City. Users that receive transit information with traffic

16 F. Maldonado et al.

accidents (via Data Mining Analysis) try to improve their space of solution. But when solutions are sent using both Cultural Algorithms and Data Mining then it was possible to determine secure solutions by the users and describe the real situation of possible danger. The use of our proposal solution improves 82% the possibilities of delivering a suggestion, to drive away from the possible traffic accidents, against a randomly action and 28% against only using Data Mining analysis. These types of messages would permit in the future a significant decrease in the possibility of suffering a fatal traffic accident.

5 Conclusions

With the use of this innovative application combining Cultural Algorithms and Data Mining based on a mobile dispositive is possible to determine the places where a traffic accident is possible to occur in Ciudad Juárez; by an alert sent to a mobile device with GPS, providing statistical information through a Web server that returns the level of rush hour in the area consulted [4]. The most important contribution is the possible prevention of future deaths in the city caused by traffic accidents. The future research will be to improve the visual representation of traffic problems with real on-time information through an Intelligent Diorama. This design will bring common information to family members or social network close members. Another possible extension will be to update our database using recent data from the local Transit Department’s central server of security. Taking into account the 17,500 deaths related to traffic accidents in the last six years in Mexico, we think this innovative technology has promising application in another metropolitan cities in Latin America with similar problems of traffic, such as: Araguaiana, Blumenau, Joinville, Londrina, Manaus, Rondonópolis, Uberlândia. There exists a plausible application for motorcyclist since they face a higher risk of traffic accidents in Ciudad Juárez: 55 deaths out of 67 accidents in 2012. In addition this application will be used as Recommender System when traveling to another countries [7] and explain different scenarios according time and location. In a future research we detail a prediction model to predict where will be occurs an attack of carjacking with basis on police department information, and using a hybrid model with another different Bioinspired Algorithm as Bat Algorithm or Wolf search algorithm with ephemeral memory. The research group is research about a novel paradigm related with Okapis, and proposes an idea about collective behavioral in a herd with skills different to each issue.

References

1. Ignacio, A.F.: Las coordenadas geográficas y la proyección UTM, Universidad de Val-ladolid, Ingeniería cartográfica, geodésica y fotogrametría (Febrero 2001)

2. Alejandro, A.R.: Estudio del desarrollo de aplicaciones RA para Android. Trabajo de fin de Carrera. Catalunya, España (2011)

Intelligent Application to Reduce Transit Accidents 17

3. Orlando, B.J.: Sistema de Información Geográfica Móvil Basado en Comunicaciones Inalámbricas y Visualización de Mapas en Internet. M.C. tesis, Ensenada, Baja Califor-nia, México (2011)

4. Cáceres, A.: Sistemas de Información Geográfica. Profesorado en Geografía. Instituto Formación Docente P.A.G. (2007)

5. Reyes, L.C., Zezzatti, C.A.O.O., Santillán, C.G., Hernández, P.H., Fuerte, M.V.: A Cul-tural Algorithm for the Urban Public Transportation. In: Corchado, E., Graña Romay, M., Manhaes Savio, A. (eds.) HAIS 2010, Part II. LNCS (LNAI), vol. 6077, pp. 135–142. Springer, Heidelberg (2010)

6. Glass, S., Vallipuram, M., Portmann, M.: The Insecurity of Time-of-Arrival Distance-Ranging in IEEE 802.11 Wireless Networks. In: ICDS Workshops, pp. 227–233 (2010)

7. Souffiau, W., Maervoet, J., Vansteenwegen, P., Vanden Berghe, G., Van Oudheusden, D.: A Mobile Tourist Decision Support System for Small Footprint Devices. In: Cabes-tany, J., Sandoval, F., Prieto, A., Corchado, J.M. (eds.) IWANN 2009, Part I. LNCS, vol. 5517, pp. 1248–1255. Springer, Heidelberg (2009)

Synchronization Policies Impact in DistributedAgent-Based Simulation

Omar Rihawi, Yann Secq, and Philippe Mathieu

LIFL (CNRS UMR 8022), Universite Lille 1, [email protected]

Abstract. When agents and interactions grow in a situated agent-based simulations,requirements in memory or computation power increase also. To be able to tacklesimulation with millions of agents, distributing the simulator on a computer net-work is promising but raises issues related to time consistency and synchronizationbetween machines. This paper study the cost in performances of several synchro-nization policies and their impact on macroscopic properties of simulations. To thataims, we study three different time management mechanisms and evaluate them ontwo multi-agent applications.

Keywords: Distributed simulations, large scale multi-agent system, situated agent-based simulations, synchronization policies.

1 Introduction

Multi-agent systems (MAS) are made of autonomous entities, that interact in anenvironment to achieve their own goals [11], producing emergent properties at themacroscopic level. To simulate millions of agents, we need a huge memory andcomputation. The goal in this kind of applications is not to observe individual in-teractions (microscopic level), but to observe population behaviours (macroscopiclevel). In some cases, if some agents fail or cannot interact as fast as other agents, itshould not be critical to the global simulation outcome.

To achieve such scalability, one can distribute computations over a computer net-work. Nevertheless, in a distributed setting, problematics linked to time manage-ment and synchronization appear and have to be addressed. This paper presents afirst study of synchronization costs in performances and the impact of synchroniza-tion policies on the preservation of emergent macroscopic properties.

The first section details the notion of simulated time and introduce three mainsynchronization policies. The second section introduces the platform that we havedeveloped to experiment synchronization issues. The third and last section detailsexperimentations made on two applications, prey-predator and capture the flag, tobenchmark the impact of synchronization policies on simulation outcomes.

S. Omatu et al. (Eds.): Distrib. Computing & Artificial Intelligence, AISC 217, pp. 19–26.DOI: 10.1007/978-3-319-00551-5_3 c© Springer International Publishing Switzerland 2013

20 O. Rihawi, Y. Secq, and P. Mathieu

2 Time and Synchronization in MAS Simulation

The word time is often defined as a nonspatial continuum in which events occur inirreversible succession from the past through the present to the future (time flownotion [3]). In simulations, several notions of time are involved: user time (the realtime) and simulated time, which is a set of small durations used to produce evolu-tions within a simulation. Simulated time has been defined by Lamport [7] througha logical clock that induce a partial ordering of events, and has been refined in dis-tributed context as Logical Virtual Time (LVT) by Jefferson [5].

In MAS simulations, a common implementation to enable the simulation dy-namic is to query all agents for their current action and to apply this set of actions.This round of talk defines as a simulation tick or Time Step (TS). In centralizedMAS, there is only one TS that organize interactions between agents in a given pe-riod. Whereas, in a distributed MAS, there is one TS per machine which could notbe the same on all. The main problem in such systems is time management betweenmachines [12]. In order to guaranty causality, we have to synchronize TS betweenall machines. However, several policies of synchronization can be proposed. In dis-tributed systems, there are mainly two approaches: conservative (or synchronous)and optimistic (or asynchronous) synchronization [8] [2].

We can define three synchronization policies for distributed MAS simulations:1) Strong Synchronization (SS): in this policy: all machines TS are synchronized.This guaranty that all agents execute the same number of actions. But, the simu-lator needs more messages to synchronize machines. This conservative approachstrictly avoids causality errors but introduce more delays. 2) Flexible Synchroniza-tion: in this policy, machines are allowed to progress at different pace. As optimisticsynchronization, which allows machines to advance in TS with detecting causalityerrors and recovering to previous states by rollback mechanism [4]. This mechanismrolls back by anti-event messages to reconstruct a previous state. But, if there aretoo much rollbacks, communication cost raises. Time Window (TW) synchroniza-tion is another flexible policy that can be proposed. In TW, machines can progressin TS until they reach the biggest possible difference W , between the slowest andfastest machines. With this window permission W , machines can avoid some delayof SS but in the same time, it can affect macroscopic behaviours outcome by al-lowing some agents in different TS to interact. These interactions can be ignored iftheir impact do not affect the simulation. This is a strong hypothesis that is studied insection 4. 3) No Synchronization (NS): last policy simply drops all synchronizationbetween machines. It is like TW policy with ∞ window size. This policy exploitsthe speed of all machines, but it is obviously not fitted for all applications.

To summarise, this paper studies whether synchronization constraints can be re-laxed without impacting macroscopic behaviours emergence.

Synchronization Policies Impact in Distributed Agent-Based Simulation 21

Fig. 1 Architecture of our testbed Fig. 2 Five million agents on 50 machines

3 Testbed to Benchmark Synchronization Policies

To evaluate synchronization policies, we have developed a distributed simulator.Each machine handles a subset of the environment with its agents. The simulatorcan be run with one of these policies: strong, time window or no synchronization.

Figure 1 shows 4 machines that execute a distributed agent-based simulation.Each machine has: local simulation, communication unit and part of the environ-ment with its agents. Local simulation is a top-manager layer, which manages alltasks: from interactions between agents, receiving information from neighbourhoodmachines and local visualization. Communication unit manages exchange messagesbetween machines and informs local simulation about machines TS. In each TS,machines follow 7 main steps: 1) it sends information to all neighbours about theenvironment state near them. 2) it waits for new information from others to informlocal agents about the neighbours’ environments. 3) each machine asks local agentsabout their next desired actions. 4) it sends the external interactions, which are inter-actions between agents from different machines, to others. 5) each machine receivesinteractions from others. 6) possible interactions are applied. 7) finally, local visu-alization and machines go to next TS. These synchronization policies have similarcommunication protocols with small differences. Strong Synchronization (SS) hasin each communication state a notification, which requires an acknowledgementfrom others. Especially for the last state of communication, each machine should besynced for next TS and suspended until all others are ready. In case of Time Windowpolicy, each machine sends a notification of its current TS, and checks if it has per-mission to switch to next TS. If the difference between its TS and slowest machineTS is less than W number of steps (W is user defined) then it can progress to nextTS. Whereas, No Synchronization (NS) policy, machines can progress to next TSwithout any notification.

22 O. Rihawi, Y. Secq, and P. Mathieu

Table 1 Comparison between platforms

Platform NbOfAgents NbOfMachines Model PolicyRepast 68 billions 32000 cores Triangles Model Strong sync onlyDMASON 10 millions 64 Boids Strong sync onlyFLAMEGPU 11000 GPU Pedestrian Crowds GPU-Strong SyncAglobeX 6500 22 cores Airplanes Strong sync onlyOur testbed 100 millions 200 machines Prey-predator SS, TW and NS

To evaluate our testbed scalability, we have implemented a flocking behavioursimilar to Reynolds [10] and run it on 50 machines, each machine holding 100000agents (Figure 2). Many platforms already exist in the domain of distributed agent-based simulation: Repast [9], FLAMEGPU [6], AglobeX [13], and DMASON [1].But all these platforms rely only on strong synchronization. Some platforms dis-tribute the simulation on a network using a middleware, which provides a sharedmemory between Java Virtual Machines. So, it is free from all distribution consid-erations. Others are working with master/slave approaches with only strong syn-chronization mechanism through the server. So, no platform can be considered as atestbed for our work. Table 1 shows a comparison between all these platforms.

4 Experimentations

In this section, we describe two applications that have been implemented and bench-marked to quantify the impact of the three proposed synchronization policies. Itseems obvious that time inconsistency have not the same effect in all applications.For example, the boids application can run without synchronization and still producethe emerging flocking behaviour. Thus, we want to determine with the followingexperimentations the impact of synchronization policies on simulations, more pre-cisely on the expected macroscopic behaviour. To study synchronization impacts,we have implemented one application that is extremely affected by synchronizationissues, while the other is not:

1) The prey-predator (PP) model is a classical multi-agent application that in-volve two kind of agents: preys and predators. Both kind reproduces themselves at agiven pace, but predators seek and eat preys. If a predator do not find preys quicklyenough, it dies of starvation. This application illustrates population co-evolution ina simplified ecosystem. An example of such model is the Wolf-Sheep-Grass simula-tion proposed by Wilensky [14].2) Capture the flag (CTF) model has been developed to illustrate the fact that if asimulation outcome relies on timing issues (population growth speed in this case),thus synchronization policies can introduce a bias. To achieve this goal, we proposethe use of a simplified capture the flag application with two competing populations.For each population, we have two kind of agents: flag agents that produce newattackers at a given rate, and attacker agent that protect their flags or attack the otherpopulation. When two agents attack each other, they both die.

Synchronization Policies Impact in Distributed Agent-Based Simulation 23

4.1 Synchronization Performance

We have executed experimentations on a LAN network where all machines havesimilar hardware. Most experimentations have run until 2 millions TS and the onlyparameter modified is W , the time window size, W = 0 Strong Synchronization (SS),then 10, 100, 1000, 10000, 100000 until ∞ or No Synchronization (NS). Table 2shows that No Synchronization (NS) always gives the maximum speed, becauseit is free from all synchronization issues. But, in some application like CTF, thesimulation outcome is biased.

Table 2 Prey-predator on 4 machines: No Synchronization always performs better

Time Steps 2000 4000 6000 8000 10000SS execution time (hours) 1 2.5 3.5 4.7 6NS execution time (hours) 0.8 1.4 2 2.7 3.4

A comparative test of both models stability (PP and CTF) shows that, PP modelstays stable for more than 2 Millions TSs. For all experimentations, the co-evolutionof PP has been preserved until we reach 2 millions TSs, even without any synchro-nization. Thus, this application is stable with respect to synchronization policies,stable meaning here that all types of agent still exist in the model. Whereas, CTFmodel has been unstable after W is bigger than N a number of steps (N ≥ 0 dependson the initial configuration).

In next sections, we study invalid, internal and external interactions on the stablemodel to see how these interactions are changed when we switch synchronizationpolicies. Then, we study CTF instability in details by exploring initial configurationbiases.

4.2 Interactions Effects on Prey-Predator (PP) Model

External-Interactions (EI) are interactions happening between agents that belongto different machines. Figure 3 shows EI between agents which are executed in PPmodel (with 5000 agents of wolf, sheep and grass), with size of TW: W = 0 or SS, 2,100 and until NS or∞ (all tests until TS = 100000). Results show that for SS we havea lot of EI, this is normal because information about agents can be sent and receivedby other machines. However, NS or TW significantly reduce EI, even with smallwindow size. It can be explained because the information about agents is always sentto others machines, but it is not received from others within the corresponding timestep. Thus, there is not a lot of EI because they are dropped because of differencesbetween time steps. Invalid-Time-Step Interactions happens between two agentscoming from different machines that are not in the same TS. Figures 4 shows thatinvalid interactions percentage increase with time window size (W ). However, this

24 O. Rihawi, Y. Secq, and P. Mathieu

Fig. 3 External interactions in PP modelwith different synchronization polices

Fig. 4 Invalid interactions between 2 & 4machines in PP model

Fig. 5 CTS vs Number of flags in CTFmodel

Fig. 6 T SD for different configurations ofCTF Model with different size of TW (W )

percentage is less than 40% of total interactions. In case of 4 machines, we havedoubled the percentage of two machines, which is because agents can swap between4 machines more often than in two. Again, NS gives more invalid interactions thanTW, because there are more differences between machines TS so information aredropped.

4.3 Capture the Flag Model Instability

As previous experimentations, simulations run on two machines for 2 millions TSand with a TW evolving between 0 to ∞. The first configuration is defined with oneflag per machine. This configuration, nearly like the prey predator model, is stablewith respect to synchronization issues. If we choose another configuration, like 20flags per machine, we get different results. For TW size W > 10000 the model is nomore stable and all flags from one population are captured.

We have defined another initial configuration to evaluate synchronization poli-cies when machines loads are not the same. We have used three machines: the firstcontains all flags from the first population and two other machines contain half flagsof the second population in each. The aim is to have more load on one machine,so the model becomes unstable: the second population should always win becauseits attacker production will be higher. The convergence should be faster with moreflexible synchronization policies, and fastest without synchronization.

We define the Critical Time Step (CT S) as the necessary TS to completely destroythe model if no synchronization has been used. Figure 5 shows that CT S will be

Synchronization Policies Impact in Distributed Agent-Based Simulation 25

decreased by increasing the number of flags, from that CT S = α1F , α1 is constant

which depends on the initial configuration and machines which have been used. Wedefine the Time-Step to Destroy (T SD) as the necessary TS to completely destroythe model if W has been used (T SD = CT S if and only if W = ∞ or NS). Figure6 visualizes results after scaling each configuration to its CTS (as each one hasits own CT S). This figure shows that the T SD decrease if W increase, then andaccording to the figure: T SD/CTS= α2

W/CT S , α2 is constant. If we replace CTS= α1F ,

then T SD = αW×F2 , α is constant. That means, T SD decrease if the number of flags

increase or W has been increased too.Figure 6 also shows that for all configurations the model stay stable for a small

TW. However, and in all configurations, we can divide each curve into two mainparts. The first with W from 0 to 30% of CT S, the model stay stable for a long TSs.That mean, we can give permissions of advancing in TS between different machinesuntil 30% of its CTS, and in this part W strongly affect all curves. The second partwith W bigger than 30% of CT S, the T SD decreases slowly according to W .

5 Conclusion

To simulate billions of interacting agents, we have to distribute the simulator. Asafe approach consists in splitting the environment into smaller parts and using astrong synchronization policy, but it implies a high cost in message exchanges andexecution time. This paper has explored a relaxation of this constraint to speed upexecution time and has identified applications where this relaxation do not degradesimulations outcome.

We have studied three synchronization policies for distributed multi-agent sim-ulations: Strong Synchronization, Time-Window Synchronization and No Synchro-nization. Experimentations show that some applications, like prey-predator model,stay stable with any synchronization policy. Whereas in others models, like capturethe flags, it can be strongly affected by changing these policies. We have studiedhow interactions are changed when we switch the synchronization policies on prey-predator model and we have explored in details the instability of capture the flagsmodel when a biased-initial configuration is used.

Experimentations presented in this paper are a first step, we have to experimentother kind of applications to illustrate synchronization policies impacts and see ifresults presented in this paper are suitable for other applications. For example, emer-gency scenario of town simulation can be calculated faster with No Synchronizationpolicy than Strong Synchronization.

References

[1] Cordasco, G., De Chiara, R., Mancuso, A., Mazzeo, D., Scarano, V., Spagnuolo, C.:A framework for distributing agent-based simulations. In: Alexander, M., et al. (eds.)Euro-Par 2011, Part I. LNCS, vol. 7155, pp. 460–470. Springer, Heidelberg (2012)

[2] Fujimoto, R.M.: Parallel and distributed simulation systems. Wiley (2000)

26 O. Rihawi, Y. Secq, and P. Mathieu

[3] Gold, T.: Why time flows: The physics of past & future. Daedalus 132(2), 37–40 (2003)[4] Gupta, B., Rahimi, S., Yang, Y.: A novel roll-back mechanism for performance en-

hancement of asynchronous checkpointing and recovery. Informatica 31, 1–13 (2007)[5] Jefferson, D.R.: Virtual time. ACM Trans. Program. Lang. Syst. 7, 404–425 (1985)[6] Karmakharm, T., Richmond, P., Romano, D.: Agent-based large scale simulation of

pedestrians with adaptive realistic navigation vector fields. In: Theory and Practice ofComputer Graphics, pp. 67–74 (2010)

[7] Lamport, L.: Ti clocks, and the ordering of events in a distributed system. Commun.ACM 21, 558–565 (1978)

[8] Logan, B., Theodoropoulos, G.: The distributed simulation of multiagent systems. Pro-ceedings of the IEEE 89(2), 174–185 (2001)

[9] Minson, R., Theodoropoulos, G.K.: Distributing repast agent-based simulations withhla. In: Euro. Simulation Interoperability Workshop, pp. 04–046 (2004)

[10] Reynolds, C.: Steering behaviors for autonomous characters (1999)[11] Russell, S.J., Norvig, P.: Artificial intelligence: a modern approach. Prentice-Hall

(1996)[12] Scerri, D., Drogoul, A., Hickmott, S., Padgham, L.: An architecture for modular dis-

tributed simulation with agent-based models. In: AAMAS 2010 Proceedings, pp. 541–548 (2010)

[13] Sislak, D., Volf, P., Jakob, M., Pechoucek, M.: Distributed platform for large-scaleagent-based simulations. In: Dignum, F., Bradshaw, J., Silverman, B., van Doesburg,W. (eds.) Agents for Games and Simulations. LNCS (LNAI), vol. 5920, pp. 16–32.Springer, Heidelberg (2009)

[14] Wilensky, U.: Netlogo wolf-sheep predation model (1997)

Parallel Hoeffding Decision Treefor Streaming Data

Piotr Cal and Micha�l Wozniak

Wroc�law University of Technology,Department of Systems and Computer Networks,Wybrzeze Wyspianskiego 27, 50-370 Wroc�law, Poland{piotr.cal,michal.wozniak}@pwr.wroc.pl

Abstract. Decision trees are well known, widely used algorithm for buildingefficient classifiers. We propose the modification of the Parallel Hoeffding Treealgorithm that could deal with large streaming data. The proposed methodwere evaluated on the basis of computer experiment which were carried onfew real datasets. The algorithm uses parallel approach and the Hoeffding in-equality for better performance with large streaming data. The paper presentthe analysis of Hoeffding tree and its issues.

Keywords: machine learning, supervised learning, decision tree, parallel de-cision tree, pattern recognition.

1 Introduction

Nowadays decision trees have a numerous algorithms for creating a very goodclassifiers. They are used in recognition, data mining, decision support sys-tems and many others. Main advantages of decision trees are readability(especially with small number of attribute), not large complexity, noise re-sistance and mostly high accuracy. They are often used in expert systemswhere data are represented as a pair of attributes vector and output value(class). In decision trees, some measures of information gain are used in orderto choose the best attribute [9]. They are several good methods to computeinformation gain so that no special attribute type was treated as better orworse.

Very popular and basic algorithms are ID3 [11] and its extension to C4.5[12], which could handle with continuous attributes and missing values. Thoseand other methods were not previously designed in the direction of largedata computing, which became very important issue for the practical use. Tofind solution of this problem, the modification of algorithms was done by theparallelization of known methods or by the invention new parallel algorithms.

It is not necessary to have all data from a large dataset to split the node.Sometimes a part of data is just enough as shown by Domingos and Hulten[2]. They use Hoeffding inequality [3] to evaluate the amount of data needed

S. Omatu et al. (Eds.): Distrib. Computing & Artificial Intelligence, AISC 217, pp. 27–35.DOI: 10.1007/978-3-319-00551-5_4 c© Springer International Publishing Switzerland 2013

28 P. Cal and M. Wozniak

to split the node. The trees which use this technique are called Hoeffding treesand they work better with non-continuous attributes. Hence, a modificationof the tree algorithm is needed, for example such as the modification providedby Agrawal and Jin [5]. They use few methods from algorithm called SPIES[6]. Also, the improvment of hoeffding tree is made by adding the optionnodes [10], [4].

The parallelization of algorithms can be done in different ways. A methodcalled PDT (Parallel Decision Trees) was proposed by Kufrin [8]. The algo-rithm works with master-slave architecture and splits the data among slaveswhich generate statistics. In [13], few techniques of parallelization was ana-lyzed for LDT and C4.5 algorithms. They use feature, node and data basedparallelization and show speedup for few popular datasets. Another methodwhich is dedicated to the streaming data is SPDT proposed by [1] . Eachprocessor constructs histograms and send information to a master processorwhich splits a node.

Currently the data counted in millions are common. Sometimes the numberof data is too large to create satisfied classifiers in satisfied time. We can useweak classifiers in multiple classifier system [7] but it could couse deacreas inaccuracy. Additionaly, sometimes we want to rebuild classifiers to keep highaccuracy with following data, because the concept of this data has changed.Hoeffding inequality gives us important information. It shows that only partof the data is needed to make sure, that chosen attribute is the best forall data sets. Using parallelization with Hoeffding inequality, we can buildaccurate decision trees very fast.

In addition the power of single processor unit stops increasing because ofphysical barrier. But still, computation power is growing by using multipro-cessors architecture. Creating a parallel solutions is very important to adjustthe efficiency of algorithms with devices possibilities.

The paper proposes Parallel Hoeffding Decision Tree algorithm. The maingoals were the evaluation of efficiency of this solution. Especially, the paperfocuses on the analysis of time and the influence of Hoeffding inequality. Theproposed method was evaluated on several real datasets.

2 Algorithm

In this section we describe main features of this parallel solution. Proposedalgorithm constitutes the extension of the Quinlan algorithm ID3 [11]. Inorder to choose the best attribute on the given node, this method uses entropyto compute an information gain.

Although, the complexity of computation is not high, the algorithm couldrun too slow for large streaming data. For this reason we use Hoeffding in-equality. It will allow us to take only a part of the data with security thatthe chosen attribute will be the same as for the whole data [2].

Suppose r is a random variable whose range is R (for an information gain itis logc, where c is the number of classes). After its n independence observation,

Parallel Hoeffding Decision Tree for Streaming Data 29

we have its average value r . Then, with Hoeffding dependency, we know thatthe real value of the r is less or equal r − ε with 1 − δ probability, where εcan be computed from equation (1).

ε =

√R2 ln(1δ )

2n(1)

The advantage of this solution is independence from data distribution. Butthe size of data subset could be bigger than some other limitation methodswhich relay on data distribution.

Bearing this in mind, our algorithms have to compute information gainfor all the valid attributes of this node using the part of the data. After thisprocess, the values of information gain for the best attribute (Xa) and thesecond best one (Xb) are stored and compared (2).

ΔG = Gain(S,Xa)−Gain(S,Xb) ≥ 0 (2)

Next we determine the value of δ, and then Hoeffding dependency guaranteesthat Xa is the best attribute to split the node with probability 1 − δ, ifsize of the subset is n and ΔG ≤ ε (1 and 2). If this does not happen thenode has to wait for the additional data. After next data flow the processof choosing attribute is repeated. Nodes which satisfy condition are calledHoeffding nodes and algorithm performs split operation to build deeper nodesif it is needed.

We construct the parallel version of attribute processing. The algorithmneeds to get a gain value from all available attributes to split node. Everyattribute can be processed independently from another. We use the verycommon master slave architecture. The main processor (workstation, core)called ”master” assigns a tasks to another processors called ”slaves”. In ourcase these tasks are based on a computation of information gain for a specifiedattribute. The master is responsible for assigning and collecting results fromslaves. After collecting any results, the master checks if the gain is actually thebest one or the second best one for the node and the master stores it. Aftercollecting results for all available attributes, the master checks Hoeffdinginequality and then decides whether to split node or to wait for more data.The main master procedures are presented in pseudocode (1).The ”receiveresults” function simply collects results from one slave, updates best gain andsecond best gain if necessary and put free processor to the set of availableprocessors. The function ”do task” is run for a dedicated slave and computesan information gain.

All slave tasks are to find the information gain for a given attribute. Themaster does not have to send all features from samples but only a relevant one.This spares a network recurses which are very important for large datasets. Ifan attribute is discrete, a slave has to simply compute the information gain.But if the attribute is continuous, a slave creates fixed number of intervalsand treats value in the one interval as one discrete value. This operation is

30 P. Cal and M. Wozniak

Algorithm 1. parallel attribute processing (master)

Require: {a0, a1, . . . , an} ∈ A – set of available attributes{p0, p1, . . . , pk} ∈ P – set of available processors (slaves)S – set of samples (instances)g – gainATTRIBUTE PROCESSING (P,A,S)while A �= ∅ do

if P �= ∅ thentake pi ∈ P , aj ∈ Ado parallel(pi) DO TASK (pi, aj , S)P = P − pi, A = A− aj

elseRECEIVE RESULTS (p, a, g)

end ifend whilewhile P �= k do

RECEIVE RESULTS (p, a, g)end while

needed because Hoeffding Tree works better with discrete attributes. Afterprocessing, information about intervals is also send to the master node. Al-gorithm creates one additional interval because when streaming data flow,the value which does not match any intervals could appear.

The proposed algorithm can be configured by user to build strongly over-trained deep trees and trees adapted to the specific data. Created node be-came Hoeffding node if satisfy Hoeffding inequality or became a temporaryleaf. Temporary leaves can be treated like a normal internal nodes (and buildwithout Hoeffding inequality) or like normal leaf. Because algorithm worksfor streaming data, if more samples appear on the temporary leaf, it will bereconsidered as a potential Hoeffding node again.

The application was created using C++ programing language. We use MPI(message passing interface) library which is designed for the message passingcommunication. In contrast to the the shared memory communication whichcan work in the shared memory architecture, message-passing can work alsoon the distributed memory architecture. This way, we can run our algorithmon one multi-core workstation and on any computer cluster which supportsMPI.

3 Experiment

The main goal of experiment is to show the speedup of proposed method andanalysis of issues related to the Hoeffding Tree on real data sets.

3.1 Data Sets

We use few popular data sets from UCI repository to evaluate the perfor-mance of algorithm. Table (1) presents names, number of classes, size andnumber of attributes for the each of them.

Parallel Hoeffding Decision Tree for Streaming Data 31

Table 1 Datasets description

name classes sizeattributes

continuous discrete

abalone 27 4177 7 1

isolet 28 6238 617 0

census 2 100000 7 33connect-4 3 67557 0 42

covtype 7 581012 10 44

3.2 Methodology

All tests are carried out on the cluster of workstation (COW) with 9 comput-ers connected with Ethernet network for the distributed memory architectureand on the computer with 8-core CPU with 3.3 GHz each for shared memoryarchitecture. On the single workstation in COW we run virtual machine withdesignated one core 3.1 GHz and Ubuntu operating system. Besides, the ap-plication is designed for steaming data, we run it with all available data atonce.

3.3 Evaluation Method

The time of building tree is computed for different number of slaves from1 to 8. We configure the application to build a full overtrained tree and aparametrized tree (parameters are selected for datasets to avoid very deeptree). We run application five times for all slaves configurations and mem-ory architecture each and calculate average. The reference time is a time forconfiguration with one slave because the master node controls tree buildingprocess and cannot compute information gain. We use speedup term but it isdifferent to some extend because our reference time is not from sequential al-gorithm but from one slave configuration and the same memory architecture.However, the time of sequential version can be compared to the time of oneslave configuration in shared memory architecture. In addition, tests carriedout on the distributed memory architecture (COW) use the Fast Ethernetnetwork (100 Mb/s)and network overhead is much more bigger than in thenetworks designed for computer clusters.

3.4 Results

Table 2 and table 3 show the distribution of nodes in full overtrained andparametrized trees. The number of Hoeffding nodes is very small and fordatasets with the small amount of training instances, it equals zero. Thepresented accuracy is conducted on training datasets so it only shows thattree is built correctly. For overtrained configuration, the number of Hoeffdingnodes is greater because it has simply more internal nodes. But when we

32 P. Cal and M. Wozniak

Table 2 Distribution of nodes in full overtrained trees for different datasets. δ = 0.1

dataset instances nodes internal nodes hoeffding nodes leaves accuracy

abalone 4177 4106 868 0 3238 0,64

isolet 6238 3232 646 0 2586 1census 100000 58900 6345 207 52555 0.99

connect-4 67557 41612 13870 174 27742 1

covtype 581012 1867263 858175 202 1009088 0.92

Table 3 Distribution of nodes in parametrized trees for different datasets. δ = 0.1

dataset instances nodes internal nodes hoeffding nodes leaves accuracy

abalone 4177 844 171 0 673 0.4

isolet 6238 711 142 0 569 0.81

census 100000 17439 1368 9 16071 0.96

connect-4 67557 4390 1463 58 2927 0.81covtype 581012 76387 29040 133 47347 0.83

Table 4 Location of Hoeffding nodes and sample flow. HN - Hoeffding nodes, IN -internal nodes, δ = 0.1

census connect-4 covtype

deep HN IN sample HN IN sample HN IN sample

1 0 1 100000 0 1 67557 1 1 581012

2 0 10 62486 2 3 67557 2 4 581012

3 1 111 55224 0 8 63020 5 8 5189974 3 251 39416 4 19 53217 4 17 504311

5 2 279 27320 4 42 44936 9 35 485617

deeper 3 48 112

look on the parametrized configuration, the ratio of Hoeffding nodes to theinternal nodes is bigger for covtype and connect-4 datasets. From a practicalpoint of view, we want to have Hoeffding nodes on the higher level in treeswhere a lot of data come.

Table 4 shows where Hoeffding nodes are located in trees for three datasetsand parametrized configuration. For census dataset the first Hoeffding nodeshows only at level three. This weak result could be caused by class distribu-tion in this dataset. Census has two classes and the majority of instances arefrom one class. This causes that information gain provided by the attributecould be very similar to another. In this case we need a much more instancesto meet Hoeffding inequality.

Better results are shown for connect-4 and covtype datasets. Especially forcovtype, we have a good number of Hoeffding nodes in higher levels of tree.Due to these nodes, we do not have to use all data to choose the best attributeto split tree. Thus it could reduce computation time. Because application isdesigned for streaming data, once we establish Hoeffding nodes, we do nothave to check more data if all its ancestors are Hoeffding nodes too. Time for

Parallel Hoeffding Decision Tree for Streaming Data 33

Fig. 1 Speedup for parametrized and full overtrained tree for distributed and sharedmemory architecture. Reference time is one slave configuration. δ = 0.1

updating the tree is reduced but we should mention that this manner couldspare time only if concept drift does not occur.

Fig 1 shows speedup (acceleration) of the algorithm according to the num-ber of slaves. In both architecture the best results are achieved for isoletdataset. Isolet has above 600 attributes and all of them are continuous. Con-tinuous attributes need more computer power because they firstly must beconverted to discrete ones. In the shared memory architecture the speedup isoften insignificant especially for more then three threads. The master nodecannot send tasks and data as fast as they are calculated by slaves. Thesolution of this problem could be fixed by using shared memory commu-nication because it prevents algorithm from copying data to the slaves. Indistributed memory architecture, the speedup is better for all datasets. Alsothe best results are achieved for isolet data. Because speedup is measuredto the reference time of one slave configuration we do not see the differencebetween the parametrized and the overtrained tree configuration. However,the time of full overtrained tree is always at least three times greater thanfrom parametrized version.

In the cluster of workstation tests, we can see that the decreasing ofspeedup growth is irregular. The reason for this situation is that used net-work is not only for processors communication and some noise traffic couldbe generated by operating system.

34 P. Cal and M. Wozniak

4 Remarks

The application increases the performance of building tree in two ways. First,thanks to Hoeffding nodes we do not have to use all data to split the treein a node or rebuild nodes if their ancestors are also Hoeffding nodes andwe can assume that concept drift does not occur. Next, the parallelization ofalgorithm gives possibility to gain the acceleration of computation. Besidesthat we only parallelize a part of the algorithm where we are looking forthe best attribute to split the node, the speedup is quite effective. However,the master slave architecture and attribute searching parallelism cause thatthis approach is not scalable well. In our tests, when we use very high speedcommunication (shared memory architecture) the increase of speedup wasnot effective after using 3-4 threads. The situation is more optimistic whenwe use dataset with large number of continuous attributes.

The provided solution is created for streaming data. If we want to havea good classifier, we need to improve it as long as we get new data. Oursolution with Hoeffding inequality allow systems to collect a large set of dataand build a tree possibly similar to tree built on the basis of infinite data set(with a given probability).

Our algorithm uses MPI library which gives it possibility to work withshared and distributed memory architecture. However, the performance ishighly depending on communication between the master node and slaves.We can assume that our parallel approach is better for the shared memoryarchitecture because in many modern machines the communication betweenprocessors (threads) is faster than in the distributed memory architecture.Adding the parallel processing of nodes could increase scalability and perfor-mance which will be next improvements in our application.

References

1. Ben-Haim, Y., Tom-Tov, E.: A streaming parallel decision tree algorithm. J.Mach. Learn. Res. 11, 849–872 (2010)

2. Domingos, P., Hulten, G.: Mining high-speed data streams. In: Proceedings ofthe Sixth ACM SIGKDD International Conference on Knowledge Discoveryand Data Mining, New York, NY, USA, pp. 71–80 (2000)

3. Hoeffding, W.: Probability inequalities for sums of bounded random variables.Journal of the American Statistical Association, 13–30 (1963)

4. Ikonomovska, E., Gama, J., Zenko, B., Dzeroski, S.: Speeding-up hoeffding-based regression trees with options. In: ICML, pp. 537–544. Omnipress (2011)

5. Jin, R., Agrawal, G.: Communication and memory efficient parallel decisiontree construction. In: The 3rd SIAM International Conference on Data Mining(2003)

6. Jin, R., Agrawal, G.: Efficient decision tree construction on streaming data. In:Proceedings of the Ninth ACM SIGKDD International Conference on Knowl-edge Discovery and Data Mining, New York, NY, USA, pp. 571–576 (2003)

Parallel Hoeffding Decision Tree for Streaming Data 35

7. Kacprzak, T., Walkowiak, K., Wozniak, M.: Optimization of overlay distributedcomputing systems for multiple classifier system - heuristic approach. LogicJournal of the IGPL 20(4), 677–688 (2012)

8. Kufrin, R.: Decision trees on parallel processors. In: Parallel Processing forArtificial Intelligence 3. Elsevier Science, pp. 279–306. Elsevier (1995)

9. Mitchell, T.M.: Machine Learning, 1st edn. McGraw-Hill, Inc., New York (1997)10. Pfahringer, B., Holmes, G., Kirkby, R.: New options for hoeffding trees. In:

Orgun, M.A., Thornton, J. (eds.) AI 2007. LNCS (LNAI), vol. 4830, pp. 90–99.Springer, Heidelberg (2007)

11. Quinlan, J.R.: Induction of decision trees. Mach. Learn. (1986)12. Quinlan, J.R.: C4.5: Programs for Machine Learning. Morgan Kaufmann (1993)13. Yildiz, O.T., Dikmen, O.: Parallel univariate decision trees. Pattern Recogn.

Lett. 28(7), 825–832 (2007)

Stochastic Decentralized Routing of UnsplittableVehicle Flows Using Constraint Optimization

Maksims Fiosins�

Clausthal University of Technology, Julius-Albert Str. 4,D-38678 Clausthal-Zellerfeld, [email protected]

Abstract. A decentralized solution to the unsplittable flow problem (UFP) in atransport network is considered, where each flow uses only one route from sourceto sink and the flows cannot be separated into parts in intermediate nodes. The flowcosts in each edge depend on the combination of the assigned flows as well as onexternal random variables. The distributions of the random variables are unknown,only samples are available. In order to use the information available in the samplesmore effectively, several resamples are constructed from the original samples. Thenodes agree on the resamples in a decentralized way using a cooperative resamplingscheme. A decentralized asynchronous solution algorithm for the flow routing prob-lem in these conditions is proposed, which is based on the ADOPT algorithm forasynchronous distributed constraint optimization (DCOP). An example illustratingthe proposed approach is presented.

1 Introduction

The network flow routing is important for different applications, such as traffic man-agement, logistics, and telecommunications. In the present paper we focus on a spe-cial case of the flow routing problem, namely that of unsplittable flows. This meansthat, in contrast to the usual formulation, the flows in the considered network cannotbe split; each flow should use only one route from the source to the sink.

The considered problem corresponds to the routing of several vehicle flows in anurban street network. This network includes sources and sinks, and a set of the flowsof vehicles that are moving from the sources to the sinks (each flow correspondsto a specific origin-destination pair). The vehicles and intersection controllers areequipped with communication devices that allow them to transmit information andestablish short-term peer-to-peer communication. No centralized regulation in theconsidered system is performed; the intersection controllers decide in a decentral-ized manner how each vehicle flow is to be routed. For this purpose, they commu-nicate with neighboring intersections and agree on the routing policy [7].

� Supported by the Lower Saxony University of Technology (NTH) project ”Planning andDecision Making for Autonomous Actors in Traffic” (PLANETS).

S. Omatu et al. (Eds.): Distrib. Computing & Artificial Intelligence, AISC 217, pp. 37–44.DOI: 10.1007/978-3-319-00551-5_5 c© Springer International Publishing Switzerland 2013

38 M. Fiosins

Approaching an intersection, a vehicle sends its source and destination to theintersection controller. Based on this information, the intersection controller rec-ommends the direction in which the vehicle should proceed. Note that the vehicleflows are supposed to be unsplittable, which means that to the vehicles with thesame source-destination combination the same direction at each intersection will berecommended. This limitation is usually introduced in order to simplify the routingprocess and make the controllers’ decisions clearer for traffic participants.

The general problem is to reduce the total travel time in the network. The traveltime along a street depends on the number of vehicles situated in this street. Wesuppose that this dependence is not linear and corresponds to the fundamental trafficdiagram. Also external random factors (incidents, weather etc.) influence the traveltime in the streets. The distributions of the random variables are unknown; onlysample populations are available.

We investigate a decentralized solution to the considered problem. For this pur-pose, we formulate the problem in the form of distributed constraint optimization(DCOP). However, standard algorithms for DCOP, such as DPOP [15] or ADOPT[13], cannot be used directly. An additional difficulcy is maintaining random vari-ables.

The contribution of this paper as follows. First, we modify the ADOPT [13] algo-rithm to obtain an asynchronous distributed method for the problem of unsplittablenetwork flow routing. And second, we add the capability to work with random vari-ables, represented by samples, by combining the collaborative sampling approachof E[DPOP] with resampling when the distributions are partially known.

The paper is organized as follows. In Section 2 the state of the art is considered.Section 3 presents a formal problem statement. In section 4 we describe our solutionapproach. In section 5 we illustrate our approach with a numerical example. The lastsection contains conclusion and final remarks.

2 State of the Art

Classical maximum network flow (MNF) problem has been extensively examinedin the literature. A standard Ford-Fulkerson algorithm [8] or network simplex algo-rithm [10] can be used to solve it effectively. An important type of MNF problemsis the multi-commodity flow problem, where multiple flow demands between dif-ferent source and sink nodes exist. For the case of more than two commodities nopolynomial-time algorithms are known. Simple efficient algorithms solve this prob-lem for restricts classes of graphs or in the case of fractional flows [11].

If it is required that each of the flows uses one route only, the problem becomesan unsplittable flow problem (UFP). This problem has been of interest during thelast years due to its complexity and practical importance. A number of polynomialalgorithms for the restricted versions of the problem have been developed [5].

Introducing stochastic components into UFP exacerbates this problem. A dy-namic network flow model for a network that changes over time was introduced byFord and Fulkerson [8] and extended by Glockner and Nemhauser for random arccapacities [9]; in this case, a multistage stochastic linear program can be used. These

Decentralized Asynchronous Routing of Unsplittable Vehicle Flows 39

models are used to introduce stochastic components in inventory models, bottlenecktransportation problem [1], etc.

In the case of solvers’ distribution, the UFP can be solved using DCOP methods.There are two main approaches for obtaining the exact solution to DCOP: dynamicprogramming (DPOP) [15] and deep search (ADOPT) [13]. DPOP requires a linearnumber of messages, but exponential message size. ADOPT operates with linearsized messages, but the number of messages is exponential. In this paper, we willmodify the ADOPT algorithm, because the memory size and one-message trans-mission time are limited for technical reasons. In addition, ADOPT allows asyn-chronous solutions, which are stable when communication delays or failures occur.Many applications of DCOP were developed, for example, for EDP, agent plan co-ordination, security in logistics operations [14], etc.

Stochastic DCOP (SDCOP) [12] is a special type of DCOP that incorporates theadditional influence of random variables. When the distributions of random vari-ables are unknown, the resampling approach can be effective [2], [3]. During theresampling procedure, the random samples are formed several times (”resamples”),the estimator of interest is calculated for each resample (”resampling estimators”),and the resampling estimators are then joined to produce a solution [6]. Various ap-proaches for SDCOP were developed, for example independent utility distributions[4] or the E[DPOP] algorithm based on collaborative sampling [12]. We use thisapproach to introduce stochastic components into the ADOPT algorithm.

3 Problem Formulation

We consider a part of a city, represented by a transport network, a type of directedgraph G = (V,E) that contains exactly one node (source) of in-degree 0, exactly onenode (sink) of out-degree 0 and no loops.

Let E+(v) ⊂ E be a set of edges, leaving the vertex v ∈ V and E−(v) ⊂ E a setof edges, entering the vertex v ∈ V . Let N+(v) ⊂ V be an out-neighborhood of thevertex v ∈V : N+(v) = {u ∈V : e(v,u)∈ E+(v)}, N−(v)⊂V be an in-neighborhoodof the vertex v∈V : N−(v) = {u∈V : e(u,v)∈ E−(v)}. For simplicity of the follow-ing description we suppose that there is maximally one edge between each pair ofneighbor vertices, which implies |E+(v)|= |N+(v)| and |E−(v)|= |N−(v)| ∀v ∈V .We write n+(v, i) to refer the i-th out-neighbor vertex of v, e+(v, i) to refer the i-thout edge of v, i = 1,2, . . . , |N+(v)|.

Suppose U = {u1,u2, . . . ,um} is the set of unsplittable flows that should be routedin this network. We represent the flow routing as follows. Let U(e)⊂U be a subsetof the flows, actually routed through the edge e ∈ E . Denote U−(v) = ∪e∈E−(v)U(e)a set of the flows entering the vertex v and U+(v) = ∪e∈E+(v)U(e) a set of the flowsleaving the vertex v. For all vertices v ∈V , excluding source and sink, we require

U−(v) =U+(v), (1)

so we will usually write U(v) to refer the flows in the intermediate vertex v ∈V . Aswell, U+(source) =U−(sink) =U , U−(source) = /0, U+(sink) = /0.

40 M. Fiosins

A routing of the flows at the vertex v ∈ V is a decision, according to which thecontroller of the vertex v assigns the flows from U(v) to the edges from E+(v) (andaccordingly to the vertices from V+(v)). In fact, such decision is an ordered partitionof the set U(v) to |N+(v)| non-overlapping subsets. Let d(v,u) ⊂ U(v) be a set ofthe flows, which are routed to the out-neighbor u ∈ N+(v) of the vertex v (throughthe edge e(v,u) ∈ E+(v)). We require ∪u∈N+(v)d(v,u) =U(v), ∩u∈N+(v)d(v,u) = /0.Define d(v) =< d(v,u)|u ∈ N+(v)>.

Let D(v,U(v)) be a set of all partitions, which are allowed for current flow setU(v) of the vertex v ∈ V . So the partition d(v) is allowed, if d(v) ∈ D(v,U(v)). IfD(v,U(v)) = /0, this means that the flow set is not allowed for the vertex v; the vertexwill have infinity local cost in this case.

The random factors such as weather, incidents, activities in the city etc. influencethe traffic conditions. For this purpose we introduce a set of random variables Y ={Y1,Y2, . . . ,Yk}. The distributions of the variables Y are unknown, only samples Hi

of (historical) observations are available. We denote the sets Yv,u ⊂ Y , which havean influence in the edges e(v,u) ∈ E .

The cost of the flow at the edge e(v,u) ∈ E is defined by a cost functionfv,u(U(e(v,u)),Yv,u), which depends on the flows U(e(v,u)) ⊂ U assigned to theedge e(v,u) ∈ E as well as the random variables Yv,u. The flow cost for a wholenetwork is a sum of the costs over all edges:

F(U) = ∑e(v,u)∈E

fv,u(U(e(v,u)),Yv,u). (2)

In order to satisfy the constraint (1) we rewrite (2) in respect to the vertices. Eachvertex v ∈ V forms a partition d(v) ∈ D(v,U(v)) for its flows U(v), where the setof flows d(v,u) is sent to the neighbor u ∈ N+(v) through the edge e(v,u) ∈ E+(v).The cost for the edge e(v,u) is fv,u(d(v,u),Yv,u). So we have

F(U) = ∑v∈V

∑u∈N+(v)

fv,u(d(v,u),Yv,u), d(v) ∈ D(v,U(v)), (3)

where for each v ∈V except a source

U(v) = ∪u∈N−(v)d(u,v). (4)

Our goal is to minimize the expectation of (3)

EY [F(U)]→ min (5)

with respect to constraints (4) by calculating the partitions d(v) ∈ D(v,U(v)).Our goal is to describe decentralized approach to this problem solution. An ad-

ditional requirement to the algorithm is that it should be asynchronous and reliableto the possible failures in communication. We developed a method for the flowsrouting in a transport network, which is in fact a modification of ADOPT algorithm.

4 Proposed Algorithm

Suppose that each vertex v ∈ V is controlled by an agent a(v) ∈ A, where A is a setof agents controlling the intersections. The costs fv,u(·) are available to the agent

Decentralized Asynchronous Routing of Unsplittable Vehicle Flows 41

a(v) only locally. The communication is possible with neighbor agents, namely theagent a(v) sends messages and receive answers from the agents a(u), u ∈ N+(v).

First, a Deep First Search (DFS) tree T from the initial network G is produced.The procedure of DFS tree construction is rather standard and can be executed inlinear time depending on the number of vertices. We call the edges that do not belongto T as back edges. Define P(v) ∈V a parent of a vertex v ∈V in the DFS tree.

For the case of small samples it is more attractive to perform the resamplingprocedure, which allows to use data in different combinations [2], [3]. However asour algorithm is decentralized, it is important that the same samples are used incalculations. We use a collaborative resampling approach for this purpose.

The algorithm uses r resample sets. Each resample set q, q = 1,2, . . . ,r containsthe resamples with replacement of a length n j for the variables Yj ∈Y . It produces rsolutions, one for each resample set, which are later joined to a single final solution.

Denote H∗qj (v) a q-th resample of random variable Yj, used by the node v, H∗(v)

the information over all random variables and all resamples. The node v forms thesets of the samples H∗q

v,u(v) for each edge e(v,u) ∈ E , which correspond to variablesYv,u and uses them in the cost calculation.

The source node performs the resampling for the outgoing edges by sampling thevariables

⋃u∈N+(source)Ysource,u, stores this information in H∗q(source,u) and sends

the samples to its child nodes. By receiving the samples from its parent, the childnode u updates its local sample information H∗(u), sends it to its children as wellas informs its parent in DFS tree about the actual samples. By receiving the sampleinformation from its children, if the node detects some changes in the samples, itsends the sample information to its children as well as parent in the DFS tree.

Each agent a(v) maintains a set CurrentFlows∗q(v), q = 1, . . . ,r, which containspairs of neighbor edges together with corresponding sets of the flows sent betweenthem; the q-th resampling set was used for their calculation:

CurrentFlows∗q(v) = {(u1,w1,d∗q(u1,w1)),(u2,w2,d

∗q(u2,w2)), . . .},where wi ∈ N+(ui); ui and wi can be possibly equal to v and d∗q(ui,wi) is a flowdecision according to the q-th resampling realization of the random variables. Thismeans that CurrentFlows∗q(v) contains a partial solution of the flow routing prob-lem, known to the agent a(v).

The elements (u,v,d∗q(u,v)) ∈ CurrentFlows∗q(v), u ∈ N−(v) define a set ofknown incoming flows for the node v. We refer this set as U(v,CurrentFlows∗q(v)).

U(v,CurrentFlows∗q(v)) =⋃

(u,v,d∗q(u,v))∈CurrentFlows∗q(v)

d∗q(u,v). (6)

Now let us define an average local cost of a node v with respect to random fac-tors Y . The random factors for the edge e(u,v) are represented by the resamplingsets H∗q

u,v(v). The q-th local cost, q = 1,2, . . . ,r is defined as an average cost of thepartition d(v) calculated by the q-th resampling set:

δ ∗q(v,d(v)) = ∑u∈N+(v)

avgH∗q

v,u(v)

fv,u(d(v,u),H∗qv,u(v)). (7)

42 M. Fiosins

Further a lower bound variable is defined for each possible partition d(v) is

LB∗q(v,d(v)) = δ ∗q(v,d(v))+ ∑u∈N+(v)

lb∗q(v,u,d(v,u)), (8)

where lb∗q(v,u,d(v)) is a field of the node v, which contains a cost information(LB field) from the child node u if a set of the flows d(v,u) is sent there and q-th resampling subset is used for calculations. This information is transmitted fromchild to parent using the COST messages.

The corresponding lower bound value over all partitions is defined as:

LB∗q(v) = mind(v)∈D(v)

LB∗q(v,d(v)). (9)

The FLOWS message (analog of VALUE message in the ADOPT algorithm) in-forms the child nodes about the partition assignments. The agent a(v) stores aset d∗(v) = {d∗q}, q = 1,2, . . . ,r of the partitions, which correspond each resam-pling set. If the agent decides to change (or first selects) some of the partitionsd∗q(v) ∈ D(v), it sends a FLOWS message to all its child nodes u ∈ N+(v). TheFLOWS message contains a set of flows, sent from the parent node v to the childnode u according to each of the partitions d∗q(v), so d∗q(v,u).

The child agent answers to the FLOWS message by the COST message. Notehowever, that the agent sends all COST messages to its parent P(v) in the DFS treeonly. Other parent nodes will receive this information indirectly. The COST mes-sage contains the fields LB∗q(u) as well as CurrentFlows∗q(u) of the child node u.By receiving the COST message from the child node u, the parent node v saves thevalues LB∗q(u) in the fields lb∗q(u,d∗q(v)), which correspond to its current parti-tions d∗q(v), if it did not change them since the FLOWS message was sent.

5 Experimental Results

We consider the flows U = {u1,u2, . . . ,u7} in a simple transportation network. Wesuppose that there are three random factors Y1, Y2 and Y3, which take values from theset {0,1}. The probabilities of these values are unknown, only samples are available.

The cost functions fv,u(U(e(v,u)),Yv,u) are defined for each node. Each functioncontains a cost of sending each subset U(e(v,u)) ⊂ U of the flows. In general, itshould be defined for all 27 − 1 = 127 combinations of possible flows; however theedges can contain less flows that reduces dimension. Another dimension for the costfunction are possible values of random variables Yi. Table 1 presents a cost functionfe() definition of the edge e, which depends on the random variables Y1 and Y3.

Now we set a number of the resamples r = 10 and the size of each resamplen = 20. The nodes agree about the used resamples and the set of solutions for eachresample set was calculated. Table 2 presents the obtained solution.

Some of the results are the same, which correspond to the same (or similar)agreed samples. They can be just averaged, and the average corresponds to theresampling point estimator of the solution. As well it is possible to construct thedistribution of the solution, construct its resampling confidence interval etc.

Decentralized Asynchronous Routing of Unsplittable Vehicle Flows 43

Table 1 Cost function fe(U(e),{Y1,Y3}) for the edge e

Y1 = 0;Y3 = 0 Y1 = 0;Y3 = 1 Y1 = 1;Y3 = 0 Y1 = 1;Y3 = 1U(e) {1} {2} {1,2} {1} {2} {1,2} {1} {2} {1,2} {1} {2} {1,2}fe() 5 7 11 6 9 13 7 8 14 12 15 23

Table 2 Solution structure for r = 10 resamples

q 1 2 3 4 5 6 7 8 9 10F∗q(U) 103.2 94.3 106.8 106.8 103.2 103.2 96.9 106.8 103.2 94.3

Table 3 demonstrates complexity of the algorithm. We make simple transforma-tions of the graph in order to assess a number of messages depending on the numberof the vertices as well as on the number of the flows.

Table 3 The number of messages for various number of vertices |V | and flows |U | in thenetwork

|V | 9 9 10 10 11 11 12 12|U | 6 7 7 8 8 9 8 9

# of messages 2.3∗103 6.8∗103 1.3∗104 6.7∗104 3.1∗105 9.4∗105 8.3∗105 2.7∗106

These results show that the complexity of the algorithm is exponential dependingon the number of vertices |V | as well as the number of flows |U |. However the resultsare acceptable for considered number of vertices and flows.

6 Conclusions

We developed a distributed asynchronous algorithm for unsplittable flows routing inthe transport network. For this purpose, the ADOPT algorithm for DCOP was mod-ified. We added an opportunity to work with random variables (factors) representedby samples; the vertices can agree about the used samples in decentralized way byapplying collaborative resampling approach.

The results show that the algorithm solves the considered problem and corre-spond the requirements. So it can be used effectively for decentralized vehicle flowrouting. However the number of messages is exponential depending on the numberof vertices and the number of flows.

In the future work we are going to develop an stochastic approximation of thisalgorithm in order to avoid exponential number of messages and get an acceptablesolution. Another important direction of the research is true parallel implementationof the algorithm in order to assess its efficiency on parallel platform (GPU).

44 M. Fiosins

References

1. Ahuja, R.K., Magnanti, T.L., Orlin, J.B.: Network Flows: Theory, Algorithms, and Ap-plications. Prentice-Hall, Englewood Cliffs (1993)

2. Andronov, A., Fiosina, J., Fiosins, M.: Statistical estimation for a failure model withdamage accumulation in a case of small samples. J. of Stat. Planning and Inf. 139, 1685–1692 (2009)

3. Andronov, A., Fiosins, M.: Applications of resampling approach to statistical problemsof logical systems. Acta et Comm. Univ. Tartuensis de Mathematica 8, 63–72 (2004)

4. Atlas, J., Decker, K.: Task scheduling using constraint optimization with uncertainty. In:Proc. of CAPS 2007, pp. 25–27 (2007)

5. Azar, Y., Regev, O.: Strongly polynomial algorithms for the unsplittable flow problem.In: Aardal, K., Gerards, B. (eds.) IPCO 2001. LNCS, vol. 2081, pp. 15–29. Springer,Heidelberg (2001)

6. Fiosins, M., Fiosina, J., Muller, J.P.: Change point analysis for intelligent agents in citytraffic. In: Cao, L., Bazzan, A.L.C., Symeonidis, A.L., Gorodetsky, V.I., Weiss, G., Yu,P.S. (eds.) ADMI 2011. LNCS (LNAI), vol. 7103, pp. 195–210. Springer, Heidelberg(2012)

7. Fiosins, M., Fiosina, J., Muller, J.P., Gormer, J.: Reconciling strategic and tactical deci-sion making in agent-oriented simulation of vehicles in urban traffic. In: Proc. of the 4thInt. ICST Conf. Simulation Tools and Techniques, pp. 144–151. ACM Digital Library(2011)

8. Ford, L., Fulkerson, D.: Flows in Networks. Princeton University Press (1962)9. Glockner, G., Nemhauser, G.: A dynamic network flow problem with uncertain arc ca-

pacities: Formulation and problem structure. Operations Research 48(2), 233–242 (2000)10. Goldberg, A.V., Grigoriadis, M.D., Tarjan, R.E.: Use of dynamic trees in a network sim-

plex algorithm for the maximum flow problem. Mathematical Programming 50, 277–290(1991)

11. Karakostas, G.: Faster approximation schemes for fractional multicommodity flow prob-lems. ACM Trans. Algorithms 4(1), 13:1–13:17 (2008)

12. Leaute, T., Faltings, B.: E[DPOP]: Distributed Constraint Optimization under Stochas-tic Uncertainty using Collaborative Sampling. In: Proc. of the IJCAI 2009, pp. 87–101(2009)

13. Modi, P.J., Shen, W., Tambe, M., Yokoo, M.: Adopt: Asynchronous distributed constraintoptimization with quality guarantees. Artificial Intelligence Journal 161, 149–180 (2005)

14. Ottens, B., Faltings, B.: Coordinating agent plans through distributed constraint opti-mization. In: Proc. of MASPLAN 2008 (2008)

15. Petcu, A., Faltings, B.: Dpop: A scalable method for multiagent constraint optimization.In: Proc. of the 19th Int. Joint Conf. on Artificial Intelligence, pp. 266–271 (2005)

Extending Semantic Web Tools for Improving SmartSpaces Interoperability and Usability

Natalia Dıaz Rodrıguez1, Johan Lilius1, Manuel Pegalajar Cuellar2,and Miguel Delgado Calvo-Flores2

1 Turku Centre for Computer Science (TUCS), Department of Information Technologies,Abo Akademi University, Turku, Finland{ndiaz,jolilius}@abo.fi

2 Department of Computer Science and Artificial Intelligence, University of Granada, Spain{manupc,mdelgado}@decsai.ugr.es

Abstract. This paper explores the main challenges to be tackled for more accessi-ble, and easy to use, Smart Spaces. We propose to use Semantic Web principles ofinteroperability and flexibility to build an end-user graphical model for rapid pro-totyping of Smart Spaces applications. This approach is implemented as a visualrule-based system that can be mapped into SPARQL queries. In addition, we addsupport to represent imprecise and fuzzy knowledge. Our approach is exemplifiedin the experimental section using a context-aware test-bed scenario.

Keywords: Smart Space, Fuzzy Ontology, Interoperability, End-user ApplicationDevelopment.

1 Introduction

Smart Spaces were built in relation with the vision in which computers work onbehalf of users, they have more autonomy, and they are able to handle unanticipatedsituations. This implies the use of Artificial Intelligence (AI), agents and machinelearning. One of the main goals of Smart Spaces is to achieve device interoperabilitythrough standard machine readable information to allow easy construction of mash-ups of heterogeneous applications. A Smart Space (SS) is an abstraction of physicalubiquitous space that allows devices to join and leave the space as well as sharinginformation. New devices are constantly being introduced, often involving differentinformation formats or coming from diverse sources. Lack of interoperability be-tween systems and devices easily becomes a problem, resulting in them not beingused efficiently. In order to have devices that interoperate seamlessly, their respec-tive data and functionality must be easily integrated and accessible.

SSs are considered to be context-aware systems; therefore, a key requirement forrealizing them, is to give computers the ability to understand their situational condi-tions [4]. To achieve this, contextual information should be represented in adequateways for machine processing and reasoning. Semantic technologies suite well thispurpose because ontologies allow, independently, to share knowledge, minimizingredundancy. Furthermore, semantic languages can act as metalanguages to define

S. Omatu et al. (Eds.): Distrib. Computing & Artificial Intelligence, AISC 217, pp. 45–52.DOI: 10.1007/978-3-319-00551-5_6 c© Springer International Publishing Switzerland 2013

46 N.D. Rodrıguez et al.

other special purpose languages (e.g., policy languages), which is a key advantagefor better interoperability than that one of tools that share no roots of constructs.

We focus on providing the end-user the possibility of rapidly prototype the be-haviour of a SS, abstracting away technical details. When presenting a semantic SSto the user, the interface model, even if simplified, must adhere to the Semantic Web(SW) formal models. Domain Specific Languages (DSL) demonstrate support inthis abstraction for integration of metamodels using ontologies (e.g. in [16]). Con-cerning end-user frameworks and GUIs for developing SS applications, we can findworks that simplify the tasks to the user when creating their own services, throughsimple rules.

The survey of programming environments for novice programmers [9] showshow to lower the barriers to programming, which is one of our main aims; let nonexpert users to take part in the configuration of a Smart Space. Some good examplesof end-user visual editors that simplify the tasks to the user when creating their ownservices or applications, through simple rules, are If This Then That 1 for onlinesocial services, Twine 2 for applications based on sensor interaction or Valpas [12]intelligent environment for assisted living.

A graphical tool to prototype context-aware applications is iCap [14], where cod-ing is not required, but rather using window controls and IF-THEN rules. Their pub-lic is developers that want to rapidly test and iterate ubicomp applications. Otherwork in this line is a reconfiguration framework focused on tackling system vari-ability and policy definition in runtime [6]. They use PervML as DSL, Feature Mod-elling techniques and Model Driven Engineering (MDE) principles such as codegeneration. End-user interaction evaluation is pending.

In [17] a rule-based framework with puzzle-like pieces allows to specify domain-specific situations with service invocations and state changes. Its use in a PDAshowed quicker progress in users with less provided help. In SiteView [1], a tan-gible interface allows to control simple conjunctive rules of a ”world-in-miniature”to help users create and view the effects of the rules.

A more complex system, aimed at end-users, is [15]. It is based on a pervasivenavigation environment which uses spatial and resource annotations from the users’pictures. Pervasive Maps allow to model, explore and interact with complex perva-sive environments.

In [5], an ECA (Event-Condition-Action) rule system allows end-users to con-trol and program their SS in a drag & drop environment with wildcards filters andtextual expressions, allowing in this way complex rules to be formulated. Finally,the dataflow rule language in [3] shows increased expressiveness in young non-programmers. However, previous frameworks lack underlying semantic capabilitiesand support for fuzzy rule expressions through linguistic labels. There does not ex-ist a GUI for visualizing both fuzzy ontologies and fuzzy rules. Thus, our proposaltakes the interaction with context-aware Smart Spaces to a higher level, allowingeasier prototyping of the SS’s behaviour by a) providing semantics to enhance the

1 http://ifttt.com2 http://supermechanical.com/twine/

Extending Semantic Web Tools for Improving SS Interoperability and Usability 47

Fig. 1 User interface mock-up and example of semantic rule construction

context-awareness, and b) permitting imprecise every-day life expressions. Nextsection elaborates more on our proposal and Section 3 discusses the approach andsuggests future directions.

2 A Framework for Rapid Application Development ofContext-Aware Smart Spaces

Our contribution consist of a graphical interface for representing, visualizing and in-teracting with SSs information. It allows any end-user to model his own applicationswithout knowledge of programming. Data gathering is possible by aggregation ofdifferent ontologies and datasets. The interface is based on simple IF-THEN rulesapplied to graph-based data. A node can be of two types, representing an OWLclass (Entity, large and white) or a data property value (small and purple). An arccan represent a data property or object property, depending on the type of the des-tination node (destNode={Class or Value}). The THEN clause of the rule servesto 1) add, remove or update information in form of arcs and nodes (representingRDF triples) from the knowledge base, or 2) execute a registered browser-basedapplication (with associated service grounding), possibly using concrete and welldefined individuals or properties described in the IF clause or Linked Data. Regis-tered web or Linked Data services are represented in large grey nodes. Subgraphsin IF and THEN clauses can be connected with logical operators and included intoloops expressed in the rule’s consequent. A minimum degree of satisfiability can be

48 N.D. Rodrıguez et al.

Table 1 Graph visual model representation mapping to OWL2

OWL2 Appearance OWL2 Appearance OWL2 Appearance

Class Datatype

Indivi-dual

DataPro-perty

ObjectPro-perty

Appli-cation/

Ser-vice

expressed for a determined subgraph, since a rule can be mapped to a Mamdani rulein a fuzzy reasoner (e.g. fuzzyDL [2]). Fuzzy modifiers are considered in the sameway as crisp properties (e.g. isVeryNearTo in Fig. 1).

The graph-based and ”puzzle”-like pieces to edit rules with take inspiration fromthe successful Scratch framework [11]. Variable bindings are correct, by construc-tion of the user interface, through letting the user allocate pieces only in the positionsin which corresponding data ranges and domains are allowed.

This intuitive way of expressing a rule’s condition, by dragging and joining com-patible (data type-wise) nodes and arcs, can be easily translated into SPARQL querypatterns (e.g., conditions in the WHERE field) and allow fast formulation of mash-upapplications. Table 1 summarizes the mapping applied to transform end-user visualmodel representations into OWL2 entities.

A great power of visual languages is their ability of categorizations of certainprimitives, and the graphical properties, to carry semantic information. Furthermore,elements of their syntax can intrinsically carry semantic information. To develop aneffective visual language, i.e., a language that can be easily and readily interpretedand manipulated by the human reader, we followed guidelines for visual languagedesign [7, 10]. These can be summarized as morphology as types, properties ofgraphical elements, matching semantics to syntax, extrinsic imposition of structureand pragmatics for diagrams. In our UI, we attach meaning to the components of thelanguage both naturally (by exploiting intrinsic graphical properties such as keepingthe underlying RDF graph structure) and intuitively [7] (taking consideration ofhuman cognition, e.g. using colour to distinguish literals from classes). E.g., weconsidered the primary properties of graphical objects [8] to design our language’sconstruct symbols.

Extending Semantic Web Tools for Improving SS Interoperability and Usability 49

2.1 End-User Graphical Model Mapping to SPARQL

Through structuring the edition of applications as simple IF-THEN rule statements,and by using an underlying graph-based graphical structure, an end-user can modelsemantic behaviour, by means of classes, individuals and relationships. The RDFstore, which reflects its content on the left side of the UI, shows only legal relation-ships and properties associated to each entity. Simple SPARQL queries can extractthe required data to be presented in each view, each moment the user hovers a spe-cific entity or menu. E.g., given a class, show its object properties associated. Forexample, to get the object properties of the class GenericUser, the following querywould return hasCalendar, worksForProject, performsActivity, etc.1 SELECT DISTINCT ?pred2 WHERE { ?pred rdfs:domain ha:GenericUser.3 ?pred rdfs:range ?object.4 ?object a owl:Class.}

The mapping that transforms a graphical rule into a SPARQL query is below:

1 Initialize counter for ClassNode variables, n to 0.2 Initialize processedNodes dictionary to empty.3 <-IF CLAUSE MAPPING->4 For each ClassNode in IFClause of the Rule:5 For each Arc leaving from ClassNode:6 If destNode is a Datatype: // Data Property Triple7 Add patterns (?indiv_n a ClassName) and8 (?indiv_n dataProp destNodeDataValue) to WHERE9 Add originNode and its index n to processedNodes

10 Increment variable index n11 Else: // The Triple represents an Object Property12 If originNode is processed, obtain its index x13 If destNode is processed, get its index z14 Add pattern (?indiv_x objectProp ?indiv_z) to WHERE15 Else:16 Add pattern (?indiv_x objectProp ?indiv_n) to WHERE17 Add destNode and its index n to processedNodes18 Increment variable index n19 Else:20 If destNode is processed, get its index y21 Add pattern(?indiv_n objectProp ?indiv_y) to WHERE22 Add originNode and its index n to processedNodes23 Increment variable index n24 Else:25 Add pattern (?indiv_n objectProp ?indiv_n+1) to

WHERE26 Add originNode and destNode to processedNodes27 Increment variable index n by 228 <-THEN CLAUSE MAPPING->29 If THENClause.type is APP: // Execute external App30 For each ClassNode in THENClause:31 If ClassNode is processed, obtain its index w &32 add ’?indiv_w’ to SELECT33 Else: "ERROR: Class Nodes in APP parameters need to be defined

in IFClause". Exit34 QueryResult = Run SPARQL Query with {SELECT, WHERE}35 Execute set of AppNodes with QueryResult as parameters36 Else:37 If THENClause.type is ADD: // Add triples38 For each Arc marked toAdd, add pattern to INSERT39 Else:40 If THENClause.type is REMOVE: // Remove triples41 For each Arc marked toDelete, add pattern to DELETE42 Run SPARQL query including {SELECT, WHERE, INSERT, DELETE}

50 N.D. Rodrıguez et al.

The algorithm ”parses” first the IF, followed by the THEN clause in the graphicalmodel, to finally run a SPARQL query with the parameters collected in some of thearray structures for SELECT, INSERT, DELETE and WHERE. Each (origNode,Arc, destNode) structure in the visual model corresponds to a triple pattern (subject,predicate, object). A counter n keeps track of node indexes to keep unique namingfor each variable associated in the SPARQL query. Every arc is processed and, de-pending on the type of its destination node (line 6 & 11), the pattern is modelledas a)an individual’s data property or b)an object property pattern. Generated pat-terns are added to the WHERE field of the query. For arcs and nodes in the THENclause, the visual model’s equivalent triple patterns are added to the INSERT orDELETE fields of the SPARQL query, respectively, since these are triples that mustbe marked as toAdd, toRemove or toUpdate. Finally, in THEN clause, some appli-cation (grey) nodes may require input parameters, that can reuse information fromentities declared in the IF clause.

Rule Example Scenario: To study the viability of the ubiquitous model, we pro-pose a location and context-aware scenario where positioning sensors are availablethrough, e.g., each person’s phone. We developed a Human Activity ontology thatmodels different kind of users, their interactions and the activities they perform onthe environment. Let us suppose the end-user wants to create a rule which allowsher to start recording audio of the weekly meeting with his supervisor, automaticallywhen she gets into his room: ”If Natalia enters the room of his supervisor Johan,start audio-recording the meeting agenda in her phone’s calendar”. The aim wouldbe keeping track, for future reference, of the agenda points and brainstorming ideasdiscussed, on the user’s calendar. First of all, the user would select, from the GUIleft menu the needed entities, the datatype values for identifying the individuals Jo-han and Natalia, and the relations which connect these with each other. The queryproduced by our algorithm is below. Although 4 lines longer, it is equivalent to astraightforward query written by somebody with knowledge of SPARQL:

1 SELECT ?calendar1 ?phone22 WHERE{ ?user0 a ha:User.3 ?user0 ha:hasName "Natalia"ˆˆxsd:string.4 ?user0 ha:hasCalendar ?calendar1.5 ?user0 ha:hasPhone ?phone2.6 ?user0 ha:isInLocation ?location3.7 ?phone2 ha:isInLocation ?location3.8 ?location3 ha:isNear ?office4.9 ?user5 a ha:User.

10 ?user5 ha:hasName "Johan"ˆˆxsd:string.11 ?user5 ha:hasOffice ?office4.}

3 Discussion and Future Work

This paper focuses on providing ordinary end-users with an accessible and func-tional SS vision through a tool that allows to exploit the potential of SW tech-nologies, without requiring technical knowledge and supporting everyday life tasks.