199

[Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

  • Upload
    mei-hui

  • View
    218

  • Download
    3

Embed Size (px)

Citation preview

Page 1: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||
Page 2: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Studies in Fuzziness and Soft Computing 296

Editor-in-Chief

Prof. Janusz KacprzykSystems Research InstitutePolish Academy of Sciencesul. Newelska 601-447 WarsawPolandE-mail: [email protected]

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

Page 3: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Giovanni Acampora, Vincenzo Loia,Chang-Shing Lee, and Mei-Hui Wang (Eds.)

On the Power ofFuzzy Markup Language

ABC

Page 4: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Editors

Dr. Giovanni AcamporaSchool of Industrial Engineering,Information SystemsEindhoven University of TechnologyEindhovenThe Netherlands

Prof. Vincenzo LoiaDept. of Computer ScienceUniversity of SalernoFisciano, SalernoItaly

Prof. Chang-Shing LeeDept. of Computer Science andInformation EngineeringNational University of TainanTainanTaiwan

Dr. Mei-Hui WangDept. of Computer Science andInformation EngineeringNational University of TainanTainanTaiwan

ISSN 1434-9922 e-ISSN 1860-0808ISBN 978-3-642-35487-8 e-ISBN 978-3-642-35488-5DOI 10.1007/978-3-642-35488-5Springer Heidelberg New York Dordrecht London

Library of Congress Control Number: 2012954396

c© Springer-Verlag Berlin Heidelberg 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)

Page 5: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

I want one moment in time when I’m morethan I thought I could be.

(Whitney Houston, 1963 - 2012)

Page 6: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Foreword

The concept, methodology, and practice of the XML standard have achieved aunique position in the plethora of modern software tools supporting system con-ceptualization, analysis, and implementation with a unique role in securing highinteroperability between individual components of complex and highly intercon-nected architectures. The interoperability supported by XML gave rise to web ser-vices communication schemes with various highly visible technologies such as e.g.,SOAP and WSDL.

Fuzzy sets have demonstrated their unique and profound abilities in the designand analysis of human-centric systems in which domain knowledge, available exper-imental evidence and produced outcomes are conveniently represented in the formof fuzzy sets and fuzzy associations. As usual, in the design of fuzzy systems, westrive for using tools that make an overall development process well-supported andculminating in a highly efficient implementation. Fuzzy Markup Language (FML),regarded as a generalized XML language has emerged as a bridge between a high-end conceptualization and a detailed design of fuzzy systems by narrowing downan acute gap between an abstract and unified view used to describe fuzzy systemsand their hardware-driven implementation. These conceptualization- realization dif-ficulties could become even more critical in ubiquitous and pervasive scenarioswhere different modules of a fuzzy system can be distributed, deployed, and re-alized through a collection of interacting and heterogeneous hardware devices.

Giovanni Acampora and Vincenzo Loia at the University of Salerno introducedthe concept of the FML and envisioned its advantages in the area of fuzzy set tech-nology. Subsequently they vigorously pursued its intensive conceptualization, de-velopment and realizations. FML offers important functionalities by building uponthe mechanisms of an XML Schema (to define legal constructs) and an eXtensi-ble Stylesheet Language Transformations (XSLT) (helping in the conversion of adescription of a fuzzy system into a specific programming language).

This research monograph edited by Giovanni Acampora , Vincenzo Loia, Chang-Shing Lee, and Mei Hui Wang delivers a comprehensive discussion on the FML andoffers an authoritative treatment of the promising applications in this area.

Page 7: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

VIII Foreword

There are a number of carefully structured, informative contributions elaboratingon the diverse facets of FML concepts and FML practice. The first three chapterscover a conceptual framework of the FML and elaborate on the various facets ofinteroperability and visual interfacing. Examples linked to the development and rep-resentation of fuzzy reasoning schemes (fuzzy controllers, in particular) are highlyconvincing by offering an interesting illustration of well-known constructs of fuzzysets realized in the FML setting.

There is a wealth of diverse original applications including malware behavioralanalysis, game playing, and university assessment. A timely tendency of bringingthe concepts of type-2 fuzzy sets into practice is well reflected in the volume. Hereapplications of type-2 FML-based fuzzy ontology for dietary assessment and a type-2 FML-based meeting scheduling support system are discussed.

In all of them the role FML played in the design and realization phases is welldelineated. Likewise the user-friendliness is an interesting and quite visible featureof the systems.

Definitely, the Editors have made a superb job by bringing timely and importantconcepts of FML and fuzzy sets into the area of the methodology and practice ofmodern system design. The organization of the material along with its broad cov-erage has offered a solid exposure of the key issues and the best design practicesin a convincing way. This will, undoubtedly, appeal to the broad spectrum of thereadership.

Overall, the edited volume is a very much welcome, authoritative and timely pub-lication, which opens new frontiers in the design and implementation of intelligentsystems.

Witold PedryczDepartment of Electrical & Computer Engineering

University of AlbertaEdmonton, Canada

Page 8: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Preface

Lotfi Zadeh has thought and defined the Fuzzy Logic as a mathematical formalismuseful for describing a deductive engine similar to human reasoning in its capabili-ties to manipulate knowledge and generate decisions in complex environments char-acterized by high uncertainty and vagueness. In fact, different from the conventionalAristotelian inference process, fuzzy reasoning incorporates an alternative way ofthinking, which allows modeling of uncertain systems by using a higher level of ab-straction arising from human knowledge, skills and expertise. However, in spite ofits original and pioneering aims, currently the fuzzy computation is predominantlydevoted to design and develop intelligent systems belonging to the area of industrialcontrollers and decision making frameworks. This choice in mainly due to the factthat, as stated by Lotfi Zadeh in his principle of incompatibility, fuzzy frameworksare simpler to design, develop and maintain than their counterparts based on tradi-tional engineering approaches such as the proportional plus integral plus derivative(PID) methodology. Since its first application in the field of intelligent systems, byE.H. Mamdani, fuzzy logic has been applied to numerous application scenarios bothin the area of pure engineering and social, economical and political sciences. Exam-ples of this application are: robotic and industrial control, traffic light control, expertsystems, temperature control, antilock breaking systems, language processing, med-ical diagnosis, risk and fraud analysis, operational meteorology, image processing,businesses and finance and so on.

However, in spite of its huge applicability, the design activity of a fuzzy sys-tem may be affected by some strong difficulties related to the implementation ofa given fuzzy system on different hardware architectures, each one characterizedby a proper set of electrical/electronic/programming constraints. These difficultiescould become more critical in ubiquitous and pervasive scenarios where the differ-ent components of a fuzzy system can be distributed and deployed to a collectionof interacting and heterogeneous hardware devices. Some specific language such asthe Fuzzy Control Language (FCL) tried to bridge this design gap but it has not beenable to provide a sufficient level of hardware interoperability due to its weakness inrepresenting information in an abstract way.

Page 9: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

X Preface

During 2003, when I started my Ph.D. course in Computer Science, XML tech-nologies were experiencing a kind of rebirth due to their use in defining new proto-cols for distributed communication and data abstraction. This second life of XMLhas led me to investigate the possibility of integrating these technologies for dataabstraction with the theory of fuzzy sets in order to create a software tool capableof supporting scientists and engineers to design fuzzy systems and controllers in ahardware independent way. I named my research result Fuzzy Markup Language(FML). In detail, FML is a XML-based language whose main aim is to bridge thefuzzy systems design gaps by introducing an abstract and unified approach for de-scribing fuzzy systems and their hardware specific implementation. Initially, I usedFML for designing and implementing distributed fuzzy systems aimed at managingcomplex environments characterized by high pervasiveness and hardware hetero-geneity. A typical example of this kind of applications are Ambient Intelligence(AmI) frameworks. However, since then, FML is contributing to the developmentand evolution of fuzzy-based intelligent decision systems belonging to different ap-plication fields such as healthcare, computer games, malware behavioral analysisand so on.

The main purpose of this book is to introduce readers in the FML world by pre-senting the benefits provided by this language in the field of fuzzy systems design,development and distribution, together with a collection of FML-based applicationsthat prove the huge applicability of the proposed technology. In particular, this bookis composed by two parts: the former discusses about the need to have a standardlanguage for depicting fuzzy frameworks and it introduces readers with FML funda-mentals such as FML grammar, FML IDE and so on; the latter presents a collectionof FML applications aimed at validating the FML capabilities to adapt to differentapplication domains and scenarios.

I hope this book will support the studies and research activity of scientists andengineers in the computational intelligence area, and I hope that it will stimulateyoung and eager minds that they are taking their first steps into the wonderful worldof research.

I would like to thank to co-editors Vincenzo Loia, Chang-Shing Lee and Mei-Hui Wang for their precious support during this fascinating activity. I thank thechapters authors for having improved the book quality with their research expertiseand skills. I wish to personally thank Prof. Witold Pedrycz for his valuable forewordcontribution. At last, but not least, I would like to thank my parents, Francesco andMaria, for buying me, on June 2, 1984, a Commodore Vic 20 and allowing me tobegin my experience into the world of computers and artificial intelligence.

Eindhoven, The Netherlands Giovanni AcamporaJuly 2012

Page 10: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Contents

Part I Fuzzy Markup Language – Fundamentals

On the Need of a Standard Language for Designing Fuzzy Systems . . . . . . 3Bruno N. Di Stefano

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 The Importance of the Documentation for the Design of

Interoperable Programmable Controllers . . . . . . . . . . . . . . . . . . . . . . 63 A First Attempt for a Fuzzy Language: IEC 61131-7 . . . . . . . . . . . . 74 Fuzzy Markup Language: A Novel Proposal for a Standard

Fuzzy Systems Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Fuzzy Markup Language: A XML Based Language for Enabling FullInteroperability in Fuzzy Systems Design . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Giovanni Acampora

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Fuzzy Markup Language: The Grammar and Stylesheet

Translators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192.1 FML Syntax: XML Tags and Attributes . . . . . . . . . . . . . . . 192.2 Describing the FML Grammar through XML Schema . . . 242.3 FML Synthesis: XSLT Documents . . . . . . . . . . . . . . . . . . . 27

3 An Extension of FML: Type 2 FML . . . . . . . . . . . . . . . . . . . . . . . . . . 274 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Distributing Fuzzy Reasoning through Fuzzy Markup Language:An Application to Ambient Intelligence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Giovanni Acampora, Vincenzo Loia, Autilia Vitiello

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 FML and Its Distributive Features . . . . . . . . . . . . . . . . . . . . . . . . . . . 353 FML-Based Mobile Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Page 11: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

XII Contents

3.1 Migration in Multi-agent Systems . . . . . . . . . . . . . . . . . . . . 383.2 A Multi-agent Framework for Distributing FML

Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 Applying Multi-agent FML to Ambient Intelligence . . . . . . . . . . . . 42

4.1 Learning Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434.2 Control Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

5 Simulation and Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . 476 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

An Enhanced Visual Environment for Designing, Testing and DevelopingFML-Based Fuzzy Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Giovanni Acampora, Vincenzo Loia, Autilia Vitiello

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512 A Novel Vision of a Fuzzy Controller: FLC Labeled Tree . . . . . . . . 533 Visual FML Tool Functionalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

3.1 Fuzzy System Description . . . . . . . . . . . . . . . . . . . . . . . . . . 613.2 Systems Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643.3 Systems Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673.4 Systems Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

4 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

Part II Fuzzy Markup Language – Applications

Apply Fuzzy Markup Language to ASAP Assessment System . . . . . . . . . . 73Chang-Shing Lee, Mei-Hui Wang, Pi-Hsia Hung, Yi-Ling Kuo,Hui-Min Wang, Bort-Hung Lin

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742 Item Fuzzy Ontology and Fuzzy Markup Language . . . . . . . . . . . . . 75

2.1 Item Fuzzy Ontology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 752.2 Fuzzy Markup Language . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

3 CMMI-Based ASAP Assessment System . . . . . . . . . . . . . . . . . . . . . 773.1 Introduction to CMMI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783.2 Introduction to ASAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793.3 Structure of CMMI-Based ASAP Assessment System . . . 803.4 Subsystem Function Descriptions . . . . . . . . . . . . . . . . . . . . 81

4 FML-Based Semantic Inference Mechanism . . . . . . . . . . . . . . . . . . . 834.1 Structure of FML-Based Semantic Inference

Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834.2 Natural Language Processing Mechanism . . . . . . . . . . . . . 844.3 Fuzzy Reasoning Mechanism . . . . . . . . . . . . . . . . . . . . . . . 854.4 Semantic Summary Mechanism . . . . . . . . . . . . . . . . . . . . . 88

5 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

Page 12: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Contents XIII

Apply Fuzzy Markup Language to Knowledge Representation for Gameof Computer Go . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95Chang-Shing Lee, Mei-Hui Wang, Yu-Jen Chen, Shi-Jim Yen

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 952 Knowledge Representation for Game of Computer Go . . . . . . . . . . 97

2.1 Game Record Ontology . . . . . . . . . . . . . . . . . . . . . . . . . . . . 972.2 Go Board Ontology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

3 FML-Based Decision Support Agent . . . . . . . . . . . . . . . . . . . . . . . . . 1013.1 Structure of FML-Based Decision Support Agent . . . . . . . 1013.2 Fuzzy Decision Support System . . . . . . . . . . . . . . . . . . . . . 1013.3 Territory Partition Mechanism . . . . . . . . . . . . . . . . . . . . . . . 1033.4 Fuzzy Inference Mechanism . . . . . . . . . . . . . . . . . . . . . . . . 1033.5 Alarm Presentation Mechanism . . . . . . . . . . . . . . . . . . . . . . 105

4 Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1065 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

Fuzzy Markup Language for Malware Behavioral Analysis . . . . . . . . . . . . 113Hsien-De Huang, Giovanni Acampora, Vincenzo Loia, Chang-Shing Lee,Hani Hagras, Mei-Hui Wang, Hung-Yu Kao, Jee-Gong Chang

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1142 Basic Concepts: Improving TWMAN through FML and OWL . . . 115

2.1 Ontology Web Language (OWL) for ModelingMalwares Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

2.2 Fuzzy Markup Language (FML) as Inference Enginefor Malwares Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

2.3 Taiwan Malware Analysis Net (TWMAN) . . . . . . . . . . . . . 1183 An FML-Based Fuzzy Ontological Model for TWMAN . . . . . . . . . 119

3.1 Integrating OWL and FML for Analyzing MalwareBehaviors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

3.2 Fuzzy Inference Mechanism . . . . . . . . . . . . . . . . . . . . . . . . 1224 Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1255 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

Applying FML-Based Fuzzy Ontology to University Assessment . . . . . . . . 133Mei-Hui Wang, Chang-Shing Lee, Hani Hagras, Ming-Kai Su, Yu-YangTseng, Hui-Min Wang, Yuan-Liang Wang, Che-Hung Liu

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1342 Structure of University Goal Ontology . . . . . . . . . . . . . . . . . . . . . . . . 1353 FML-Based University Assessment System . . . . . . . . . . . . . . . . . . . 139

3.1 Fuzzy Markup Language . . . . . . . . . . . . . . . . . . . . . . . . . . . 1393.2 Knowledge Base of University Assessment System . . . . . 1393.3 Rule Base of University Assessment System . . . . . . . . . . . 140

4 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

Page 13: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

XIV Contents

5 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

A Type-2 FML-Based Fuzzy Ontology for Dietary Assessment . . . . . . . . . . 149Mei-Hui Wang, Chang-Shing Lee, Zhi-Wei Chen, Hani Hagras, Su-E Kuo,Hui-Ching Kuo, Hui-Hua Cheng

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1492 Definition of Fuzzy Ontology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

2.1 Fuzzy Ontology [12] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1512.2 Type-2 Fuzzy Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1532.3 Type-2 Fuzzy Diet Ontology . . . . . . . . . . . . . . . . . . . . . . . . 156

3 Type-2 FML-Based Dietary Assessment System . . . . . . . . . . . . . . . 1563.1 Structure of the Proposed System . . . . . . . . . . . . . . . . . . . . 1573.2 Food Nutrition Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1583.3 Type-2 Fuzzy Inference Mechanism . . . . . . . . . . . . . . . . . . 159

4 Experiments and Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1615 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

A Type-2 FML-Based Meeting Scheduling Support System . . . . . . . . . . . . 169Chang-Shing Lee, Mei-Hui Wang, Ming-Kai Su, Min-Hsiang Wu,Hani Hagras

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1692 Type-2 FML-Based Personal Ontology . . . . . . . . . . . . . . . . . . . . . . . 171

2.1 Type-2 Fuzzy Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1712.2 Type-2 FML-Based Personal Ontology . . . . . . . . . . . . . . . 1722.3 Type-2 FML-Based Meeting Scheduling Ontology . . . . . . 173

3 FML-Based Meeting Scheduling System . . . . . . . . . . . . . . . . . . . . . . 1753.1 Type-2 FML-Based Meeting Scheduling System . . . . . . . 1753.2 Knowledge Base for Type-2 FML-Based Meeting

Scheduling System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1763.3 Fuzzy Inference Mechanism . . . . . . . . . . . . . . . . . . . . . . . . 1803.4 Sentence Extraction Mechanism . . . . . . . . . . . . . . . . . . . . . 181

4 Experiments and Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1815 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

Page 14: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

List of Contributors

Giovanni AcamporaSchool of Industrial Engineering, Information SystemsEindhoven University of Technology, P.O. Box 513, 5600 MB, EindhovenThe Netherlandse-mail: [email protected]

Jee-Gong ChangNational Center for High-Performance Computing, Taiwane-mail: [email protected]

Yu-Jen ChenDept. of Computer Science and Information EngineeringNational University of Tainan, Taiwane-mail: [email protected]

Zhi-Wei ChenDept. of Computer Science and Information EngineeringNational University of Tainan, Taiwane-mail: [email protected]

Hui-Hua ChengDept. of Nutritional ServiceNational Cheng Kung University Hospital, Taiwane-mail: [email protected]

Bruno Di StefanoNuptek Systems Ltd, Canadae-mail: [email protected]: [email protected]

Hani HagrasThe Computational Intelligence CentreSchool of Computer Science and Electronic EngineeringUniversity of Essex, UKe-mail: [email protected]

Page 15: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

XVI List of Contributors

Hsien-De HuangNational Center for High-Performance Computing, Taiwane-mail: [email protected]

Pi-Hsia HungGraduate Institute of Measurement and Statistics NationalUniversity of Tainan, Taiwane-mail: [email protected]

Hung-Yu KaoDept. of Computer Science and Information EngineeringNational Cheng Kung University, Taiwane-mail: [email protected]

Hui-Ching KuoDept. of Nutritional ServiceNational Cheng Kung University Hospital, Taiwane-mail: [email protected]

Su-E KuoDept. of Nutritional ServiceNational Cheng Kung University Hospital, Taiwane-mail: [email protected]

Yi-Ling KuoDept. of Computer Science and Information EngineeringNational University of Tainan, Taiwane-mail: [email protected]

Chang-Shing LeeDept. of Computer Science and Information EngineeringNational University of Tainan, Taiwane-mail: [email protected]

Bort-Hung LinGraduate Institute of Measurement and StatisticsNational University of Tainan, Taiwane-mail: [email protected]

Che-Hung LiuDept. of Business and ManagementNational University of Tainan, Taiwane-mail: [email protected]

Vincenzo LoiaDepartment of Computer ScienceUniversity of Salerno, 84084 Fisciano, Salerno, Italye-mail: [email protected]

Page 16: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

List of Contributors XVII

Ming-Kai SuDept. of Computer Science and Information EngineeringNational University of Tainan, Taiwane-mail: [email protected]

Yu-Yang TsengDept. of Business and ManagementNational University of Tainan, Taiwane-mail: [email protected]

Autilia VitielloDepartment of Computer ScienceUniversity of Salerno, 84084 Fisciano, Salerno, Italye-mail: [email protected]

Mei-Hui WangDept. of Computer Science and Information EngineeringNational University of Tainan, Taiwane-mail: [email protected]

Hui-Min WangComputer CenterNational University of Tainan, Taiwane-mail: [email protected]

Yuan-Liang WangComputer CenterNational University of Tainan, Taiwane-mail: [email protected]

Min-Hsiang WuDept. of Computer Science and Information EngineeringNational University of Tainan, Taiwane-mail: [email protected]

Shi-Jim YenDept. of Computer Science and Information EngineeringNational Dong Hwa University, Taiwane-mail: [email protected]

Page 17: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Acronyms

AIDE Advanced Intrusion Detection EnvironmentAmI Ambient IntelligenceASAP After School Alternative ProgramCKIP Chinese Knowledge Information ProcessingCMMI Capability Maturity Model IntegrationFIS Fuzzy Inference SystemFLC Fuzzy Logic ControllerFML Fuzzy Markup LanguageFML2 Type-2 fuzzy markup languageFDSA FML-based Decision Support AgentFOU Footprint Of UncertaintyFTP File Transfer ProtocolHEEACT Higher Education Evaluation and Accreditation Council of TaiwanHTTP HyperText Transfer ProtocolID Identification NumberINRIA National Institute for Research in Computer Science and ControlIRC Internet Relay ChatIRT Item Response TheoryIT2FS Interval Type-2 Fuzzy SetJRE Java Runtime EnvironmentKM Karnik-MendelLMF Lower Membership FunctionMCTS Monte Carlo Tree SearchMAE Mean Absolute ErrorMF Membership FunctionMSE Mean square errorNCHC National Center for High Performance and ComputingNUTN National University of TainanOASE Ontology Application & software EngineeringOS Operation SystemOWL Web Ontology Language

Page 18: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

XX Acronyms

PDCA Plan, Do, Check, and ActPID Proportional-Integral-DerivativePMC Project Monitoring and ControlQFD Quality Function DevelopmentSMTP Simple Mail Transfer ProtocolSWOT Strength, Weakness, Opportunity, and ThreatT1FLS Type-1 Fuzzy Logic SystemT2FS Type-2 fuzzy setTCP/IP Transmission Control Protocol/Internet ProtocolTMAN Taiwan Malware Analysis NetTP-CMC Two-Phase Concept Map ConstructionTSK Takagi-Sugeno-KangUMF upper membership functionXML eXtensible Markup LanguageXSLT eXtensible Stylesheet Language TransformationsXSD XML Schema Document

Page 19: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Part IFuzzy Markup Language – Fundamentals

Page 20: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

On the Need of a Standard Languagefor Designing Fuzzy Systems

Bruno N. Di Stefano

Abstract. Fuzzy logic has been extensively used in industrial environments for itscapability to describe the behavior of uncertain and imprecise systems by means ofa simple linguistic approach. However, in spite of its huge applicability, fuzzy logiclacks of a unified and standardized tool for coding fuzzy rules on heterogeneoushardware. This chapter describes how the need of a universal description languagearose in the fuzzy logic community by introducing some past attempts to standardfuzzy language, such as the IEC 61131-7 Fuzzy Control Language. Starting fromthis discussion, a comparison between the old proposal and the Fuzzy Markup Lan-guage (FML) is performed in order to validate the application of FML as a futurestandard tool for the development of industrial fuzzy controllers and intelligent de-cision making systems.

1 Introduction

Fuzzy Logic [21–23] is a form of continuous multi-valued logic allowing “computingwith words” and modeling complex systems characterized by imprecise and vaguebehaviors by means of a linguistic approach. Thanks to its capability in describingcomplex relationships among systems’ variables, fuzzy logic has been successfullyapplied to different industrial scenarios [8] yielding performance better than conven-tional engineering methods based on differential equations (e.g. proportional plusintegral plus derivative - PID). This benefit arises from the fact that the fuzzy com-putation is based on simple membership functions (see Fig. 1) and operators as t-norms and t-conorms which also provide simple hardware implementations. Theseimplementations can be obtained by opportunely programming fuzzy-based arith-metic logic unit or storing fuzzy control surfaces (see Fig. 2 ) by using lookup tables.

Bruno N. Di StefanoNuptek Systems Ltd, Canadae-mail: [email protected],

[email protected]

G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 3–15.DOI: 10.1007/978-3-642-35488-5_1 c© Springer-Verlag Berlin Heidelberg 2013

Page 21: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

4 B.N. Di Stefano

Fig. 1 Examples of Fuzzy Membership Functions

Currently, fuzzy logic can be used to deal with imprecise and vague data in twoways:

• by translating the application domain expert’s experience into a computer algo-rithm by interviewing the expert and extracting the applicable rule base;

• by providing a tool for adaptively extracting rules from the data itself.

By alternatively applying both methods in a repetitive fashion it is possible to im-prove the results that can be obtained with one method only. This is not the onlyway of applying fuzzy logic, but it is an efficient way which allows developing asystem close to the thought process of the designers and to the intellectual image ofthe system held by the educated users of the system, such as plant engineers, controlengineers, etc. To name just a few famous examples [3–7] [9–20], industrial appli-cations of fuzzy logic include water treatment plants, braking systems for subway

Page 22: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

On the Need of a Standard Language for Designing Fuzzy Systems 5

Fig. 2 A Fuzzy Surface

cars, photo & video camera focus electronic circuitry, vehicle control systems, andcontrol in chemical and biological processes. Just to name one company in the fieldof industrial controls, Omron Corporation has 350 patents in this field. Fuzzy logichas become a multibillion-dollar industry. Nevertheless, some industrial and processengineers trained in traditional control theory, calculus, and related disciplines, of-ten have shown hesitation in adopting fuzzy logic, because of their impression thatit does not provide well-defined and standard guidelines for designing, developingand maintaining control systems. In order to bridge this gap, over the years manysoftware tools have been designed to facilitate and improve the fuzzy-based devel-opment process, e.g. fuzzyTECH1, the Fuzzy Logic Toolbox for MATLAB2, FuzzyLogic Inferencing Toolkit (FLINT)3, XFuzzy4, Fuzzy Inference Development En-vironment (FIDE)5 , etc. Between 1990 and 1992 there was a proliferation of suchtools, well beyond the small number of example s given. Every tool was optimizedfor a specific part of the development cycle or for a specific application domain.Any engineer or scientist wishing to take advantage of two or more of these soft-ware tools soon discovered the necessity of a universal development language, ableto cover all phases of the fuzzy logic development cycle. Moreover, a small numberof niche products allowed designing custom and semi-custom fuzzy logic hardware.For instance, American Neuralogix Inc. developed a number of hardware solutions6.

1 http://www.fuzzytech.com2 http://www.mathworks.com/products/fuzzy-logic/index.html3 http://www.lpa.co.uk/fln.htm4 http://www2.imse-cnm.csic.es/Xfuzzy/Xfuzzy 3.0/Xfuzzy3.0 en.pdf

5 http://www.zaptron.com/imageproc/fide.htm6 http://www.wikipatents.com/as/s assignee/American+NeuraLogix+Inc

Page 23: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

6 B.N. Di Stefano

Often, it was advantageous to develop part of the solution as high-speed hardwaremodule and some other part as software. However, one problem arose:

how to document something that could be implemented in both hardware and softwarewithout knowing a priori which technology would be used for each specific block?

In order to try to answer this question some attempts to define a standard languagefor describing fuzzy systems in abstract way have been done. For instance, the stan-dard IEC 61131-7 define the grammar of the Fuzzy Control Language (FCL), a high-level and specific purpose language aimed at modeling fuzzy systems in hardwareindependent way. However, this first proposal suffers from some shortcomings thatlimit its applicability in different industrial fields. This chapter is devoted to presentFCL and its shortcomings and, successively, it introduces the Fuzzy Markup Lan-guage (FML) as an innovative XML-based approach for modeling fuzzy systems inhigh level way and bridging FCL gaps.

This chapter is organized as follows: Section 2 is aimed at presenting the col-lection of documentations necessary for describing a programmable industrial con-trollers in a formal and well-defined way; section 3 is devoted to recall the standardIEC61131 whose main aim is to define the FCL grammar; section 4 will show howFML attempts to solve FCL drawbacks and it will introduce the rest of the book.

2 The Importance of the Documentation for the Design ofInteroperable Programmable Controllers

The quality of design and maintenance steps of a generic industrial product stronglydepends upon the product documentation, e.g. written specifications, schematic di-agrams, mechanical assembly drawings, etc. If the documentation is correct anddetailed, it is possible to transfer manufacturing of a product from one companyto another just by transferring a complete and correct set of the applicable docu-mentation. This documentation is essential also in the case in which the product issupposed to be modified during its life-cycle. If the product consists of mechanical,electrical, and electronic subsets, it is very easy to document it in such a way to allowa seamless technology transfer. Things are a bit more complex whenever substan-tial parts of the product are implemented in software. Different industrial standardsdefine the required documentation for products belonging to different technologicaland industrial domains. For complex systems there are families of standards encom-passing all aspects of a product. For instance, the IEC 61131 family of standards on“Programmable Controllers” consists, at the time of this writing, of eight standarddocuments:

• Part 1: General information• Part 2: Equipment requirements and tests• Part 3: Programming languages• Part 4: User guidelines• Part 5: Messaging service specification

Page 24: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

On the Need of a Standard Language for Designing Fuzzy Systems 7

• Part 6: Communications via fieldbus (Awaiting completion of fieldbus standards.)• Part 7: Fuzzy control programming• Part 8: Guidelines for the application and implementation of programming

languages

Part 7 is extremely important because it covers the actual algorithms that powerthe programmable controller. The nature of fuzzy logic is such that, without goodand standard documentation is impossible to understand how the control algorithmworks. Part 7, Fuzzy control programming, has the explicit object, stated in the doc-ument,“to offer the manufacturers and the users a well-defined common understand-ing of the basic means to integrate fuzzy control applications in the ProgrammableController languages according to IEC 61131-3, as well as the possibility to ex-change portable fuzzy control programs among different programming systems”.The first goal, i.e., the one relating to the programming languages, is probably lessrelevant today, than the standard committee thought. In fact IEC 61131-3 definestwo graphical and two textual PLC (i.e. Programmable Logic Controller) program-ming language standards:

• Ladder diagram (LD), graphical• Function block diagram (FBD), graphical• Structured text (ST), textual• Instruction list (IL), textual• Sequential function chart (SFC)

This is clearly restrictive and reflects both the date of publication of the standard,December 1993, and the fact that it had been in preparation for quite some time.Today, the object-oriented paradigm would probably be added. The second goal,i.e., “the possibility to exchange portable fuzzy control programs among differentprogramming systems.”, has become very relevant to practitioners and vendors ofsoftware for fuzzy systems, not only in the area of fuzzy control, but in the moregeneral area of fuzzy logics applications. As most systems are designed using soft-ware with proprietary graphical user interfaces, a method is needed to documentwhat each algorithm does. Next section is devoted to formally introduce FCL lan-guage and it drawbacks; successively, FML will be presented as a candidate standardlanguage for designing fuzzy systems.

3 A First Attempt for a Fuzzy Language: IEC 61131-7

As shown in previous section, industrial products documentation has to taken intoaccount the fuzzy description of the product behavior. In particular, Part 7 of IEC61131 defines the FCL (“fuzzy control language”), as a “domain-specific program-ming language”. In reality, using the term programming language speaking for theFCL is a misnomer because it is a “specification language”. Adopting the FCLas defined in IEC 61131-7 implies that all parties involved add to their software

Page 25: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

8 B.N. Di Stefano

functions to read and correctly parse FCL and to store the results of their work in aform compatible with FCL. Each party may implement their software in a differentway and using different programming language. Conformance with the standard forsystems using FCL consists of the following three levels:

• Basic Level including the definitions of the function block and the data types ofIEC 61131-3.

• Extension Level with optional features• Open Level encompassing additional features, not defined in this part of IEC

61131, but listed by the manufacturer.

Choosing which level of compliance one wants to adopt depends on the goal thatone wants to achieve. Going beyond the “Basic Level” often allows marketing pro-prietary technologies, but may limit the number and type of modules with whichone’s software can be interfaced.

As an example of system described using the FCL, we show the FCL code pub-lished at page 105 of 61131-7 IEC:2000, see listing 1. A detailed description of theFCL can be found in the IEC 61131-7 standard.

All FCL programs are contained in a “Function Block” and delimited by the pairFUNCTION BLOCK and END FUNCTION BLOCK. There may be more thanone Function Block per file. The syntax of a Function Block statement is as follows

FUNCTION BLOCK f u n c t i o n b l o c k n a m e END FUNCTION BLOCK

In listing 1 “function block name” is “container crane”.A “minimal” Function Block is as follows:

f u n c t i o n b l o c k d e c l a r a t i o n : : = ’FUNCTION BLOCK’f u n c t i o n b l o c k n a m e{ f b i o v a r d e c l a r a t i o n s }{ o t h e r v a r d e c l a r a t i o n s }f u n c t i o n b l o c k b o d y’END FUNCTION BLOCK’

Within a “Function Bloc” input and output variables are declared respectively bymeans of the “VAR INPUT Input parameter declaration” and of the “VAR OUTPUTOutput parameter declaratio”. Both statements VAR INPUT and VAR OUTPUTare terminated by an END VAR statement each. Each “variable name:” defines adata type, that can be either “REAL” or “INTEGER”, but in most real life cases it is“REA”. The general format is as follows for input variables:

VAR INPUT I n p u t p a r a m e t e r d e c l a r a t i o nv a r i a b l e n a m e : d a t a t y p e ;. . . .

END VAR

And as follows for output variables:

VAR OUTPUT Outpu t p a r a m e t e r d e c l a r a t i o nv a r i a b l e n a m e : d a t a t y p e ;. . .

END VAR

Page 26: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

On the Need of a Standard Language for Designing Fuzzy Systems 9

FUNCTION BLOCK c o n t a i n e r c r a n e

VAR INPUTd i s t a n c e : REAL;a n g l e : REAL;END VAR

VAR OUTPUTpower : REAL;END VAR

FUZZIFY d i s t a n c eTERM t o o f a r := (−5 , 1 ) ( 0 , 0 ) ;TERM z e r o := (−5 , 0 ) ( 0 , 1 ) ( 5 , 0 ) ;TERM c l o s e := ( 0 , 0 ) ( 5 , 1 ) ( 1 0 , 0 ) ;TERM medium := ( 5 , 0 ) ( 1 0 , 1 ) ( 2 2 , 0 ) ;TERM f a r := ( 1 0 , 0 ) ( 2 2 , 1 ) ;END FUZZIFY

FUZZIFY a n g l eTERM n e g b i g := (−50 , 1 ) (−5 , 0 ) ;TERM n e g s m a l l := (−50 , 0 ) (−5 , 1 ) ( 0 , 0 ) ;TERM z e r o := ( −5, 0 ) ( 0 , 1 ) ( 5 , 0 ) ;TERM p o s s m a l l := ( 0 , 0 ) ( 5 , 1 ) ( 5 0 , 0 ) ;TERM p o s b i g := ( 5 , 0 ) ( 5 0 , 1 ) ;END FUZZIFY

DEFUZZIFY powerTERM n e g h i g h := −27;TERM neg medium := −9;TERM z e r o := 0 ;TERM pos medium := 9 ;TERM p o s h i g h := 2 7 ;METHOD: CoGS ;DEFAULT:= 0 ;END DEFUZZIFY

RULEBLOCK No1AND: MIN;ACCU: MAX;RULE 1 : IF d i s t a n c e IS f a r AND a n g l e IS z e r o THEN power IS pos medium ;RULE 2 : IF d i s t a n c e IS f a r AND a n g l e IS n e g s m a l l THEN power IS p o s b i g ;RULE 3 : IF d i s t a n c e IS f a r AND a n g l e IS n e g b i g THEN power IS pos medium ;RULE 4 : IF d i s t a n c e IS medium AND a n g l e IS n e g s m a l l THEN power IS neg medium ;RULE 5 : IF d i s t a n c e IS c l o s e AND a n g l e IS p o s s m a l l THEN power IS pos medium ;RULE 6 : IF d i s t a n c e IS z e r o AND a n g l e IS z e r o THEN power IS z e r o ;END RULEBLOCK

END FUNCTION BLOCK

Listing 1 Implementation of the container crane example in FCL, from page 105 of 61131-7IEC:2000

In the example of listing 1 this part consists of:VAR INPUTd i s t a n c e : REAL;a n g l e : REAL;END VAR

VAR OUTPUTpower : REAL;END VAR

Page 27: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

10 B.N. Di Stefano

Similarly, the keywords FUZZIFY & END FUZZIFY and DEFUZZIFY &END DEFUZZIFY delimit respectively the definition of the variable to be fuzzifiedand defuzzified. The defuzzification method to be used is defined with the keywordMETHOD. The only standard defuzzification methods guaranteed to be accepted byall implementations are: “Centre of Gravity” (CoG), “Centre of Gravity for Single-ton” (CoGS), “Centre of Area” (CoA), “Left Most Maximum” (LM) , “Right MostMaximum” (RM). Designers wishing to employ different defuzzification methodmust make sure that their chosen method can be FCL accepted. In listing 1, this partcorresponds to:

FUZZIFY a n g l eTERM n e g b i g := (−50 , 1 ) (−5 , 0 ) ;TERM n e g s m a l l := (−50 , 0 ) (−5 , 1 ) ( 0 , 0 ) ;TERM z e r o := ( −5, 0 ) ( 0 , 1 ) ( 5 , 0 ) ;TERM p o s s m a l l := ( 0 , 0 ) ( 5 , 1 ) ( 5 0 , 0 ) ;TERM p o s b i g := ( 5 , 0 ) ( 5 0 , 1 ) ;END FUZZIFY

DEFUZZIFY powerTERM n e g h i g h := −27;TERM neg medium := −9;TERM z e r o := 0 ;TERM pos medium := 9 ;TERM p o s h i g h := 2 7 ;METHOD: CoGS ;DEFAULT:= 0 ;END DEFUZZIFY

The keywords RULEBLOCK and END RULEBLOCK delimit the actual knowl-edge base of the fuzzy control system. The use of several rule blocks is allowed.Each rule block has a unique ruleblock name. Using multiple ruleblock names al-lows for partitioning of the ruleblock, making it easier to understand how the rulesare defined. Fuzzy operators are used inside the rule block, as follows:

RULEBLOCK r u l e b l o c k n a m eo p e r a t o r d e f i n i t i o n ;[ a c t i v a t i o n m e t h o d ; ]a c c u m u l a t i o n m e t h o d ;r u l e s ;END RULEBLOCK

The fuzzy operators are used inside the rule block, as follows

o p e r a t o r d e f i n i t i o n : : = o p e r a t o r : a l g o r i t h m

To fulfill de Morgan’s Law, the algorithms for operators AND and OR are usedpair-wise; for example MAX shall be used for OR if MIN is used for AND (seeAND: MIN; in listing 1).

The accumulation method is defined by means of a statement of the type:

ACCU: a c c u m u l a t i o n m e t h o d ;

In in listing 1 this is implemented with “ACCU: MAX;”The general format of the rules is given by

RULE numbers : IF c o n d i t i o n THEN c o n c l u s i o n [ WITH w e i g h t i n g f a c t o r ] ;

Page 28: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

On the Need of a Standard Language for Designing Fuzzy Systems 11

The weighting factor is a number with a value between 0.0 and 1.0, or a vari-able. The purpose of the weighting factor is to reduce the membership degree bymultiplication of the result in the expression with the weighting factor.

In the example of listing 1 the ruleblock consists of:

RULEBLOCK No1AND: MIN;ACCU: MAX;RULE 1 : IF d i s t a n c e IS f a r AND a n g l e IS z e r o THEN power IS pos medium ;RULE 2 : IF d i s t a n c e IS f a r AND a n g l e IS n e g s m a l l THEN power IS p o s b i g ;RULE 3 : IF d i s t a n c e IS f a r AND a n g l e IS n e g b i g THEN power IS pos medium ;RULE 4 : IF d i s t a n c e IS medium AND a n g l e IS n e g s m a l l THEN power IS neg medium ;RULE 5 : IF d i s t a n c e IS c l o s e AND a n g l e IS p o s s m a l l THEN power IS pos medium ;RULE 6 : IF d i s t a n c e IS z e r o AND a n g l e IS z e r o THEN power IS z e r o ;END RULEBLOCK

Even though FCL enabled systems’ designers to program their fuzzy artifacts ina direct way, without having some knowledge about conventional general purposeprogramming languages, it mainly lacks in two different aspects:

• the purely textual nature of FCL does not enable to implement FCL programs ondifferent hardware architectures without additional efforts;

• FCL is based on a centralized approach and, as a consequence, its programscannot be delivered in distributed computing scenarios.

As will be shown in the next section and chapters, FML is aimed at solving FCLissues by fully exploiting XML technologies both for achieving a full hardwareinteroperability and distributing fuzzy computation in modern ubiquitous computingapplications.

4 Fuzzy Markup Language: A Novel Proposal for a StandardFuzzy Systems Language

FML [1] [2] is a markup language for fuzzy systems description, introduced by Gio-vanni Acampora during his Ph.D. course at University of Salerno, Italy. Differentfrom FCL, FML exploits XML technologies for obtaining a fully hardware inter-operability and ubiquitous computing features. Mike Watts stated on his popularComputational Intelligence Blog7:

Giovanni Acampora describes the Fuzzy Markup Language (FML) in a series of arti-cles. FML is a XML-based method for describing fuzzy logic systems [...] The majoradvantage of using XML to describe a fuzzy system is interoperability. All that isneeded to read an XML file is the appropriate schema for that file, and an XML parser.This makes it much easier to exchange fuzzy systems between software: for example,an application could extract fuzzy rules from a neural network (like the EFuNN andSECoS rule extraction algorithms that exist) which could then be read directly into

7 http://computational-intelligence.blogspot.com/2011/05/fuzzy-markup-language.html

Page 29: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

12 B.N. Di Stefano

a fuzzy inference engine or uploaded into a fuzzy controller. Also, with technologieslike XSLT, it is possible to compile the FML into the programming language of yourchoice, ready for embedding into whatever application you please [...] I would muchrather have used something like FML for my work.

Thanks to these important features, FML improves the FCL’s description capabil-ities, too limited for allowing practitioners to exchange information about fuzzyalgorithms, and consequently solves the following FCL pitfalls:

• FCL is static because it contains information about the data but not about thefunctions needed to process the data;

• An FCL description of an algorithm may result in different implementations ofthe algorithm;

• FCL cannot generate an executable program;• FCL does not support “hedges”;• FCL lacks support for higher-order fuzzy sets;• FCL does not allow binding data and function, a standard feature of OOP

languages.

FML solved these issue by using an alternative representation of fuzzy controllers.This representation is based on the notion of the labeled tree (see Fig. 3). Thisnovel structural vision of a fuzzy system made particularly simple to define a tagsbased grammar capable of hierarchically depicting different fuzzy components. Be-sides to solve aforementioned FCL drawbacks, the hierarchical nature of the labeledtree representation used by FML allows systems designers to define their fuzzycontrollers by using XML technologies and, consequently, strongly improve theinteroperability of the designed systems; moreover, since XML is used for distribut-ing information in complex distributed environments, FML description of a fuzzysystem enable the distribution of fuzzy computation in ubiquitous environments ascould be required from the current trends of computing; finally, because labeled treeare characterized by a well-defined geometrical shape, fuzzy systems designers canvisually implement FML controllers and, consequently, reduce the design time of ageneric fuzzy framework.

The rest of this book covers the FML (Part I) and its application (Part II) in detail.Chapter 2 shows that the FML is a XML-based language whose main purpose

is to bridge the potential implementation gaps that may exist when the high levelabstraction of a fuzzy control system may be instantiated into different hardwareplatforms. This chapter introduces the FML grammar and shows how FML can beused in interoperable hardware scenarios by means of XSLT approaches. Chapter 2also introduces a preliminary vision of FML for describing Type 2 Fuzzy Systems.

Chapter 3 shows that the XML based nature of FML makes possible toembed fuzzy reasoning in computing scenarios characterized by high levels ofpervasiveness and ubiquity. Through this additional feature, FML technologymay efficiently distribute pieces of the global control flow on different devices pop-ulating a pervasive environment. In Chapter 3 FML features are exploited to im-plement an agent-based framework designed for providing proactive and distributedservices in an Ambient Intelligent (AmI) scenario. In particular, FML is combined

Page 30: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

On the Need of a Standard Language for Designing Fuzzy Systems 13

Controller

Knowledge Base

Rule Base

Food Service Tip

Fuzzy Terms

Fuzzy Terms

Fuzzy Terms

IF … THEN Tip is Generous

IF … THEN Tip is Average

IF … THEN Tip is Cheap

Antecedent &

Consequent

Antecedent &

Consequent

Antecedent &

Consequent

Fig. 3 A Fuzzy System Labeled Tree

with a distributed learning strategy for capturing habits of users that live a smartenvironment and generating an appropriate collection of services satisfying users’preferences. This chapter shows by means of a case study that the exploitation ofFML distributed features simultaneously allows achieving the relevant advantage ofreducing the fuzzy computation effort and providing the most suitable collection ofdistributed services fulfilling a prefixed objective.

Chapter 4 shows how FML benefits arise from the exploitation of an alterna-tive representation of a fuzzy system based on labeled trees, data structure derivedfrom XML-based document representation. Moreover, this new graphical fuzzy sys-tem representation can be exploited to implement an enhanced visual environmentwhich allows designers to easily model a fuzzy system through visual steps. Thischapter is devoted, firstly, to present the new graphical representation of a fuzzy sys-tem based on labeled trees, and, secondly, to describe the implemented framework,called Visual FML Tool, capable of exploiting labeled tree benefits by achieving atwofold purpose: the simplification of the fuzzy system design through simple vi-sual steps and a hardware-independent fuzzy system modeling thanks to the directmapping of the fuzzy system labeled tree in a FML program.

Four chapters follow with actual examples of application of the FML to real lifeapplications:

• an FML-based semantic inference mechanism for an After School AlternativeProgram (ASAP) in Taiwan;

• an FML based fuzzy ontology and its application to university assessment forNational University of Tainan (NUTN), Taiwan;

• a food ontology and type-2 fuzzy dietary ontology are further applied to the di-etary assessment. Additionally, with the technologies of the type-2 fuzzy sets and

Page 31: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

14 B.N. Di Stefano

fuzzy inference approach based on FML, the dietary healthy level is obtained togive users a reference for their eating;

• a type-2 FML-based personal ontology, a type-2 meeting scheduling ontology,and a decision supported system for a meeting scheduling system.

The chapters are aimed at introducing the different features provided by FML andthe potential application scenarios where FML could be successfully applied.

5 Conclusion

FML will represent an important innovation in the field of computational intelli-gence thanks to its capabilities of providing fuzzy systems to deal with collectionsof interoperable and heterogeneous hardware. By means of this novel design anddevelopment paradigm, FML will allow fuzzy scientists and engineers to expresstheir idea and to exchange fuzzy systems between their software in a simple andfast way. This new way of working will help to consolidate the exploitation of fuzzylogic in industrial and academic scenarios and simplify the work of people involvedin the analysis, design and development of systems based on fuzzy approaches.

References

1. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive do-motic framework. IEEE Transactions on Industrial Informatics 2, 97–111 (2005)

2. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelli-gence. Information Sciences 178(3), 631–646 (2008)

3. Bernard, J.A.: Use of rule-based system for process control. IEEE Control Systems Mag-azine 8, 3–13 (1988)

4. Fujitec, F.: FLEX-8800 series elevator group control system. Fujitec Co., Ltd., Osaka(1988)

5. Itoh, O., Gotoh, K., Nakayama, T., Takamizawa, S.: Application of fuzzy control to acti-vated sludge process. In: Proc. 2nd IFSA Congress, Tokyo, Japan, pp. 282–285 (1987)

6. Kinoshita, M., Fukuzaki, T., Satoh, T., Miyake, M.: An automatic operation method forcontrol rods in BWR plants. In: Proc. Specialists’ Meeting on In-Core Instrumentationand Reactor Core Assessment, Cadarache, France (1988)

7. Lee, C.C.: Fuzzy Logic in Control Systems: Fuzzy Logic Controller - Part I. IEEE Trans-actions on Systems, Man and Cybernetics 20, 404–418 (1990)

8. Mamdani, E.H., Assilian, S.: An experiment in linguistic synthesis with a fuzzy logiccontroller. Int. Journal of Man-Machine Studies 7, 1–13 (1973)

9. Togai, M., Chiu, S.: A fuzzy accelerator and a programming environment for real-timefuzzy control. In: Proc. 2nd IFSA Congress, Tokyo, Japan, pp. 147–151 (1987)

10. Togai, M., Watanabe, H.: Expert system on a chip: An engine for real-time approximatereasoning. IEEE Expert Systems Magazine 1, 55–62 (1986)

11. Watanabe, H., Dettloff, W.: Reconfigurable fuzzy logic processor: A full custom digitalVLSI. In: Int. Workshop on Fuzzy System Applications, Iizuka, Japan, pp. 49–50 (1988)

Page 32: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

On the Need of a Standard Language for Designing Fuzzy Systems 15

12. Yamakawa, T.: High speed fuzzy controller hardware system. In: Proc. 2nd Fuzzy SystemSymp., Japan, pp. 122–130 (1986)

13. Yamakawa, T.: Fuzzy controller hardware system. In: Proc. 2nd IFSA Congress, Tokyo,Japan (1987)

14. Yamakawa, T.: A simple fuzzy computer hardware system employing min and max op-erations - A challenge to 6th generation computer. In: Proc. 2nd IFSA Congress, Tokyo,Japan (1987)

15. Yamakawa, T.: Fuzzy microprocessors-Rule chip and defuzzifier chip. In: Int. Workshopon Fuzzy System Applications, Iizuka, Japan, pp. 51–52 (August 1988)

16. Yagishita, O., Itoh, O., Sugeno, M.: Application of fuzzy reasoning to the water purifica-tion process. In: Sugeno, M. (ed.) Industrial Applications of Fuzzy Control, pp. 19–40.North-Holland, Amsterdam (1985)

17. Yamakawa, T., Miki, T.: The current mode fuzzy logic integrated circuits fabricated bythe standard CMOS process. IEEE Transactions on Computer C-35, 161–167 (1986)

18. Yamakawa, T., Sasaki, K.: Fuzzy memory device. In: Proc. 2nd IFSA Congress, Tokyo,Japan, pp. 551–555 (1987)

19. Yasunobu, S., Miyamoto, S.: Automatic train operation by predictive fuzzy control. In:Sugeno, M. (ed.) Industrial Applications of Fuzzy Control, pp. 1–18. North- Holland,Amsterdam (1985)

20. Yasunobu, S., Hasegawa, T.: Evaluation of an automatic container crane operation systembased on predictive fuzzy control. Control Theory and Advanced Technology 2, 419–432(1986)

21. Zadeh, L.A.: Fuzzy sets. Information and Control 8, 338–353 (1965)22. Zadeh, L.A.: Fuzzy algorithm. Information and Control 12, 94–102 (1968)23. Zadeh, L.A.: Toward a theory of fuzzy systems. In: Kalman, R.E., De Claris, N. (eds.)

Aspects of Network and System Theory, p. 469. Rinehart & Winston, New York (1971)

Page 33: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Fuzzy Markup Language: A XML BasedLanguage for Enabling Full Interoperability inFuzzy Systems Design

Giovanni Acampora

Abstract. Historically, the theory of fuzzy logic has been strongly used forenabling designers of industrial controllers and intelligent decision making frame-works to model complex systems by expressing their expertise through simple lin-guistic rules. Nevertheless, the design activity of a fuzzy system may be affectedby strong difficulties related to the implementation of a same system on differenthardware architectures, each one characterized by a proper set of electrical/elec-tronic/programming constraints. These difficulties could become very critical whena fuzzy system needs to be deployed in distributed environments populated by a col-lection of interacting and heterogeneous hardware devices. Fuzzy Markup Language(FML) is a XML-based language whose main aim is to bridge the aforementionedimplementation gaps by introducing an abstract and unified approach for designingfuzzy systems in hardware independent way. In details, FML is a novel specific-purpose computer language that defines a detailed structure of fuzzy control inde-pendent from its legacy representation and improve systems’ designers capabilitiesby providing them with a collection of facilities speeding up the whole develop-ment process of a centralized or distributed fuzzy system. This chapter is devotedto introduce FML details, an application sample, and it will provided some initialaspects about FML-II, a FML grammar extension aimed at modeling Type-II fuzzysystems.

1 Introduction

Since its birth, in the middle of the 1970s, fuzzy control [8] has been successfullyapplied to different application scenarios [7]. This successful history is mainly dueto the superiority provided by fuzzy logic theory [27] [28] [29] respect to conven-tional proportional-integral-derivative controller (PID) in terms of simplicity and

Giovanni AcamporaSchool of Industrial Engineering, Information Systems, Eindhoven University of Technology,P.O. Box 513, 5600 MB, Eindhoven, The Netherlandse-mail: [email protected]

G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 17–31.DOI: 10.1007/978-3-642-35488-5_2 c© Springer-Verlag Berlin Heidelberg 2013

Page 34: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

18 G. Acampora

efficiency. Indeed, while traditional control systems are based on mathematical mod-els in which the control system is described using one or more differential equa-tions that define the system response to its inputs, fuzzy control exploits a collectionof so called linguistic rules capable of directly capturing and modeling the humanexpertise and skills related to a given application domain. Moreover, because thefuzzy inference approaches are based on simple arithmetic operators (precisely t-norm and t-conorm), fuzzy controllers can be efficiently implemented on low costhardware such as 4-bit or 8-bit processors. Besides the benefits related to the sim-plicity and efficiency, fuzzy systems have obtained obtained a major role in engi-neering systems and consumer products thanks to their capability to act as valid toolfor supporting knowledge discovery activities. In consequence of provided benefitsfuzzy sets theory have supported the development of complex applications mainlybelonging to the field of industrial controllers and intelligent decision making sys-tems such as, for instance, water quality control [5, 19], automatic train operationsystems [17, 22, 24], automatic container crane operation systems [4, 25], elevatorcontrol [3], nuclear reactor control [8, 15], automobile transmission control [16],fuzzy logic controller hardware systems [12, 13], fuzzy memory devices [14, 16],and fuzzy computers [17] have pointed a way for an effective utilization of fuzzycontrol in the context of complex ill-defined processes that can be controlled by askilled human operator without the knowledge of their underlying dynamics.

Nevertheless, in spite of these evident benefits, the real design of fuzzy systemsis strongly depends upon hardware architectures which will implement the runningversion of designed controllers. Indeed, even though fuzzy systems can be devel-oped by using hardware solutions characterized by low costs and low complexity,their real implementation is strongly depends upon the electrical, electronic andprogramming constraints related to the particular hardware platform. This drawbackmay result in dire design consequence when fuzzy control approach is used for mod-eling the behavior of pervasive or ubiquitous frameworks, i.e. distributed computingenvironments composed by collections of interacting and heterogeneous hardwaredevices. Fuzzy Markup Language (FML) [1, 2] is a XML-based language whosemain aim is to bridge the aforementioned implementation gaps by introducing anabstract and unified approach for designing fuzzy systems in hardware independentway. In details, FML is a novel specific-purpose computer language that defines adetailed structure of fuzzy control independent from its legacy representation andimprove systems designers capabilities by providing them with a collection of fa-cilities speeding up the whole development process of a centralized or distributedfuzzy system. In the next sections it will be show how the different componentsof a generic fuzzy system can be modeled by means of appropriate XML tags andattributes. This mapping represents a fundamental step for defining the FML gram-mar, i.e. the collection of XML rules that a system designer should be compliant inorder to define well-formed FML-based fuzzy controllers. Once the FML grammaris defined, it will be introduced the concept of translator stylesheets that can be con-sidered as compilers capable of translating FML code to a runnable program codedby using conventional computer programming language.

Page 35: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

FML for Enabling Full Interoperability in Fuzzy Systems Design 19

2 Fuzzy Markup Language: The Grammar and StylesheetTranslators

Fuzzy Markup Language (FML) is an emerging XML-based markup languagewhose main aim is the design and implementation of fuzzy controllers (FLC). Inparticular, it is used to model two well-known kind of fuzzy controllers: Mamdaniand Takagi-Sugeno-Kang (TSK). FML programs are coded through a collection ofcorrelated semantic tags capable of modeling the different components of a classicalfuzzy controllers by exploiting abstraction benefits offered by XML tools. Differentfrom other similar approaches used to describe fuzzy controllers such as Fuzzy Con-trol Language1 (FCL) or MATLAB Fuzzy Inference System (FIS) developed by theMathworks2, FML allows fuzzy designers to simply code their ideas on heteroge-neous hardware without having understanding about details related to the differentplatforms. This approach enabling fuzzy systems designers to achieve the so-calledproperty named design transparency. It means that, thanks to FML, it is possible toimplement the same FLC on different hardware architectures with a minimal effort,without additional design and implementation steps. In short, thanks to FML it ispossible to model a fuzzy controller in human-readable and hardware independentway. In details, FML is essentially composed by three layers:

• XML in order to create a new markup language for fuzzy logic control;• a XML Schema in order to define the legal building blocks;• eXtensible Stylesheet Language Transformations (XSLT) in order to convert a

fuzzy controller description into a specific programming language.

Hereafter, it will be discussed how the different components of a generic fuzzy sys-tems can be modeled through an opportune XML-based grammar and, successively,it will be provided a brief description about FML tags and attributes and how to usethem for writing complex FML programs. Finally, it will be provided some detailsabout the development of XSLT transformations that will allow FML programs tobe run on particular hardware architectures.

2.1 FML Syntax: XML Tags and Attributes

This section is devoted to formally introduce the different components that definethe syntax and semantic of our fuzzy-oriented language. In order to achieve thisresult it is useful to analyze a fuzzy controller by a structural point of view high-lighting the different controllers parts that, successively, will be modeled throughopportune FML tags. Precisely, the high-level structure of fuzzy controller is shownin Fig.1 and, the main components of a fuzzy controller are:

• fuzzy knowledge base;• fuzzy rule base;

1 http://www.fuzzytech.com/binaries/ieccd1.pdf2 http://www.mathworks.com/

Page 36: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

20 G. Acampora

Fuzzy Inference Engine

Knowlegde Base Rule Base

Defuzzifier

Real ValuedInputs

Real ValuedOutputs

Input Fuzzy Sets Output Fuzzy Sets

Fuzzifier

Fig. 1 A generic fuzzy control

• inference engine;• fuzzification subsystem;• defuzzification subsystem.

The fuzzy knowledge base manipulates the variables used in the controlled system(such as temperature, pressure, etc.), corresponding to the knowledge used by hu-man experts. The Fuzzy Rule Base represents the set of relations between fuzzyvariable defined in the controller system. The Inference Engine is the fuzzy con-troller component able to extract new knowledge from fuzzy knowledge base andfuzzy rule base. Moreover, the controlled system works with real numbers, whereasthe fuzzy controller system works with fuzzy concepts. The two subsystems, thefuzzification subsystem and the defuzzification subsystem, are necessary to bridgecontrolled systems with controller systems. The former permits to transform the realnumbers used by controlled systems into a fuzzy set used by fuzzy controller. Thelatter transforms the fuzzy set generated by fuzzy controller into real numbers usableby controlled system. The nature of consequent part of fuzzy rules permits to definetwo kind of fuzzy controller: the Mamdani controller and the Takagi-Sugeno-Kang(TSK) controller. The Mamdani controller uses a fuzzy set to model the consequentpart of rule, whereas the TSK controller uses the linear function of input variable todescribe the rule consequent part. FML permits to model both fuzzy controllers.

FML uses an alternative representation of fuzzy controller in order to derive anXML-based model. This representation is based on the notion of the labeled tree(Fig. 2). Each node in fuzzy controller tree will represent an XML tag, and thefather-child relation represents a nested relation between related tags. Starting fromFig. 2 it is simple to individuate the collection of XML tags capable of modeling afuzzy controller.

Hereafter, the description of FML tags is provided. For sake of simplicity, andto better introduce the operating concepts, the discussion is focused on a Mamdanifuzzy controller useful to model Tipper Inference System described in MathworkMatlabTM Fuzzy Logic Toolbox Tutorial. The described system is used to regulatethe tipping in, for example, a restaurant. It has got two variables in input (food and

Page 37: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

FML for Enabling Full Interoperability in Fuzzy Systems Design 21

Controller

Knowledge Base

Rule Base

Food Service Tip

Fuzzy Terms

Fuzzy Terms

Fuzzy Terms

IF … THEN Tip is Generous

IF … THEN Tip is Average

IF … THEN Tip is Cheap

Antecedent &

Consequent

Antecedent &

Consequent

Antecedent &

Consequent

Fig. 2 Fuzzy controller tree

service) and one in output (tip). Then, we will describe also a Takagi-Sugeno-Kangsystem to show how FML manages this kind of controller.

In details, the controller node can be modeled by means of a tag named<FUZZY-CONTROLLER>. Such tag represents the root tag of FML program, that is, theopening tag of each FML program.

The tag <FUZZYCONTROLLER> which has two attributes: name and ip. Thename attribute permits to specify the name of fuzzy controller and ip is used todefine the location of controller in a computer network. The fuzzy knowledge baseis defined by means of the tag <KNOWLEDGEBASE> which maintains the setof fuzzy concepts used to model the fuzzy rule base. In order to define the fuzzyconcept related controlled system, <KNOWLEDGEBASE> tag uses a set of nestedtags:

• <FUZZYVARIABLE> defines the fuzzy concept;• <FUZZYTERM> defines a linguistic term describing the fuzzy concept;• a set of tags defining a shape of fuzzy sets are related to fuzzy terms.

<FUZZYVARIABLE> defines a fuzzy concept; <FUZZYTERM> defines a lin-guistic term describing the fuzzy concept; the set of tags defining the shapes of fuzzysets related to fuzzy terms. More in detail, the attributes of <FUZZYVARIABLE>tag are: name, scale, domainLeft, domainRight, type and, for only output concept,accumulation, defuzzifier and defaultValue. The name attribute defines the name offuzzy concept; scale is used to define the scale used to measure the fuzzy concept;domainLeft and domainRight are used to model the universe of discourse of fuzzyconcept, i.e, the set of real values related to fuzzy concept; the position of fuzzy

Page 38: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

22 G. Acampora

concept into rule (consequent part or antecedent part) is defined by type attribute(input/output); accumulation attribute defines the method of accumulation that is amethod that permits the combination of results of a variable of each rule in a finalresult; defuzzifier attribute defines the method used to execute the conversion froma fuzzy set, obtained after aggregation process, into a numerical value to give it inoutput to system; defaultValue attribute defines a real value used only when no rulehas fired for the variable at issue.

<FUZZYTERM> uses two attributes: name used to identify the linguistic valueassociate with fuzzy concept and complement, a boolean attribute that defines, if itis true, it is necessary to consider the complement of membership function definedby given parameters.

Finally, fuzzy shape tags, used to complete the definition of fuzzy concept, are:

• <TRIANGULARSHAPE>• <RIGHTLINEARSHAPE>• <LEFTLINEARSHAPE>• <PISHAPE>• <GAUSSIANSHAPE>• <RIGHTGAUSSIANSHAPE>• <LEFTGAUSSIANSHAPE>• <TRAPEZOIDSHAPE>• <SSHAPE>• <ZSHAPE>• <RECTANGULARSHAPE>• <SINGLETONSHAPE>

Every shaping tag uses a set of attributes which defines the real outline of corre-sponding fuzzy set. The number of these attributes depends on the chosen fuzzy setshape. For instance, the <TRIANGULARSHAPE> tag uses three parameters. Aspecial tag that can furthermore be used to define a fuzzy shape is <USERSHAPE>.This tag is used to customize fuzzy shape (custom shape). The custom shape mod-eling is performed via a set of <POINT> tags that lists the extreme points ofgeometric area defining the custom fuzzy shape. Obviously, the attributes used in<POINT> tag are x and y coordinates.

Considering as example, the “food” as input variable and “tip” as output one indefining our fuzzy control, the knowledge base, and in particular the quality of foodcan be modeled through the FML code in listing 1.

The fuzzy right subtree is used to define the rule base set. Indeed, it is possibleto define more rule bases to describe the different behaviors of system. The rootof this rule base is modeled by <RULEBASE> tag which defines a fuzzy rule set.The <RULEBASE> tag uses five attributes: name, type, activationMethod, and-Method and orMethod. Obviously, the name attribute uniquely identifies the rulebase. The type attribute permits to specify the kind of fuzzy controller (Mamdani orTSK) respect to the rule base at issue. The activationMethod attribute defines themethod used to implication process; the andMethod and orMethod attribute define,

Page 39: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

FML for Enabling Full Interoperability in Fuzzy Systems Design 23

. . . . . .<KnowledgeBase>

<F u z z y V a r i a b l e name=” food ” d o m a i n l e f t =” 0 . 0 ” d o m a i n r i g h t =” 1 0 . 0 ” s c a l e =””t y p e =” input ”>

<FuzzyTerm name=” d e l i c i u s ” complement =” f a l s e ”><L e f t L i n e a r S h a p e Param1=” 5 . 5 ” Param2=” 1 0 . 0 ”/>

</FuzzyTerm><FuzzyTerm name=” ranc id ” complement =” f a l s e ”>

<T r i a n g u l a r S h a p e Param1=” 0 . 0 ” Param2=” 2 . 0 ” Param3=” 5 . 5 ”/></FuzzyTerm>

</ FuzzyVar iab le >. . . . . . . .<F u z z y V a r i a b l e name=” t i p ” d o m a i n l e f t =” 0 . 0 ” d o m a i n r i g h t =” 2 0 . 0 ”

s c a l e =”Euro” d e f a u l t V a l u e =” 0 . 0 ” d e f u z z i f i e r =”COG”a c c u m u l a t i o n =”MAX” t y p e =” output ”>

<FuzzyTerm name=” average ” complement =” f a l s e ”><T r i a n g u l a r S h a p e Param1=” 5 . 0 ” Param2=” 1 0 . 0 ” Param3=” 1 5 . 0 ”/>

</FuzzyTerm><FuzzyTerm name=” cheap” complement =” f a l s e ”>

<T r i a n g u l a r S h a p e Param1=” 0 . 0 ” Param2=” 5 . 0 ” Param3=” 1 0 . 0 ”/></FuzzyTerm><FuzzyTerm name=” generous e” complement =” f a l s e ”>

<T r i a n g u l a r S h a p e Param1=” 1 0 . 0 ” Param2=” 1 5 . 0 ” Param3=” 2 0 . 0 ”/></FuzzyTerm>

</ FuzzyVar iab le ><KnowledgeBase>

Listing 1 FML code to model a portion of the tipper knowledge base

respectively, the and and or algorithm to use by default. In order to define the singlerule the <RULE> tag is used. The attributes used by the <RULE> tag are: name,connector, operator and weight. The name attribute permits to identify the rule; con-nector is used to define the logical operator used to connect the different clauses inantecedent part (and/or); operator defines the algorithm to use for chosen connector;weight defines the importance of rule during inference engine time. The definitionof antecedent and consequent rule part is obtained by using <ANTECEDENT>and <CONSEQUENT> tags. <CLAUSE> tag is used to model the fuzzy clausesin antecedent and consequent part. This tag use the attribute modifier to describe amodification to term used in the clause. To complete the definition of fuzzy clausethe nested <VARIABLE> and <TERM> tag have to be used.

As example, let us consider a Mamdani rule composed by (food is rancid) OR(service is very poor) as antecedent and tip is cheap as consequent. The antecedentpart is formed by two clauses: (food is rancid) and (service is poor). The first an-tecedent clause uses food as variable and rancid as fuzzy term, whereas, the secondantecedent clause uses service as a variable, poor as fuzzy term and very as modi-fier; the consequent clause uses tip as a fuzzy variable and cheap as a fuzzy term.The FML code to define a rule base containing this rule is shown in the listing 2.

Now, let us see a Takagi-Sugeno-Kang system that regulates the same issue.The most important difference with Mamdani system is the definition of a differ-ent output variable tip. The <TSKVARIABLE> tag is used to define an outputvariable that can be used in a rule of a Tsk system. This tag has the same attributesof a mamdani output variable except for the domainleft and domainright attribute

Page 40: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

24 G. Acampora

because a variable of this kind (called tsk-variable) hasn’t a universe of discourse.The nested <TSKTERM> tag represents a linear function and so it is completelydifferent from <FUZZYTERM>. The <TSKVALUE> tag is used to define the co-efficients of linear function. The following crunch of fml code shows the definitionof output variable tip in a Tsk system.

<RuleBase name=” Rulebase1 ” a c t i v a t i o n M e t h o d=”MIN” andMethod=”MIN”orMethod=”MAX” t y p e =”mamdani”>

<Rule name=” reg1 ” c o n n e c t o r =” or ” o p e r a t o r =”MAX” w e i g h t =” 1 . 0 ”><Anteceden t>

<Clause><V a r i a b l e>food </ V a r i a b l e><Term>r a n c i d </Term>

</Clause><Clause m o d i f i e r =” very ”>

<V a r i a b l e>s e r v i c e </ V a r i a b l e><Term>poor </Term>

</Clause></ An teceden t><Consequent>

<Clause><V a r i a b l e>t i p </ V a r i a b l e><Term>cheap</Term>

</Clause></Consequent>

</Rule>. . . . . . . .

</RuleBase>

Listing 2 FML code to model a portion of the tipper rule base

The FML definition of rule base component in a Tsk system doesn’t change alot. The only different thing is that the <CLAUSE> tag doesn’t have the modifierattribute. As example, let us consider a tsk rule composed by (food is rancid) OR(service is very poor) as antecedent and, as consequent, tip = 1.9+ 5.6 ∗ f ood +6.0 ∗ service that can be written as tip is cheap in an implicitly way. Let us see howfml language define a rule base with this rule.

FML has been designed to be simply embedded into distributed artificial intel-ligence environment and, for this reason, some tags use an additional, not fuzzylogic oriented, attribute exploited to move the different components of a controlleron different computational hosts in order to achieve a massive parallelization duringfuzzy inference. The additional attribute is named ip and it is used by the follow-ing tags: <KNOWLEDGEBASE>, <FUZZYVARIABLE>, <RULEBASE> and<RULE>.

2.2 Describing the FML Grammar through XML Schema

The FML tags used to build a fuzzy controller represent the set of lexemes usedto create fuzzy expressions. However, in order to realize a well-formed XML-based

Page 41: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

FML for Enabling Full Interoperability in Fuzzy Systems Design 25

<?xml v e r s i o n =” 1 . 0 ” encod ing =”UTF−8”?><F u z z y C o n t r o l l e r name=”newSystem” i p =” 1 2 7 . 0 . 0 . 1 ”>

<KnowledgeBase>. . .

<TSKVariable name=” t i p ” s c a l e =” n u l l ” a c c u m u l a t i o n =”MAX” d e f u z z i f i e r =”WA”t y p e =” output ”>

<TSKTerm name=” average ” o r d e r =”0”><TSKValue>1.6</TSKValue>

</TSKTerm><TSKTerm name=” cheap” o r d e r =”1”>

<TSKValue>1.9</TSKValue><TSKValue>5.6</TSKValue><TSKValue>6.0</TSKValue>

</TSKTerm><TSKTerm name=” generous e” o r d e r =”1”>

<TSKValue>0.6</TSKValue><TSKValue>1.3</TSKValue><TSKValue>1.0</TSKValue>

</TSKTerm></TSKVariable>

<KnowledgeBase>. . .

</ F u z z y C o n t r o l l e r >

Listing 3 FML code to model the variable tip in a TSK system

<RuleBase name=” Rulebase1 ” a c t i v a t i o n M e t h o d=”MIN” andMethod=”MIN” orMethod=”MAX”t y p e =” t s k ”><Rule name=” reg1 ” c o n n e c t o r =” or” o p e r a t o r =”MAX” w e i g h t=” 1 . 0 ”><Anteceden t>

<Clause><V a r i a b l e>food </ V a r i a b l e><Term>r a n c i d </Term>

</Clause><Clause>

<V a r i a b l e>s e r v i c e </ V a r i a b l e><Term>poor </Term>

</Clause></ An teceden t><Consequent>

<Clause><V a r i a b l e>t i p </ V a r i a b l e><Term>cheap</Term>

</Clause></Consequent>

</Rule>. . . .

</RuleBase>

Listing 4 FML code to model a rule in a TSK system

language, an FML context-free grammar is necessary and described in the follow-ing. The FML context-free grammar is modeled by XML file in the form of a XMLSchema Document (XSD) which expresses the set of rules to which a documentmust conform in order to be considered a valid FML document.

Based on the previous definition, the portion of the FML XSD regarding theknowledge base definition is given (see listing 2.2).

Page 42: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

26 G. Acampora

<xs : schema xmlns : xs =” http : / / www. w3 . org / 2 0 0 1 /XMLSchema”>. . . . . . . .

<xs : complexType name=”KnowledgeBaseType ”><xs : s equence>

<xs : c h o i c e minOccurs=”0” maxOccurs=”unbounded ”><xs : e l e m e n t name=” FuzzyVariable ” t y p e =” FuzzyVariableType”/><xs : e l e m e n t name=”TSKVariable ” t y p e =”TSKVariableType ”/>

</ xs : cho ice></ xs : s equence>

</xs : complexType><xs : complexType name=” FuzzyVariableType”>

<xs : s equence><xs : e l e m e n t name=”FuzzyTerm” t y p e =”FuzzyTermType” maxOccurs=”unbounded ”/>

</ xs : s equence><xs : a t t r i b u t e name=”name” t y p e =” xs : s t r i n g ” us e=” required ”/><xs : a t t r i b u t e name=” d e f u z z i f i e r ” d e f a u l t =”COG”><xs : s impleType><xs : r e s t r i c t i o n bas e =” xs : s t r i n g ”><xs : p a t t e r n v a l u e =”MM|COG|COA|WA|Custom”/></ xs : r e s t r i c t i o n >

</ xs : s impleType></xs : a t t r i b u t e >

<xs : a t t r i b u t e name=” accumulation ” d e f a u l t =”MAX”><xs : s impleType><xs : r e s t r i c t i o n bas e =” xs : s t r i n g ”>

<xs : p a t t e r n v a l u e =”MAX|SUM”/></ xs : r e s t r i c t i o n >

</ xs : s impleType></xs : a t t r i b u t e >

<xs : a t t r i b u t e name=” s c a l e ” t y p e =” xs : s t r i n g ” /><xs : a t t r i b u t e name=” domain le f t ” t y p e =” xs : f l o a t ” us e=” required ”/><xs : a t t r i b u t e name=” domainright ” t y p e =” xs : f l o a t ” us e=” required ”/><xs : a t t r i b u t e name=” d e f a u l t V a l u e ” t y p e =” xs : f l o a t ” d e f a u l t =”0”/><xs : a t t r i b u t e name=” type ” d e f a u l t =” input ”>

<xs : s impleType><xs : r e s t r i c t i o n bas e =” xs : s t r i n g ”><xs : p a t t e r n v a l u e =” input | output ”/></ xs : r e s t r i c t i o n >

</ xs : s impleType></xs : a t t r i b u t e >

</ xs : complexType><xs : complexType name=”FuzzyTermType”><xs : cho ice><xs : e l e m e n t name=” RightLinearShape ” t y p e =”TwoParamType”/><xs : e l e m e n t name=” LeftLinearShape ” t y p e =”TwoParamType”/><xs : e l e m e n t name=” PIShape ” t y p e =”TwoParamType”/><xs : e l e m e n t name=” TriangularShape ” t y p e =”ThreeParamType”/><xs : e l e m e n t name=” GaussianShape ” t y p e =”TwoParamType”/><xs : e l e m e n t name=” RightGauss ianShape” t y p e =”TwoParamType”/><xs : e l e m e n t name=” LeftGauss ianShape ” t y p e =”TwoParamType”/><xs : e l e m e n t name=” TrapezoidShape ” t y p e =”FourParamType”/><xs : e l e m e n t name=” Sing le tonShape ” t y p e =”OneParamType”/><xs : e l e m e n t name=” RectangularShape ” t y p e =”TwoParamType”/><xs : e l e m e n t name=”ZShape” t y p e =”TwoParamType”/><xs : e l e m e n t name=”SShape” t y p e =”TwoParamType”/><xs : e l e m e n t name=” UserShape” t y p e =”UserShapeType ”/></xs : cho ice>

. . . . . . . . . .</ xs : schema>

Fig. 3 A portion of FML XSD concerning the Knowledge base definition

Page 43: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

FML for Enabling Full Interoperability in Fuzzy Systems Design 27

2.3 FML Synthesis: XSLT Documents

However, since an FML program realizes only a static view of a fuzzy system, theso-called eXtensible Stylesheet Language Translator (XSLT) is provided to changethis static view to a computable version. In particular, the XSLT technology is usedconvert a fuzzy controller description into a general-purpose computer language tobe computed on several hardware platforms. In our experiments, a XSLT convertingFML program in runnable Java code has been implemented. In this way, thanksto the transparency capabilities provided by Java virtual machines, it is possible toobtain a fuzzy controller modeled in high level way by means of FML and runnableon a plethora of hardware architectures through Java technologies. However, XSLTcan be also used for converting FML programs in legacy languages related to aparticular hardware or in other general purpose languages. 4 shows an example ofapplication of XSLT devoted to translate FML programs to Java code runnable in amulti-agent framework based on Jade.

Fig. 4 XSLT at work: converting FML to a Java Agent

3 An Extension of FML: Type 2 FML

During the past years, type-2 fuzzy sets and systems have become very popular.Indeed, they have been applied to different application scenarios by proposing anovel approach for handling the uncertainties characterizing type-I fuzzy sets [9,10]:

1. The meanings of the words that are used in the antecedents and consequents ofrules can be uncertain (words mean different things to different people).

2. Consequents may have a histogram of values associated with them, especiallywhen knowledge is extracted from a group of experts who do not all agree.

3. Measurements that activate a type-1 FLS may be noisy and therefore uncertain.4. The data that are used to tune the parameters of a type-1 FLS may also be noisy.

Page 44: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

28 G. Acampora

Type-2 fuzzy systems are able to represent such uncertainties because their mem-bership functions are themselves fuzzy.

Hereafter, it will be introduced an extension of the FML grammar allowing sys-tem designers to express their expertise by using “interval type-II fuzzy system”.

At the same way of type-I FML program, the root of a generic type-II FML-based system is represented through the tag <FuzzyController> characterized bytwo attributes: name and ip. The name attribute permits to specify the name of thefuzzy controller under design and ip is used to define the location of controllerin a computer network. Nested into tag <FuzzyController>, there are two tags,<KnowledgeBase> and <RuleBase>, which model, respectively, the knowledgebase and the rule base of a fuzzy controller. Different from original FML gram-mar, in order to define the set of type-2 fuzzy concepts contained in the knowl-edge base, a set of tags named <Type2FuzzyVariable> must be nested in the tag<KnowledgeBase>. In details, the attributes of the tag <Type2FuzzyVariable> are:

1. name which defines the name of type-2 fuzzy concept;2. scale which is used to define the scale used to measure the type-2 fuzzy concept;3. domainleft and domainright are used to model the universe of discourse of fuzzy

concept, that is, the set of real values related to fuzzy concept;4. type which defines the position of type-2 fuzzy concept into rule (consequent part

or antecedent part);5. accumulation which defines the method of accumulation, i.e., a method that per-

mits the combination of results of each rule of a variable in a final result;6. typeReduction which defines the method used to execute the type reduction, i.e,

the mapping of the type-2 fuzzy set obtained from inference process into a type-1fuzzy set;

7. defuzzifier which represents the method used to transform this type-1 fuzzy setin a crisp output for the system;

8. defaultValue which defines a real value used only when no rule has fired for thevariable at issue.

At the same way, in order to define terms of type-2 fuzzy concept, it needsto use a tag named <Type2FuzzyTerm> nested in <Type2FuzzyVariable> tag.<Type2FuzzyTerm> tag uses two attributes: name used to identify the linguis-tic value associated with fuzzy concept and complement, i.e., a Boolean attributethat defines, if it is true, it is necessary to consider the complement of a mem-bership function defined by given parameters. Some nested tags (listed in 1) in<Type2FuzzyTerm> are provided by Type-2 FML to describe the membershipfunction of a term of type-2 fuzzy concept. In turn, every shaping tag uses twonested tags, <UMF> and <LMF>, to define respectively the UMF and the LMF ofthe type-2 fuzzy set. <LMF> and <UMF> tag uses a set of attributes, which de-fines parameters of corresponding type-1 fuzzy set. The number of these attributesdepends on the chosen fuzzy set shape. A special tag that can furthermore be usedto define a fuzzy shape is <Type2UserShape>. This tag is used to build a type-2fuzzy set characterized by LMF and UMF represented by a customized fuzzy shape(custom shape). The custom-shape modeling is performed via a set of <Point>

Page 45: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

FML for Enabling Full Interoperability in Fuzzy Systems Design 29

Table 1 Tags Defining the Type-2 Membership Function

Tag name

<Type2TriangularShape> <Type2RightLinearShape> <Type2LeftLinearShape><Type2PIShape> <Type2GaussianShape> <Type2RightGaussianShape><Type2LeftGaussianShape> <Type2TrapezoidShape> <Type2SShape><Type2ZShapeE> <Type2RectangularShape>

tags that list the extreme points of geometric area defining the custom fuzzy shape.Obviously, the attributes used in <Point> tag are x and y coordinates.

With regard to rule base, the <RuleBase> tag uses five attributes: name, type, ac-tivationMethod, andMethod and orMethod. Obviously, the name attribute uniquelyidentifies the rule base. The type attribute permits to specify the kind of fuzzycontroller (Mamdani or TSK) respect to the rule base at issue. The activation-Method attribute defines the method used to implication process; the andMethodand orMethod attribute define, respectively, the and and or algorithm to use by de-fault. In order to define the single rule the <Rule> tag is used. The attributes usedby the <Rule> tag are:

• name attribute permits to identify the rule;• connector is used to define the logical operator used to connect the different

clauses in antecedent part (and/or);• operator defines the algorithm to use for chosen connector;• weight defines the importance of rule during inference engine time.

The definition of antecedent and consequent rule part is obtained by using <Antece-dent> and <Consequent> tags. <Clause> tag is used to model the fuzzy clausesin antecedent and consequent part. This tag use the attribute modifier to describe amodification to term used in the clause. To complete the definition of fuzzy clausethe nested <Variable> and <Term> tag have to be used.

4 Conclusions

This chapter presented the language details related to FML, a new XML-based lan-guage for modeling fuzzy system in abstract and hardware independent way in-troduced by Giovanni Acampora in 2004 in the context of an ambient intelligenceproject. The choice to model fuzzy systems by using XML technologies allows sys-tems designer to solve a strong difficulties related to the implementation of a samefuzzy system on different hardware architectures and avoid to start a novel and ex-pensive software engineering process. In this paper, the syntax grammar related toFML has been defined by using the XML Schema, whereas, XSLT has been chosenhas a main technology for converting FML programs in runnable code. In order toprove the FML scalability and the related power of representation, an introduction

Page 46: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

30 G. Acampora

to FML for type-II fuzzy systems has been introduced. The benefits provided byFML have been appreciated in different application scenario (see Part II) and thedecision of IEEE Standard Association to approve a Project Authorization Requestfor starting the FML standardization process further confirm our idea.

References

1. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive do-motic framework. IEEE Transactions on Industrial Informatics 2, 97–111 (2005)

2. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelli-gence. Information Sciences 178(3), 631–646 (2008)

3. Bernard, J.A.: Use of rule-based system for process control. IEEE Control Systems Mag-azine 8, 3–13 (1988)

4. Fujitec, F.: FLEX-8800 series elevator group control system. Fujitec Co., Ltd., Osaka(1988)

5. Itoh, O., Gotoh, K., Nakayama, T., Takamizawa, S.: Application of fuzzy control to acti-vated sludge process. In: Proc. 2nd IFSA Congress, Tokyo, Japan, pp. 282–285 (1987)

6. Kinoshita, M., Fukuzaki, T., Satoh, T., Miyake, M.: An automatic operation method forcontrol rods in BWR plants. In: Proc. Specialists Meeting on In-Core Instrumentationand Reactor Core Assessment, Cadarache, France (1988)

7. Lee, C.C.: Fuzzy Logic in Control Systems: Fuzzy Logic Controller - Part I. IEEE Trans-actions on Systems, Man and Cybernetics 20, 404–418 (1990)

8. Mamdani, E.H., Assilian, S.: An experiment in linguistic synthesis with a fuzzy logiccontroller. International Journal of Man-Machine Studies 7, 1–13 (1973)

9. Mendel, J.M.: Uncertainty, fuzzy logic, and signal processing. Signal Processing Jour-nal 80, 913–933 (2000)

10. Mendel, J.M.: Uncertain Rule-Based Fuzzy Logic Systems: Introduction and NewDirections. Prentice-Hall, Upper Saddle River (2001)

11. Mendel, J.M., Bob John, R.I.: Type-2 Fuzzy Sets Made Simple. IEEE Transactions onFuzzy Systems 10, 117–127 (2002)

12. Togai, M., Chiu, S.: A fuzzy accelerator and a programming environment for real-timefuzzy control. In: Proc. 2nd IFSA Congress, Tokyo, Japan, pp. 147–151 (1987)

13. Togai, M., Watanabe, H.: Expert system on a chip: An engine for real-time approximatereasoning. IEEE Expert Systems Magazine 1, 55–62 (1986)

14. Watanabe, H., Dettloff, W.: Reconfigurable fuzzy logic processor: A full custom digitalVLSI. In: Int. Workshop on Fuzzy System Applications, Iizuka, Japan, pp. 49–50 (1988)

15. Yamakawa, T.: High speed fuzzy controller hardware system. In: Proc. 2nd Fuzzy SystemSymposium, Japan, pp. 122–130 (1986)

16. Yamakawa, T.: Fuzzy controller hardware system. In: Proc. 2nd IFSA Congress, Tokyo,Japan (1987)

17. Yamakawa, T.: A simple fuzzy computer hardware system employing min and max op-erations - A challenge to 6th generation computer. In: Proc. 2nd IFSA Congress, Tokyo,Japan (1987)

18. Yamakawa, T.: Fuzzy microprocessors-Rule chip and defuzzifier chip. In: Int. Workshopon Fuzzy System Applications, Iizuka, Japan, pp. 51–52 (August 1988)

19. Yagishita, O., Itoh, O., Sugeno, M.: Application of fuzzy reasoning to the water purifica-tion process. In: Sugeno, M. (ed.) Industrial Applications of Fuzzy Control, pp. 19–40.North-Holland, Amsterdam (1985)

Page 47: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

FML for Enabling Full Interoperability in Fuzzy Systems Design 31

20. Yamakawa, T., Miki, T.: The current mode fuzzy logic integrated circuits fabricated bythe standard CMOS process. IEEE Transactions on Computer C-35, 161–167 (1986)

21. Yamakawa, T., Sasaki, K.: Fuzzy memory device. In: Proc. 2nd IFSA Congress, Tokyo,Japan, pp. 551–555 (1987)

22. Yasunobu, S., Miyamoto, S.: Automatic train operation by predictive fuzzy control. In:Sugeno, M. (ed.) Industrial Applications of Fuzzy Control, pp. 1–18. North- Holland,Amsterdam (1985)

23. Yasunobu, S., Miyamoto, S., Ihara, H.: Fuzzy control for automatic train operation sys-tem. In: Proc. 4th IFAC/ IFIP/ IFORS Int. Congress on Control in Transportation Systems(1983)

24. Yasunobu, S., Hasegawa, T.: Evaluation of an automatic container crane operation systembased on predictive fuzzy control. Control Theory and Advanced Technology 2, 419–432(1986)

25. Yasunobu, S., Hasegawa, T.: Predictive fuzzy control and its application for automaticcontainer crane operation system. In: Proc. 2nd IFSA Congress, Tokyo, Japan, pp. 349–352 (1987)

26. Yasunobu, S., Sekino, S., Hasegawa, T.: Automatic train operation and automatic craneoperation systems based on predictive fuzzy control. In: Proc. 2nd IFSA Congress,Tokyo, Japan, pp. 835–838 (1987)

27. Zadeh, L.A.: Fuzzy sets. Information and Control 8, 338–353 (1965)28. Zadeh, L.A.: Fuzzy algorithm. Information and Control 12, 94–102 (1968)29. Zadeh, L.A.: Toward a theory of fuzzy systems. In: Kalman, R.E., De Claris, N. (eds.)

Aspects of Network and System Theory, p. 469. Rinehart & Winston, New York (1971)

Page 48: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Distributing Fuzzy Reasoning throughFuzzy Markup Language:An Application to Ambient Intelligence

Giovanni Acampora, Vincenzo Loia, and Autilia Vitiello

Abstract. Fuzzy Markup Language (FML) is a specific-purpose computer languagewhich is emerging as a standard tool for modeling Fuzzy Logic Controllers (FLCs)in a human-readable and hardware-independent way. By means of these featuresFML allows FLCs designers to define their systems independently from their legacyrepresentations and provides them with a collection of facilities speeding up thewhole development process of a fuzzy system. However, besides the hardware inde-pendence feature, the XML nature of FML makes possible to embed fuzzy reasoningin computing scenarios characterized by high levels of pervasiveness and ubiquity.Through this additional feature, FML technology may efficiently distribute piecesof the global control flow on different devices populating a pervasive environment.In this chapter, FML features are exploited to implement an agent-based frameworkdesigned for providing proactive and distributed services in an Ambient Intelligent(AmI) scenario. In particular, FML is combined with a distributed learning strategyfor capturing habits of users that live a smart environment and generating an appro-priate collection of services satisfying users’ preferences. As will be shown by a casestudy, the exploitation of FML distributed features simultaneously allows to achievethe relevant advantage of reducing the fuzzy computation effort and providing themost suitable collection of distributed services fulfilling a prefixed objective.

1 Introduction

When Lotfi Zadeh introduced fuzzy sets [26] and the corresponding fuzzy logic [11],he thought a mathematical formalism useful for resembling human reasoning in

Giovanni AcamporaSchool of Industrial Engineering, Information Systems, Eindhoven University of Technology,P.O. Box 513, 5600 MB, Eindhoven, The Netherlandse-mail: [email protected]

Vincenzo Loia · Autilia VitielloDepartment of Computer Science, University of Salerno, 84084 Fisciano, Salerno, Italye-mail: loia,[email protected]

G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 33–50.DOI: 10.1007/978-3-642-35488-5_3 c© Springer-Verlag Berlin Heidelberg 2013

Page 49: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

34 G. Acampora, V. Loia, and A. Vitiello

its use of imprecise information to generate decision. Different from conventionalAristotelian logic, which requires an extensive understanding of a system, accurateequations, and precise numeric values, fuzzy logic incorporates an alternative wayof thinking, which allows modeling complex systems by using a higher level of ab-straction arising from human knowledge, skills and expertise. However, in spite ofits original aim, today fuzzy logic is mainly used for designing industrial controllersand intelligent decision making systems because, as stated by Zadeh’s law of in-compatibility, fuzzy frameworks are simpler to design, develop and maintain thancontrol or intelligent systems based on proportional plus integral plus derivative(PID) approaches.

Since its birth, Fuzzy Markup Language (FML) [1] [2] contributed to the de-velopment and evolution of fuzzy-based intelligent decision systems belonging todifferent application fields such as health care, computer games, malware behav-ioral analysis and so on. The success of this specific-purpose computer languageis mainly due to its capability to model and represent fuzzy reasoning in abstractway without necessarily taking into account details such as the knowledge about aspecific general-purpose programming language or a given hardware architecture.The benefits provided by FML are mainly due to the exploitation of XML technolo-gies enabling to code FML programs through a collection of correlated semantictags that model the different components of a conventional fuzzy system. In details,FML uses:

• XML Schema to define the collection of FML semantic tags and the rules forcombining these tags in legal building blocks;

• eXtensible Stylesheet Language Transformations (XSLT) in order to convert afuzzy controller coded in FML into a program coded in a specific programminglanguage and runnable on a give hardware plarform.

However, besides the well-known abstraction features, XML has emerged as a toolset for creating new frameworks for computer networking. For instance, the collec-tion of technologies used for implementing the web services communication schemeis mainly based on a XML coding; SOAP and WSDL are two typical samples ofthese technologies. Even FML can benefit from these additional XML features and,in particular, it can exploit these characteristics for distributing fuzzy reasoning oncomplex computer networks and minimizing the computational effort related to theapplication of fuzzy operators to a plethora of variables composing a pervasive envi-ronment. This FML property is particularly advantageous when fuzzy inference en-gines are used for modeling decisions making systems where the whole knowledgehas spatially distributed. Samples of these frameworks are Ambient Intelligence,automotive and so on.

This chapter is devoted to show the benefit provided by FML when it is usedfor enabling the distribution of fuzzy reasoning by using a multi-agent approach.In particular, FML features are exploited to implement an agent-based frameworkdesigned for providing proactive and distributed services in an Ambient Intelligent(AmI) scenario. FML is combined with a distributed learning strategy for captur-ing habits of users that live a smart environment and generating an appropriate

Page 50: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Distributing Fuzzy Reasoning through Fuzzy Markup Language 35

collection of services satisfying users’ preferences. As will be shown by a casestudy, the exploitation of FML distributed features simultaneously allows to achievethe relevant advantage of reducing the fuzzy computation effort and providing themost suitable collection of distributed services fulfilling a prefixed objective.

2 FML and Its Distributive Features

Since the 1970s, the theory of fuzzy logic has been widely exploited for enablingdesigners of industrial controllers and intelligent decision making frameworks tomodel complex systems by expressing their skills and expertise through simple lin-guistic rules. Nevertheless, the design activity of a fuzzy system has always beenaffected by strong difficulties related to the implementation of a same system ondifferent hardware architectures, each one characterized by a proper set of electri-cal/electronic/programming constraints. These difficulties could become very criti-cal when a fuzzy system needs to be deployed in distributed environments populatedby a collection of interacting and heterogeneous hardware devices. Fuzzy MarkupLanguage (FML) is an XML-based language whose main aim is to bridge the afore-mentioned implementation gaps by introducing an abstract and unified approach fordesigning fuzzy systems in hardware independent way.

FML allows fuzzy systems to be coded through a collection of correlated seman-tic tags capable of modeling the different components of a classical fuzzy controller(see Fig. 1) such as knowledge base, rule base, fuzzy variables and fuzzy rules. Inother words, the FML tags used to build a fuzzy controller represent the set of lex-emes used to create fuzzy expressions. In order to design a well-formed XML-basedlanguage, an FML context-free grammar is defined by means of a XML Schemawhich defines name, type and attributes characterized each XML element. How-ever, since an FML program represents only a static view of a fuzzy logic controller(FLC), the so-called eXtensible Stylesheet Language Translator (XSLT) [8] is pro-vided to change this static view to a computable version. Indeed, XSLTs modulesare able to convert the FML-based fuzzy controller in a general purpose computerlanguage using an XSL [9] file containing the translation description. At this level,the control is executable for the hardware.

Through FML definition of a FLC, the classical representation, shown in Fig.1, is replaced by a tree structure as shown in Fig. 2. In particular, the consideredFML-based system is useful to regulate a lighting system. Indeed, it takes as inputsthe external luminosity level together with the time of day concept and as outputthe corresponding internal luminosity. In Fig. 2, it is worth noting that each nodein fuzzy controller tree represents a tag, and the father-child relation represents anested relation between related tags.

Some examples of tags are: the FML tag <FuzzyController> used to open anyFML program, or, the tags <KnowledgeBase> and <Rulebase> used, respectively,to model the set of fuzzy concepts and the set of fuzzy rules. Each FML tag ischaracterized by different attributes. For example, the tag <Rulebase> has five

Page 51: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

36 G. Acampora, V. Loia, and A. Vitiello

Fuzzy Inference Engine

Knowlegde Base Rule Base

Defuzzifier

Real ValuedInputs

Real ValuedOutputs

Input Fuzzy Sets Output Fuzzy Sets

Fuzzifier

Fig. 1 Generic fuzzy controller

Controller

Knowledge Base

Rule Base

LuminosityTime of

DayDimmer

Fuzzy Term

Fuzzy Term

Fuzzy Term

IF … THEN Dimmer is High

IF … THEN Dimmer is Medium

IF … THEN Dimmer is Low

Antecedent and

Consequent

Antecedent and

Consequent

Antecedent and

Consequent

Fig. 2 Fuzzy controller tree

attributes: name which uniquely identifies the rule base; type which permits to spec-ify the kind of fuzzy controller (Mamdani or TSK); activationMethod which definesthe method used to implication process; the andMethod and orMethod which define,respectively, the and and or algorithm to use by default.

When FML has been designed, it was thought to exploit the characteristics pro-vided by XML to distribute the fuzzy reasoning on a computer network in orderto minimize the computational effort required to implement the fuzzy inference onhuge collections of data. In order to achieve this goal, each FML tag can use an at-tribute named ip which assumes as values network addresses related to a particularinternet-working protocol suite such as, for instance, TCP/IP. This attribute serves tobind each control independent component mapped by the FML tag such as knowl-edge base, rule base, and so on, on a on specific host and, consequently, to spatially

Page 52: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Distributing Fuzzy Reasoning through Fuzzy Markup Language 37

distribute a fuzzy system. This additional feature of FML is useful to achieve differ-ent benefits, such as:

• parallelize the fuzzy inference engine reducing inference time and minimizingknowledge base and rule base occupancy;

• manage distributed knowledge environments, i.e., environments in which theglobal knowledge is shared on many points of interested environment, as hap-pens in home automation and intelligent ambient;

• exploit mobile agents as a natural and efficient technology to share data distribu-tion and dispatch running code on a network. The last concept is widely deepenedin the rest of the chapter.

The default value of the ip attribute of <FuzzyController> tag is localhost. The in-ternet address value of fuzzy controller is distributed toward the bottom in the parsetree related to fuzzy program. From this point of view, the Internet address of otherindependent components (knowledge base and rule base), if not defined, is over-lapped by network address from <FuzzyController> tag. This distributive conceptis also extended to the nodes of the parse tree related to the rule base and knowledgebase: each member of the controller is spread in a scalable and distributed way.

Comparing Figs. 2 and 3, the strong difference between a centralized controllerand a distributed one is clear. In Fig. 2, all components of centralized controller

Controller

Knowledge Base

Rule Base

LuminosityTime of

DayDimmer

Fuzzy Term

Fuzzy Term

Fuzzy Term

IF … THEN Dimmer is High

IF … THEN Dimmer is Medium

IF … THEN Dimmer is Low

Antecedent and

Consequent

Antecedent and

Consequent

Antecedent and

Consequent

192.168.0.4

192.168.0.5

192.168.0.6

192.168.0.7

192.168.0.7

Fig. 3 Distributed fuzzy controller tree

Page 53: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

38 G. Acampora, V. Loia, and A. Vitiello

are connected by straight lines indicating that all components (knowledge base, rulebase and related subcomponents) are maintained on the same host at the same time.Fig. 3 illustrates as, in case of a distributed fuzzy controller, basic components,connected by dotted lines, can be processed concurrently by different computationalnodes. In particular, Fig. 3 shows a distributed fuzzy controller with Luminosity andTimeOfDay concepts hosted on 192.168.0.4, Dimmer hosted on 192.168.0.8 and therule base shared on 192.168.0.5, 192.168.0.6, 192.168.0.7. This allows to distributefuzzy rule base in a uniform way and, thus, to parallelize the evaluation of fuzzyrules by minimizing inference effort.

3 FML-Based Mobile Agents

This section introduces a multi-agent framework aimed at exploiting the aforemen-tioned FML distributive features in order to move fuzzy computation in a pervasiveenvironment in efficient way. Before describing our multi-agent based approach,some details about agents and their migration features will be provided.

3.1 Migration in Multi-agent Systems

In distributed computing, the basic request is an efficient model for concurrent anddistributed computation. A common model is the client-server model, in whichservers provide services for clients. In the remote procedure call or RPC model [5],clients invoke (possibly remote) services by performing what looks like a standardlocal procedure call. Other models include group communication [4], publisher-subscriber, filters [3], and distributed shared memory [7]. However, during recentyears there has emerged a new computing paradigm in which software entities calledagents move around in heterogeneous networks as part of a distributed computation.This paradigm offers several possible advantages due to the mobility of agents. Thefirst is the potential for a reduction in communication traffic. This is achieved by mi-grating the agent to the processor most capable of supplying the resources needed.If the resource is data, and this data has a greater volume than the agent itself, itmay be advantageous to move the process to the data, and not the other way around.Another case is when there is remote dynamic data (input) which needs to be pro-cessed in real time despite high network latency or low bandwidth. In this case, theagent is moved across the low bandwidth/high latency network once, and proceedsto process data locally. This idea has lately been popularized by HotJava in WorldWide Web environments. Because agent migration is inherently asynchronous, theagent paradigm is also well suited for mobile computing. In this environment agentsmay be off-loaded to servers during a short connection time. It then proceeds to dosome work while the client is disconnected. Once connection again is established,the agent is able to return with the result of the computation. Even when connected,agents are advantageous since they offload the computation from resource weak

Page 54: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Distributing Fuzzy Reasoning through Fuzzy Markup Language 39

mobile clients, and have the potential to preserve scarce network bandwidth. In thisscenario, it will be introduced an efficient mobile agent approach for distributingFML programs in pervasive environments and, consequently, minimizing the com-putational efforts for computing fuzzy inference. In particular, an application to Am-bient Intelligence will be presented.

3.2 A Multi-agent Framework for Distributing FML Programs

Our goal is to exploit the agent paradigm using mobile capability, in order to design,in a high-level fashion, the effective distribution of control activity and controllerdevices necessary to address Ambient Intelligence frameworks. The real advantageobtained from the agent distribution is the possibility to distribute the fuzzy rule baserelated a generic controller on different hosts composing an ubiquitous environmentand successively apply a parallel inference fuzzy engine on the network.

From this point of view, our approach will simplify the development of complexsystems characterized by a huge number of variables. Indeed, let us suppose to de-sign a fuzzy systems for modeling a framework with N inputs, where each input iis described by Mi fuzzy sets. A different rule may be written for every intersectionof set descriptions that describes the N inputs. This exhaustive method yields a ruleset composed by RS rules:

RS =N

∏i=1

Mi (1)

For real-size application, it is usual to produce very large and complex rule bases thatrequire a great amount of processor time to be evaluated. Indeed, for fuzzy set the-ory, the inference process is accomplished by manipulating membership functions,often demanding a large computational overhead. This prevents many applicationsfrom being implemented in real time without special and custom hardware. Paral-lel computing approaches could support fuzzy inference process to be computed inmore efficient way than conventional and centralized methods. In particular, multi-agent systems and FML, thanks to their capability to implement mobile and hard-ware independent code, represent a valid integration of technologies for distributingfuzzy computation in ubiquitous environments.

In order to integrate the mobile agents and FML technology in distributed frame-works, four typologies of agents are necessary: Creator Agents, Stationary FuzzyAgents, Inference Agents, and Registry Agents. A Creator agent is responsible toconvert a FML program describing a fuzzy system to a Java code by using the XSLTtransformation and to distribute the different components of the obtained fuzzy ob-ject on a computer network in order to yield good performances from the compu-tational point of view. The Creator agent performs the fuzzy resources distributionby a strong interaction with Stationary Fuzzy agents. Indeed, the main aim of Sta-tionary Fuzzy agents is hosting the collection of Java fuzzy objects like fuzzy vari-ables and fuzzy rules generated by Creator Agents (the location of fuzzy objects isobtained by ip attribute of FML tags) and enabling a distributed fuzzy inference.

Page 55: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

40 G. Acampora, V. Loia, and A. Vitiello

Inference Agents are mobile agents crossing the collection of Stationary Fuzzyagents for applying an incremental and partial fuzzy inference by aggregating thethe set of fuzzy values computed by stationary agents. In particular, each stationaryagent i = 1, . . . ,nSA performs the following computation :

Ci =ri⋃

j=1

in f erence(rule ji)

where rule ji is the jth rule hosted on ith Stationary Agent; ri is the number of fuzzyrule hosted on ith stationary agent; inference() is a function implementing a collec-tion of fuzzy operators (Mamdani or TSK) useful for firing the jth rule; Ci is a fuzzyoperator (Mamdani or TSK) gathering the fuzzy results computed by each rule. Ci

represents the partial inferred value compute by the stationary agent i. When an In-ference Agent sequentially migrates on Stationary Agents it gather the fuzzy valuecomputed in each node in order to accomplish the global inference. In detail, whenthe inference agent migrate on the kth stationary agent, it computes the fuzzy valueFk as follows:

Fk =Ck ∪Fk−1

where Ck is the fuzzy value computed by the kth stationary agent and ∪ is a fuzzyoperator (Mamdani or TSK) useful for aggregating the first k fuzzy values computedby the first k stationary agents. The valueCNA will represent the global fuzzy inferredvalue and, as a consequence, the output of the system.

The Registry agent acts as a kind of yellow pages enabling the inference agent tofind the addresses of Stationary Fuzzy agents. The addresses directory managed bythe Registry Agent is populated by the Creator Agent during the FML translationprocess.

Hereafter, it will be provided some details about the implementation of aforemen-tioned agents by using a well-known Java based agent library: Jade. Successively, itwill be shown how FML and agents can simultaneously be used for designing andimplementing an ambient intelligence framework capable of providing people witha collection of adaptive and pro-active services.

3.2.1 Agents Implementation

In order to use the mobile agent technology in our distributed fuzzy control frame-work, it is necessary to work with a programming platform able to manipulate themultiagent system concept. TiLab Jade [6] is a Java-based platform used in our real-ization. Each computer on the network needs to run a Jade Container, the agent run-time environment. In order to define the software agents Jade provides the Agentclass that represents the super class of any distributed fuzzy control frameworkagent. The job executed by each agent is defined using the Behavior class. Thecreation of a JADE agent is as simple as define a class extending the jade.core.Agent

Page 56: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Distributing Fuzzy Reasoning through Fuzzy Markup Language 41

class and implementing the setup() method. The setup() method is intended toinclude agent initializations. Each agent is identified by an agent identifier rep-resented as an instance of the jade.core.AID class. A behavior represents a taskthat an agent can carry out and is implemented as an object of a class that extendsjade.core.behaviors.Behavior. In order to make an agent to execute the task (im-plemented by a behavior object) it is enough to add the behavior to the agent bymeans of the addBehavior() method of the Agent class. Behaviors can be addedat any time: when an agent starts (in the setup() method) or from within other be-haviors. Each class extending Behavior must implement the action() method, thatactually defines the operations to be performed when the behavior is in executionand the done() method (returns a boolean value), that specifies whether or not a be-havior is completed and has to be removed from the pool of active behaviors. Agentcommunication is implemented by asynchronous message exchange. In order to re-alize the multi-agent fuzzy system, it is necessary to define the behavior associatedto agents defined in previous section. Table 1 shows the identifiers used to name theagents in our implementation.

Table 1 JADE Agent Name

Agent NameCreator Agent creatorAgentStationary Agent stationaryAgentIP where IP is the host addressRegistry Agent registryAgentInference Agent inferenceAgent

The Creator Agent uses a single behavior, creatorBehavior, necessary to instan-tiate the fuzzy concepts, rules and variables, defined in the FML source code.

Fig. 4 shows a method used by creatorBehavior to define a fuzzy variable definedin FML code. This method is called by the method action() of creatorBehavior. Thebehavior associated to a stationaryAgent receives this message, builds a new fuzzyconcept (variable or rule) and registers it on registryAgent using tha FIPA ACL mes-sages. The registryAgent behavior accepts incoming messages from stationaryAgentand, using a hash table, registers the fuzzy information together with host data.

Then the inferenceAgent, shown in Fig. 5, using FIPA ACL messages, requiresinformation about stationary agents that manipulate the distributed fuzzy rule basein order to apply the parallel migration process in automatic way.

The inference process is applied overlapping the afterMove() method of JadeAgent class. This method, using a double input vector, applies the classic operatorof fuzzy inference on any stationaryAgent collecting the deduced values using thedefuzzification operator in incremental way (an application for each migration).

In the next section, it will be shown how the proposed Jade agents will interactin order to create an adaptive and proactive AmI scenario.

Page 57: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

42 G. Acampora, V. Loia, and A. Vitiello

Fig. 4 From FML to JADE (CreatorAgent)

Fig. 5 Inference agent code

4 Applying Multi-agent FML to Ambient Intelligence

Built on the ubiquitous computing idea, Ambient Intelligence paradigm is candidateto become the next wave of computing (see Fig. 6). Indeed, this novel computing ap-proach is aimed to extend ubiquitous vision by incorporating intrinsic intelligence inpervasive systems. This idea enables the study, design and development of embodi-ments for smart environments that not only react to human events through sensing,interpretation and service provision, but also learn and adapt their operation andservices to the users over time. These embodiments employ contextual informationwhen available, and offer unobtrusive and intuitive interfaces to their users. Througha user-oriented employment of communication links, systems based on this novelparadigm can also offer ambient communication and media delivery options amongusers allowing for seamless multi-party interactions and novel social networkingapplications.

In this section, an adaptive ambient intelligence application, based on multi-agentFML, is introduced. In particular, the proposed framework extends the multi-agentFML system by using a collection of additional agents capable of understandingusers’ preferences and generating a collation of FML rules satisfying users’ needsand requirements. These rules will be distributed in the pervasive environment bymeans of the above approach in order to completely exploit the computational powerprovided by ubiquitous devices composing the ambient intelligence space. In detail,

Page 58: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Distributing Fuzzy Reasoning through Fuzzy Markup Language 43

Interfaces Processor Storage

MobileEnergy

Computer Network

Time

Per

vasi

vene

ss

1960Computer is born

1970Computers

Communicate

1980-90Mobile Computer

is born

2000-2010Computer Systemsbecome Ubiquitous

2010 -Intelligence

pervades Environments

(From "Nano-informatique et intelligence ambiante", JB Waldner, Hermes Science Publishing, 2007)

Fig. 6 Ambient Intelligence as next wave of computing

the ambient intelligence framework can be considered as a collection of sensors (e.g.light switches) and actuators (e.g. lamps) that interact for enabling an automaticgeneration of FML rules. In order to achieve this aim, each device is manipulatedby a given agent living in two different modalities: learning mode and control mode.Here follows a brief description of these modes.

4.1 Learning Mode

During this phase, the system learns the users’ preferences in a not intrusive way.This activity is performed by the employment of two agent types: acquisition andcontext agent. The acquisition agents represent a smart access point to the corre-sponding domestic device (thermostat, light switch, light lamp, etc.). The contextagent works as a supervisor: it receives information on user’s habits from the acqui-sition agents and adapts the overall fuzzy rule base taking into account the new useractions. The interaction between acquisition agents and context agent is based ontwo different strategies:

Page 59: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

44 G. Acampora, V. Loia, and A. Vitiello

• synchronized messages exchange;• behavioral learning queue operations.

Synchronized messages allow communication agents to coordinate the operationsresolving the eventual conflict problems. Behavioral learning queue is used as sim-ple abstract data type necessary to serialize the asynchronous activities. In moredetail, the agents exploit four kinds of message sending.

1. User’s action message (asynchronous).2. Context updating messages (synchronous).3. Context updating output messages (synchronous).4. Update FML rulebase (synchronous).

When an user executes an operation on a home device, the corresponding acquisitionagent sends an asynchronous user’s action message, reporting the new status of thedevice to the related context agent. The context agent adds this message into its be-havioral learning queue. When this request is extracted from the queue, the contextagent broadcasts synchronous context updating messages to the other context agentand remains in a waiting status. At the reception of context updating messages, theacquisition agents reply by sending a context updating message containing as theupdating done on the involved device. The context agent uses the asynchronoususer’s action message together with context updating output messages to generatea new fuzzy rule, converts this rule into FML, and finally updates the overall fuzzyrule base. In particular, the context agent uses the fuzzy concepts together with fuzzyoperator as maximum of value fuzzification in order to translate the numerical infor-mation received from acquisition agent into linguistic value necessary to composethe fuzzy rule.

In the descriptive example illustrated in Fig. 7, the user switches on a lamp byusing the light switch. The corresponding acquisition agent sends a message (label1) to the context agent informing it about the new users action. Now, it is necessaryto acquire an extended knowledge about the status of the other devices in order toobtain the context related to the user’s action. This task is performed by the contextagent that contacts the acquisition agents of the other devices (message with label2) and remains in a waiting status. The contacted acquisition agent reads the statusof its device and sends this information to the context agent.

Once all the reply messages (messages with label 3) are obtained, the contextagent is able to compose the new context arising from the last users action. Thefuzzification of the user’s action and the environment status permits to obtain a sin-gle fuzzy rule coding this state. An example of fuzzy rule generation is given inFig. 8. In this example, the user sets the indoor temperature value at 20◦C , the ther-mostat acquisition agents sends a messages reporting the new temperature value toits context agent. The other acquisition agents send the actual status of the relateddevices (temperature and luminosity sensors) to the context agent. At this point,the context agent synthesizes the numerical information received from acquisition

Page 60: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Distributing Fuzzy Reasoning through Fuzzy Markup Language 45

agent in fuzzy concepts and generates the fuzzy rule. In particular, the informationreceived from thermostat agent is used to generate the consequent fuzzy rule andthe information received from other sensor agents is used to generate the antecedentfuzzy rule.

Env

ironm

enta

l Con

text

User ContextFML

Rule Base

Adaptive Context

Indoor LuminosityAcquisition Agent

Light SwitchAcquisition Agent

1

2

2 2 2 2

3 3 3 3

Context Agent

4

Message Types

1. User's Action Message2. Context Update Message3. Context Update Message Return Value4. Update FML Rule Base

Indoor TemperatureAcquisition Agent

Outdoor LuminosityAcquisition Agent

Presence Sensor Acquisition Agent

Outdoor TemperatureAcquisition Agent

Fig. 7 Adaptive framework message sending

The last operation done by the context agent is to convert the rule in FML code(see Transparent Fuzzy Control section) and add it in the FML rule base (messagewith label 4).

Page 61: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

46 G. Acampora, V. Loia, and A. Vitiello

Smart Environment

Fuzzification

Low

Medium

High

0.85

0.24

0.46

0.30

Low

Medium

High

0.80

0 8 12 15 18 22Temperature (°C)

0 25 40 50 60 75Luminosity (Lux)

µLow(9◦) = 0.85

µMedium(9◦) = 0.24µHigh(9

◦) = 0.0

µLow(20◦) = 0.0

µMedium(20◦) = 0.30µHigh(20

◦) = 0.48

Temperature si High

InternalTemp is Low InternalLum is Medium

µLow(43Lux) = 0.0µMedium(43Lux) = 0.8µHigh(43Lux) = 0.0

Smart EnvironmentSmart Environment

IF (InternalTemp is Low) AND (internalLum is Medium) THEN (Temperature is High)

Fig. 8 Rule generation example

Fig. 9 gives a view of the overall architecture considering the new layer “Learn-ing mode” that embodies the adaptive functionality.

4.2 Control Model

The Control node corresponds to all the functionalities provided by FML model(interoperability and transparency) and by the distributed FML (parallel executionand mobile processing), as discussed in the previous sections.

Page 62: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Distributing Fuzzy Reasoning through Fuzzy Markup Language 47

Control

Smart Environment

Learning

Acquisition Agent

Context Agent

Stationary Fuzzy Agent

FML Rule Base

StationaryFuzzy Agent

Stationary Fuzzy Agent

Creator Agent

Regitry Agent

Inference Agent

DefuzzificationSystem

FuzzificationSystem

Acquisition AgentAcquisition Agent

Agent Migration Agent Migration

Crisp InputCrisp Output

Fuzzy InputFuzzy Output

Fig. 9 Adaptive framework based on FML

5 Simulation and Experimental Results

In order to evaluate the improvements deriving from distributed agents technology,a simulation testbed has been realized. This simulation is based on a parametricfunction, called totalTime, having as its domain the set of fuzzy rules usable indomotic context and as its output range a crisp set representing the inference time.The function parameter, called k, represents the number of hosts used in simulation.In particular, the mathematical form of parametric simulation function is

Page 63: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

48 G. Acampora, V. Loia, and A. Vitiello

totalTime(x,k) =localTime(x)

k+ overhead(k) (2)

where x represents the fuzzy rule base cardinality, k is the number of the simulationhosts, localTime is a function representing the mean time of inference applicationoperator on host i with i = 1,2, . . . ,k, and overhead(k) is a function representing theoverhead due to communication between k systems. Our experiment uses a set ofthree stationary agents (k = 3).

Fig. 10 shows the time improvement obtained comparing the distributed agent-based approach versus the centralized one [Fig. 10(a)-(b)]. By analyzing Fig. 11, itis evident that with a number of rules less than 20, the overhead due to the distri-bution makes the distributed system ineffective to the centralized one [see detailsin Fig. 11(a)-(b)]. This threshold does not represent a limitation, since real-size do-motic environments are rich of devices. In particular, the experiment shows that witha number of rules graeater than 20 the overhead value becomes a costant value (in-dipendently from k), so that the asymptotic totalTime value depends mainly fromtotalTime(x)

k .

Fig. 10 (a) Centralized controller inference time. (b) Distributed agent controller inferencetime.

Ambient Intelligence environments incorporate many sensors and actuators intothe reactive control scheme, so that, the number of the fuzzy rules is so high thatoverhead(k) value becomes an infinitesimal costant value with respect to totalTime(x)

kso, it is possible to rewrite the totalTime formula for this kind of application asfollows:

totalTime(x,k) =localTime(x)

k+ c (3)

where c → 0.Analyzing this formula for meaningful values of k as k → 0 and k → +∞, we

obtain

Page 64: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Distributing Fuzzy Reasoning through Fuzzy Markup Language 49

Fig. 11 (a) Inference time comparison for 400 rules. (b) Results for 35 rules.

limk→0localTime(x)

k + c =+∞limk→+∞

localTime(x)k + c = 0

(4)

which proves the performance improvement.

6 Conclusions

Fuzzy Markup Language (FML) is a specific-purpose computer language originallydesigned for designing fuzzy controllers and intelligent decision making systems,in a human-readable and hardware independent way. However, the XML nature ofFML gains an important side effect: it enables FML programs to be distributed inpervasive and ubiquitous environments in order to improve the computational per-formances of a fuzzy inference engine when it is applied to a huge number of inputvariables. This scenario is particularly frequent in Ambient Intelligence systems,where a collection of simple devices interacts in order to satisfy humans’ needs. Inthis chapter, FML distribution features are exploited to implement an agent-basedframework designed for providing proactive and distributed services in an AmbientIntelligent (AmI) scenario. In particular, FML has been combined with a distributedlearning strategy for capturing habits of users that live a smart environment andgenerating an appropriate collection of services satisfying users’ preferences.

References

1. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive do-motic framework. IEEE Transactions on Industrial Informatics 2, 97–111 (2005)

2. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelli-gence. Information Sciences 178(3), 631–646 (2008)

Page 65: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

50 G. Acampora, V. Loia, and A. Vitiello

3. Andrews, G.R.: Concurrent Programming Principles and Practice. Benjamin/Cummings,Menlo Park (1991)

4. Birman, K.P.: The process group approach to reliable distributed computing. Commu-nunications of the ACM 36, 36–53 (1993)

5. Birrell, A.D., Nelson, B.J.: Implementing remote procedure calls. ACM Transactions onComputer Systems 2, 39–59 (1984)

6. JadeJava Agent Development Framework. Telecom Italia Lab.,http://jade.tilab.com/

7. Tanenbaum, A.S., Kaashoek, M.F., Bal, H.E.: Using broadcasting to implement dis-tributed shared memory efficiently. In: Casavant, T.L., Singhal, M. (eds.) Piscataway,Readings in Distributed Computing Systems, pp. 387–408. IEEE Press, Piscataway(1994)

8. W3CWorking Draft, XSLT Requirements Version 2.0 (February 2001),http://www.w3.org/TR/2001/WD-xslt20req-20010214

9. W3C Working Draft, Extensible Stylesheet Language (XSL) Version 1.1 (December2003), http://www.w3.org/TR/2003/WD-xsl11-20031217/

10. Zadeh, L.: Fuzzy sets. Information and Control 8, 338–353 (1965)11. Zadeh, L.: Fuzzy logic and its application to approximate reasoning. In: Proc. IFIP

Congr. on Information Processing 1974, vol. 3, pp. 591–594 (1974)

Page 66: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

An Enhanced Visual Environmentfor Designing, Testing and DevelopingFML-Based Fuzzy Systems

Giovanni Acampora, Vincenzo Loia, and Autilia Vitiello

Abstract. Fuzzy Logic Controllers (FLCs) represent one of the most successfulmethodologies exploiting fuzzy logic to model complex systems characterized byambiguity and vagueness. Fuzzy logic applied in the control theory allows to reducethe complexity of the FLC design process thanks to the linguistic representation ofthe systems’ behaviour. However, in spite of their benefit, the implementation ofFLCs is affected by a significant drawback, i.e., the strong dependence on hardwarearchitecture. In order to overcome this limitation, an XML-based language, namedFuzzy Markup Language (FML), has been introduced. FML allows designers tomodel FLCs in a human-readable and hardware-independent way. FML benefitsarise from the exploitation of an alternative representation of a FLC based on labeledtrees, data structure derived from XML-based document representation. However,this new graphical FLC representation can be exploited to implement an enhancedvisual environment which allows designers to easily model a FLC through visualsteps. This chapter is devoted, firstly, to present the new graphical representation of aFLC based on labeled trees, and, secondly, to describe the implemented framework,named Visual FML Tool, capable of exploiting labeled tree benefits by achieving atwofold purpose: the simplification of the FLC design through simple visual stepsand a hardware-independent FLC modeling thanks to the direct mapping of the FLClabeled tree in a FML program.

1 Introduction

Fuzzy logic was introduced by Zadeh as a way to generate decisions usingimprecise information and approximate reasoning [18]. It has been successfully

Giovanni AcamporaSchool of Industrial Engineering, Information Systems, Eindhoven University of Technology,P.O. Box 513, 5600 MB, Eindhoven, The Netherlandse-mail: [email protected]

Vincenzo Loia · Autilia VitielloDepartment of Computer Science, University of Salerno, 84084 Fisciano, Salerno, Italye-mail: {loia,avitiello}@unisa.it

G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 51–70.DOI: 10.1007/978-3-642-35488-5_4 c© Springer-Verlag Berlin Heidelberg 2013

Page 67: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

52 G. Acampora, V. Loia, and A. Vitiello

exploited in a lot of applications such as pattern recognition, intelligent internetquery, knowledge engineering, decision support, and, especially, controltheory [9]. Indeed, Fuzzy Logic Controllers (FLCs) represent one of the most suc-cessful methodologies which exploits fuzzy logic to model complex systems char-acterized by ambiguity and vagueness. In details, FLCs’ designers define systems’behavior by expressing their knowledge and experience through so-called linguis-tic rule bases, rather than by means of mathematical models. This fuzzy mod-eling allows to reduce complexity of system design and, especially, it shows itsrelevant suitability, when the mathematical model is too difficult to formulate or, ifformulated, it is too complicated to evaluate in real time. The success of FLCs iswitnessed by the enormous variety of developed applications which aims at model-ing consumer products, such as washing machines [4] [7], video cameras [6] [12],air-conditioners [14] [11] and so on, as well as industrial processes, such as wa-ter quality control [5], elevator control [8], automatic train operation systems [17],automobile transmission control [16] and so on.

In spite of the indisputable advantages, the real design of FLCs is strongly de-pends upon hardware architecture which implements the running version of de-signed systems. The negative impacts of this drawback further grow when fuzzycontrol approaches are used for modeling the behavior of ubiquitous frameworks indistributed computing environments composed by collections of interacting and het-erogeneous hardware devices. In order to overcome this drawback, an XML-basedlanguage, named Fuzzy Markup Language (FML) [1] [2], has been introduced. Byexploiting XML benefits, FML allows designers to define a detailed structure of aFLC independent from its legacy representation by providing them with a set of fa-cilities speeding up the whole development process of a centralized or distributedfuzzy system.

More in detail, FML benefits derive from the exploitation of an alternative rep-resentation of a FLC based on labeled trees [15], data structures defined by meansof the well-known graph theory and derived by the XML-based document repre-sentation. As shown in the Sect. 2, it is possible to define a FLC through a labeledtree structure composed of two sets, ΣFLC and EFLC, which represent, respectively,the collection of labels modelling the main components of a FLC and the collectionof father-child relationships existing among them. In particular, FML fundamen-tals items, the tags and attributes, reflect the labels belonging to set ΣFLC, whereas,the father-child relationships belonging to set EFLC are described in the grammarsyntax of FML. The representation of a FLC through a labeled tree structure notonly leads to an independent-hardware description of a FLC, but also it allowsits graphical modeling. This further benefit provided by this new FLC representa-tion can be used to implement a framework which allows designers to easily modela FLC.

The aim of this work is to present an enhanced visual environment, named Vi-sual FML tool, capable of exploiting labeled tree benefits by achieving a twofoldpurpose: the simplification of the FLC design through simple visual steps and a

Page 68: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

An Enhanced Visual Environment for FML-Based Fuzzy Systems 53

hardware-independent FLC modeling thanks to the direct mapping of the FLC la-beled tree in a FML program. In particular, the visual environment allows designersto define a FLC without knowing the syntax and semantics of FML. Apart fromsimplifying FLC development design, Visual FML Tool reduces design process timethanks to the exploitation of the concept of variable type. In detail, a type representsthe structure of a variable in terms of its membership functions. The introductionof this concept allows to separate the information about the fuzzy concept such asname, unit scale and so on, from its structure. Therefore, if the fuzzy system ischaracterized by more variables with the same structure, designers can simply usethe type already defined for the first variable with that structure, by obtaining, asa consequence, a decrease of design time. Visual FML Tool’s functionalities coverall different steps of the fuzzy system design process. In particular, the function-alities made available from tool are the fuzzy system design, the fuzzy inferenceexecution, the tuning of fuzzy membership functions and the generation of a high-level language description. These functionalities are described in a better way in theSect. 3. In the future, the idea is to enrich the functionalities of Visual FML Toolby allowing designers to model also type 2 FML-based FLCs in a simple and ahardware-independent way.

2 A Novel Vision of a Fuzzy Controller: FLC Labeled Tree

The main aim of this chapter is to present a new enhanced visual environment,named Visual FML Tool, capable of supporting designers into FML-based FCLsmodeling. The tool simplifies the FCL design by exploiting a graphical represen-tation of a FCL based on labeled trees. For this reason, in this section, a detaileddescription of labeled tree idea and how to build a FLC labeled tree is given.

A labeled tree is a tree where each node is associated with a label. More for-mally: Let ΣV , ΣE be finite alphabets of vertex labels and edge labels, respectively.Let V be a finite nonempty set of vertices, l a total function l : V → ΣV , E a set ofunordered distinct vertices called edges, and a a total function a : E → ΣE . ThenG = (V, l,E,a) is a labeled graph. A labeled tree is a connected, acyclic labeledgraph. Labeled tree labels may be constants, node variables (corresponding to anynode value), or path variables (corresponding to any path). Because the labeled treesare data models derived by the XML-based document representation, constants cor-responds to element, attribute and text values populating XML models. In details,nodes labeled with text values are called text nodes and they are always leaf nodes.Attribute nodes can have only one child node, a text node. Also, any two attributesof a given element cannot have the same label. Element nodes can have zero or morechild nodes that can be elements, attributes, or text nodes. Usually, the labels relatedto element nodes, attribute nodes and text nodes are denoted, respectively, with ni,ai and ti. Then, in the case of XML document modeling:

Page 69: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

54 G. Acampora, V. Loia, and A. Vitiello

ΣV = ∪i{ni}⋃

∪i{ai}⋃

∪i{ti} (1)

ΣE = /0 (2)

In order to represent an FLC through labeled tree structures, it is necessary to in-dividuate the different components of a FLC, to map them on appropriate valuesfor the labels ni, ai and ti and, at the same time, to establish the opportune father-child relationships among different tree nodes. From a static point of view, a FLCis mainly composed by a collection of fuzzy variables and fuzzy rules composing,respectively, the fuzzy knowledge base and fuzzy rule base. So, it is necessary torepresent this two components as labeled tree to obtain a FLC labeled tree.

Starting from knowledge base, each fuzzy variable is defined, mainly, by meansof a name, a universe of discourse and a collection of fuzzy terms where, eachfuzzy term can be represented through a pair (Fuzzy Set, Linguistic Expression). Forexample, let consider the fuzzy variable named temp modelling the fuzzy concepttemperature. The features related to the fuzzy variable temp could be:

• universe of discourse: [0,40];• measure unit: Celsius degree;• fuzzy terms: three terms with triangular shape uniformly distributed named low,

medium and high.

Fig. 1 shows a graphical representation of fuzzy variable temp.

Fig. 1 Fuzzy concept components

Considering this description, a set of tree labels featuring the fuzzy variable tempcan be so defined:

Page 70: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

An Enhanced Visual Environment for FML-Based Fuzzy Systems 55

nTemp1 = FuzzyVariable

nTemp2 = nTemp3 = nTemp4 = FuzzyTerm

nTemp5 = TriangularShape

aTemp1 = aTemp5 = name

aTemp2 = domainLe f t

aTemp3 = domainRight

aTemp4 = scale

aTemp6 = not

aTemp7 = param1

aTemp8 = param2

aTemp9 = param3

tTemp1 = Temp

tTemp2 = tTemp7 = tTemp8 = tTemp9 = 0

tTemp3 = 40

tTemp4 =Celsiusdegree

tTemp5 = Medium

tTemp6 = False

Let ΣVTemp be the set of labels modeling fuzzy concept temperature:

ΣVTemp = {nTemp1 ,nTemp2 , ...,nTemp5 ,aTemp1 ,aTemp2 , ...,

aTemp9 , tTemp1 , tTemp2 , ..., tTemp9}

and ETemp be the set of father-child relationships modeling fuzzy concepttemperature:

ETemp = {(nTemp1 ,nTemp2),(nTemp1 ,nTemp3),

(nTemp1 ,nTemp4),(nTemp2 ,nTemp5),(nTemp1 ,aTemp1), ...,

(nTemp1 ,aTemp4),(nTemp2 ,aTemp5),(nTemp2 ,aTemp6),

(nTemp5 ,aTemp7), ...,(aTemp1 , tTemp1), ...,(aTemp9 , tTemp9)}

The graphical representation of the labeled tree for the fuzzy concept temperature isshown in Fig. 2.

A more concise version of set ΣVTemp and ETemp could be obtained by consideringsubtrees representing the terms of the fuzzy concept. Considering a fuzzy conceptmade up by m terms, it is possible to define the sets ΣVTemp and ETemp as follows:

ΣVTemp = ∪mi=1ΣVtermi

∪ΣVAFC ∪{nV} (3)

Page 71: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

56 G. Acampora, V. Loia, and A. Vitiello

andETemp = ∪m

i=1Etermi ∪EAFC (4)

where ΣVtermiis the set of labels representing the labeled subtree of the ith fuzzy term;

ΣVAFC is the set of labels of direct attributes of fuzzy concept and of their texts; nV

is the root of tree representing the fuzzy concept; Etermi is is the set of father-childrelationships belonging to the labeled subtree of the ith fuzzy term; EAFC is the setof father-child relationships which connect the fuzzy concept with its attributes andtheir text. Considering again the fuzzy concept temperature, the following sets canbe considered:

ΣVterm1= {nTemp2 ,nTemp5 ,aTemp5 , ...,aTemp9 , tTemp5 , ..., tTemp9}

ΣVAFC = {aTemp1 , ...,aTemp4 , tTemp1 , ..., tTemp4}nV = FuzzyVariable

Eterm1 = {(nTemp2 ,nTemp5),(nTemp2 ,aTemp5),(nTemp2 ,aTemp6),

(aTemp5 , tTemp5),(aTemp6 , tTemp6),(nTemp5 ,aTemp7), ...}EAFC = {(nTemp2 ,aTemp1), ...,(nTemp2 ,aTemp4),

(aTemp1 , tTemp1), ...,(aTemp4 , tTemp64)}

Building a labeled tree for each of k fuzzy concepts in a knowledge base KB, it ispossible to model it through a labeled tree whose labels are:

ΣKB = ∪iΣVFCi∪{nKB} (5)

with the following father-child relationships:

EKB = ∪iEFCi

⋃∪i{(nKB,nFCi1

)} (6)

where ΣVFCiand EFCi are, respectively, the label collection and the father-child rela-

tionships modeling ith fuzzy concept and nKB is a dummy root label joining togetherthe different fuzzy concepts subtrees.

At the same way, focusing on the second main component of a FLC, the fuzzyrule base, it is possible to build the labeled tree modeling the fuzzy rule base, asmade for the knowledge base, defining the sets ΣRB and ERB. A rule base is com-posed by a set of fuzzy rules. Therefore, the first step to build a labeled tree model-ing a fuzzy rule base is to build a labeled tree modeling each rule. By considering aMamdani fuzzy controller, a fuzzy rule is formed by a fuzzy antecedent and a con-sequent part and, recursively, the antecedents and consequents can be characterizedby a sequence of fuzzy clauses, where, each fuzzy clause, is represented by meansof a pair (FuzzyVariable, FuzzyTerm) and a modifier. For example, let consider thefirst rule of a fuzzy rule base as follows:

IF temp is high and humidity is high then room is very hot (1.0)

Page 72: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

An Enhanced Visual Environment for FML-Based Fuzzy Systems 57

Fig. 2 Fuzzy variable labeled tree

The rule is characterized by the antecedent part composed by two clauses, temp ishigh and humidity is medium, where, respectively, temp and humidity are the Fuzzy-Variables and high and high are the FuzzyTerms, and by the consequent part roomis very hot, where room is the FuzzyVariable, hot is the FuzzyTerm and very is amodifier. The two clauses composing the antecedent part are connected through theoperator and which typically is implemented by the min operation. The value 1.0enclosed into parentheses represents the weight of the rule.

Starting from rule definition, it is possible to identify the following labels (thesubscript R1 stands for 1th rule):

nR11= Rule

nR12= Antecedent

nR13= nR16

= nR110=Clause

nR14= nR17

= nR111= FuzzyVariable

nR15= nR18

= nR112= FuzzyTerm

nR19=Consequent

aR11= name

Page 73: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

58 G. Acampora, V. Loia, and A. Vitiello

aR12= connector

aR13= operator

aR14= weight

aR15= modi f ier

tR11= reg1

tR12= and

tR13= MIN

tR14= 1.0

tR15= temperature

tR16= high

tR17= humidity

tR18= high

tR19= room

tR110= very

tR111= hot

The set composed by the described labels represents ΣVR1, whereas, the set of father-

child relationships ER1 for the 1th rule is:

ER1 = {(nR11,nR12

),(nR11,nR19

),(nR11,aR11

),

(nR11,aR12

),(nR11,aR13

),(nR11,aR14

),(aR11, tR11

),

(aR12, tR12

),(aR13, tR13

),(aR14, tR14

),(nR12,nR13

),

(nR12,nR16

), ...,(nR14, tR15

), ...,(nR15,nR16

), ...}

Fig. 3 shows the labeled tree for the first rule of rule base considered in our example.For each rule i, it is possible to build the sets ΣRi and ERi by following the same

procedure adopted for the first rule.By summering, it is possible to build the labeled tree modeling the fuzzy rule

base defining the sets ΣRB and ERB in the following way:

ΣRB = ∪iΣVRi∪{nRB}∪ΣVRA (7)

ERB = ∪iERi

⋃∪i{(nRB,nRi1

)}∪ERA (8)

where ΣVRiand ERi are, respectively, the label collection and the father-child re-

lationships modeling ith fuzzy rule, nRB is a dummy root label joining togetherthe different fuzzy rules subtrees, ΣVRA represents the set of labels related to at-tributes of the rule base and their texts and ERA represents the set of father-child

Page 74: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

An Enhanced Visual Environment for FML-Based Fuzzy Systems 59

Fig. 3 Fuzzy rule labeled tree

relationships existing between the node nRB and the attributes of the rule base andbetween attributes and their texts.

At the end, a fuzzy controller can be modeled by means of a labeled tree definedby following sets:

ΣFLC = ΣKB ∪ΣRB ∪{nFLC} (9)

EFLC = EKB ∪ERB ∪{(nFLC,nKB),(nFLC,nRB)} (10)

where nFLC is a dummy node joining the fuzzy rule base and knowledge base.Fig. 4 shows a labeled tree for a whole fuzzy controller. In this figure, it is possi-

ble to view also the set ΣVRA and ERA of the rule base.

3 Visual FML Tool Functionalities

In this section, we present an enhanced visual environment, named Visual FMLTool, exploiting labeled tree-based FCL representation to simplify FML-basedFCLs design. In detail, by exploiting labeled tree benefits, Visual FML Tool (seeFig. 5) achieves a twofold aim: the simplification of the FLC design through simplevisual steps and a hardware-independent FLC modeling thanks to the direct map-ping of the FLC labeled tree in a FML program. Visual FML Tool functionalitiescover all different steps of the fuzzy system design process, from their initial de-scription to the final implementation. Two of its interesting features are that it allows

Page 75: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

60 G. Acampora, V. Loia, and A. Vitiello

Fig. 4 FLC labeled tree

to design both Mamdani and Takagi-Sugeno-Kang systems and to manage morecomplex systems at the same time. The environment is completely programmed inJava, so it can be executed on any platform with JRE (Java Runtime Environment)installed. The main functionalities the tool provides are the following ones:

• Fuzzy system description: the tool allows to define the system creating knowl-edge base and rule base of the corresponding labeled tree. In particular, toolallows to define the linguistic variables composing the knowledge base and to or-ganize rules in different rule bases, where each one describes a particular systembehavior;

• Verification: the tool allows to monitor the system behavior showing outputs cor-responding to different inserted inputs and also it allows to represent graphicallythe system behavior showing the control surface;

• Tuning: the tool allows to apply algorithms based on neural network and notonly to execute a learning stage and specifically to modify membership functionsusing a training data file (under development);

• Synthesis: the tool allows to generate high-level language descriptions. At themoment, it provides only the java implementation (under development).

Visual FML Tool defines the system structure using FML as specification language.In fact, it is possible to import a file with extension .fml to build a fuzzy controller,and, on the other hand, to export a system created by the tool in a FML file.

Hereafter, a more detailed description of this tool is provided.

Page 76: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

An Enhanced Visual Environment for FML-Based Fuzzy Systems 61

Fig. 5 The main graphical interface of VisualFMLTool

3.1 Fuzzy System Description

Visual FML Tool offers a graphical interface to ease the description of fuzzy sys-tems, avoiding the need for an in depth knowledge of the FML language. Indeed,Visual FML Tool allows designers to model a fuzzy system by defining the corre-sponding labeled tree. In detail, the main steps in the description of a FLC labeledtree are creating knowledge base composed by a set of linguistic variables and rulebase expressing the relationships existing among the system variables. The tool al-lows these steps by means of, respectively, the Variable Editor window shown inFig. 6 and the Rulebase Editor window shown in Fig. 10.

A new variable needs the introduction of its name, its scale and its sign (in-put/output). The defuzzification method, the accumulation one and the default valueare necessary only for output variables and, for this reason, the corresponding textfield are disabled for an input variable. Once a variable has been created it can bemodified in all attributes except for its sign. Each variable must have a so-called typerepresenting its structure in terms of membership functions. It is possible to createa type beginning from the Variable Editor window clicking the button with labelNew Type or before creating the variable clicking on item New Type from menu EditSystem.

However, the type to associate to a variable can be also selected by the list ofthe existing types. This feature of Visual FML tool allows designers to speed theirmodeling. In fact, if two variables are characterized by the same structure in termsof membership functions, the design does not need to define them twice, and as aconsequence, the design process time is reduced. The tool manages two kinds of

Page 77: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

62 G. Acampora, V. Loia, and A. Vitiello

Fig. 6 The Variable Editor interface

types: one called simply type that can be associated to an input or output variableof a Mamdani system, or to an input variable of a Takagi-Sugeno-Kang system andthe second one, named tsk-type, that can be associated only to an output variable ofa Takagi-Sugeno-Kang system. However, for sake of simplicity, hereafter, only thecreation of a type is shown.

In detail, the first step to create a new type is to insert through the Type Creationwindow (shown in Fig. 7 ) its identifier, universe of discourse (domain left and do-main right), an initial number of terms and an initial kind of membership functionto choice among the predefined functions: triangular, trapezoidal, rectangular, sin-gleton, gaussian and linear partitions. Besides, Visual FML tool provides a furtherkind of membership function represented by the User shape option, which admits todefining a custom function inserting all points of membership function. Once a typehas been created, it can be edited using the Type Editor window shown in Fig. 8.

Fig. 7 Type Creation window

Page 78: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

An Enhanced Visual Environment for FML-Based Fuzzy Systems 63

Fig. 8 Type Editor window

The Type Editor window allows the modification of the type name and universeof discourse. Besides it admits to adding, editing and removing the membershipfunctions(terms) of the edited type. The window shows a graphical representation ofthe membership functions, where the selected membership function is represented ina different color (red). The bottom of the window presents a command bar with theusual buttons to save or reject the last changes, and to refresh modifications beforesaving them. Besides, the Export chart button allows to save the graphical represen-tation as a file with extension .jpeg. It is worth considering that the modificationson the definition of the universe of discourse can affect the membership functionsalready defined. Hence, a validation of the membership function parameters is donebefore saving the modifications, and if a membership function definition becomesinvalid it is updated in a default way (it is preferable to view only an error message).A membership function can be created or deleted with buttons under terms list andedited with double click on the terms list which enables the Term Editor windowshown in Fig. 9. In details, the window allows to introduce the name of term, thekind of membership function, and the parameter values. The right side of the win-dow shows a graphical representation of membership function. The bottom of thewindow shows a command bar with four options: Set, to close the window savingthe changes, Refresh, to repaint the graphical representation, Export chart, to savethe graphical representation as a jpeg file, and Cancel, to close the window withoutsaving the modifications.

The next step in the definition of a fuzzy system is to describe the rule basesexpressing the relationships among the system variables. Initially, by means of theNew Rulebase window, the name of the rule base, an activation method, a type(Mamdani/Tsk), an operator by default for “and connector” and “or connector” areintroduced. Then, the rule base is edited through the window Rulebase Editor (seeFig. 10). The window is divided into four zones: at the top there are the fields tointroduce the name of the rule base and the activation method; the central zone isdedicated to showing the contents of the rules included in the rule base; under rules

Page 79: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

64 G. Acampora, V. Loia, and A. Vitiello

Fig. 9 Term Editor window

list there are all components necessary to build a new rule and the bottom part ofthe window contains the command bar with the usual buttons to save or reject themodifications.

3.2 Systems Verification

The verification step in the fuzzy system design process consists in studying thebehavior of the fuzzy system under development. The aim of this step is the detec-tion of probable deviations on the expected behavior and the identification of thesources of these deviations. Visual FML Tool covers the verification stage with twofunctionalities. The first one is Run (see Fig. 11) that shows results of fuzzy infer-ence process. The second one is Surface 3D Plot (see Fig. 12) that implements athree-dimensional graphical representation of the system behavior.

In detail, Fig. 11 shows the window Rulebase viewer where each row of plotsdepicts a rule and each column a variable. Each plot has a name that represents theterms of variables that build the rule. A blank plot corresponds to the absence ofthat variable in that rule. The rule names are displayed on the left of each row. Thereal number under rule name represents the weight of rule. By clicking on a rulename, it is possible to view the rule on the bottom, whereas, the tooltip informsabout connector method of rule. The last plot in the column of plots associated withan output variable shows the aggregate weighted decision for the given inferencesystem. This decision will depend on the input values for the system. The initialinput value for an input variable is the minimum value of its universe of discourse.The variables and their current values are displayed on top of the columns. As forinput variables, there is a spinner to insert input value to fuzzy inference process,whereas, as for output ones, there is a not editable field to display the value thatresults from inference process. Next to output variable name the defuzzificationmethod is depicted, whereas, the tooltip informs also about accumulation method.

Page 80: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

An Enhanced Visual Environment for FML-Based Fuzzy Systems 65

Fig. 10 The Rulebase Editor interface

Fig. 12 shows the Surface Viewer window. This window allows to compute agraphical 3-dimensional representation which illustrates the behavior of the fuzzysystem. In details, the shown surface plot represents one of the output variables ofthe system as a function of only two input variables belonging to the system. There-fore, if the system contains more than two input variables, values for the not selectedones have to be specified by the user. The window is divided into two parts: the leftone is dedicated to configuring the graphical representation, while the right part ofthe window is occupied by the surface plot. In order to determine the representationresolution of the plot, it is possible to specify the number of points of the surface.This parameter must be chosen carefully because if it is too low, important detailsof the system behavior could be ignored. On the other hand, a high value couldmake difficult the understanding and the computation of the represented surface.

Page 81: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

66 G. Acampora, V. Loia, and A. Vitiello

Fig. 11 The Inference process Interface

Fig. 12 The 3-D Surface Interface

The default value of this parameter is 10, the minimum one is 5 and maximum oneis 100. In addition, Visual FML Tool allows to save the produced graphical repre-sentation in order to compare it with a new surface obtained by setting a differentconfiguration. However, the comparison is possible only between surfaces createdusing the same input and output variables.

Page 82: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

An Enhanced Visual Environment for FML-Based Fuzzy Systems 67

3.3 Systems Tuning

The usual approach to design a simple fuzzy system is to translate the knowledge ofa human expert expressed linguistically through the IF-THEN rules. However, prob-lems can arise because the way to implement the translation is not unique and/orthe knowledge is not always available or possible to realize. Therefore, many re-searchers are working on applying automatic tuning techniques to fuzzy systems.If the tuning affects only the membership functions composing the antecedent andconsequent parts of the rules, the fuzzy system is usually called a self-tuning system.In a more general case, if the rule base is also tuned, the system is usually calleda self-organizing fuzzy system. The tuning techniques existing in literature can beclassified into the following categories: (a) meta-level heuristic rules, which tunesthe system by taking into account the knowledge of an expert; (b) supervised andnon-supervised algorithms taken from the neural network domain, which require aset of numerical training data; (c) reinforcement learning, which is applied whenthe only feedback about the system performance is a reward/punishment signal; and(d) genetic algorithms, which try to improve the system performance according to aset of objectives included within adequate fitness function. Typically, if input/outputtraining data are available, supervised learning algorithms give the best results fortuning task. Starting from this consideration, Visual FML Tool exploits supervisedlearning algorithms to implement the functionality Tuning. The Fig. 13 shows thewindow Supervised Learning which is used to configure and to execute the learningprocess.

The window is divided into two parts: at the top the area is dedicated to insertdata to configure the learning process, whereas at the bottom the area is used toexecute it. The first stage for setting the configuration is to import a training filewhich contains the input/output data showing the desired behavior. The successivestages are to select the learning algorithm and the error function (which measuresthe deviation of the fuzzy system behavior from the desired input/output data). Vi-sual FML Tool makes available the following algorithms: BackPropagation [13] eConjugate Gradient [10] belonging to gradient descent algorithms. However, thegradient of the error function cannot always be calculated because it can be toocostly or not defined. In these conditions, optimization algorithms without deriva-tives are more suitable. With regard to this category of algorithms, the tool offersPowell’s method [3]. This kind of algorithms are much slower than the previousones. The last category of considered algorithms are the statistical ones. In particu-lar, the tool provides the Blind Search useful when the number of parameters is low.As for error functions, the tool offers the following ones:

• Mean square error (MSE):

MSE =1N· 1

M·∑

i, j(

yi j − yi j

r j)2 with i = 1, . . . ,N; j = 1, . . . ,M.

Page 83: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

68 G. Acampora, V. Loia, and A. Vitiello

Fig. 13 The Supervised Learning Interface

• Mean absolute error (MAE):

MAE = ∑i, j

(|yi j − yi j|

r j) with i = 1, . . . ,N; j = 1, . . . ,M.

where N is the number of data patterns, M is the number of output variables in thesystem, yi j is the jth output generated by system for the ith pattern, yi j is the correctoutput value written on training file, and r j is range of the jth output variable.

An important feature of learning process offered by tool is to simplify the tuningprocess before (preprocessing) or after (postprocessing) it. One of the simplifica-tions consists in identifying and removing those rules that are never fired sufficientlyby any of the training input/output patterns. The last configuration stage is to selectthe termination condition which determines the end of the learning process. The ter-mination criterion can be the number of iterations, the maximum error goal, or themaximum absolute or relative deviation (considering either the training or the testerror).

3.4 Systems Synthesis

The main aim of system synthesis is to generate a system representation that couldbe computed on different hardware and software environments. In detail, this step

Page 84: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

An Enhanced Visual Environment for FML-Based Fuzzy Systems 69

enables to translate an FML representation of a FLC into two different kinds of im-plementation models: software representations and hardware representations. Thesoftware synthesis generates a system representation in a high level programminglanguage. The hardware synthesis generates a microelectronic circuit that imple-ments the inference process described by the fuzzy system. Currently, Visual FMLTool provides only software synthesis and only for Java language. The synthesis isimplemented thanks to Extensible Stylesheet Language Transformations (XSLTs)modules. Indeed, XSLT is able to convert the FML fuzzy controller in a generalpurpose computer language using an XSL file containing the translation descrip-tion. Therefore, Visual FML Tool executes synthesis in Java language thanks to adefined XSL file.

4 Conclusions

This chapter presented a new enhanced visual environment, named Visual FMLTool, capable of supporting designers into modeling of FML-based FLCs in an easyway. Indeed, Visual FML Tool successes to simplify the FLC design process byexploiting a graphical representation of FLCs based on a labeled tree structure. Inthis way, designers achieve the aim of defining FLCs independent from legacy rep-resentation through visual steps without knowing syntax and semantics of FML. Indetail, Visual FML Tool functionalities cover all stages which involves FLCs designprocess from their initial description to the final implementation. However, as futurework, the idea is to extend Visual FML Tool in order to allow also the modeling oftype-2 FML based FLCs.

References

1. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive do-motic framework. IEEE Transactions on Industrial Informatics 2, 97–111 (2005)

2. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelli-gence. Information Sciences 178(3), 631–646 (2008)

3. Brent, R.P.: Algorithms for Minimization Without derivatives. Prentice-Hall (1973)4. Gui-Juan, W., Zuo-Xun, W., Yan-Rong, W., Hong-Dong, X.: The Application of Neuro-

Fuzzy Controller in the Washing Machine Control System. In: Second International Con-ference on Intelligent Computation Technology and Automation, ICICTA 2009, vol. 2,pp. 818–821 (2009)

5. Itoh, O., Gotoh, K., Nakayama, T., Takamizawa, S.: Application of fuzzy control to acti-vated sludge process. In: Proc. 2nd IFSA Congress, Tokyo, Japan, pp. 282–285 (1987)

6. Jamshidi, M.: Large-scale systems: modeling, control and fuzzy logic. In: Jamshidi, M.(ed.) Environmental and Intelligent Manufacturing Systems, vol. 8. Prentice Hall, SaddleRiver (1997)

7. Jian-Hua, D., Yan, G.: The development of fuzzy washing machine controller. EmblemProcessor 4, 36–39 (1994)

Page 85: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

70 G. Acampora, V. Loia, and A. Vitiello

8. Kinoshita, M., Fukuzaki, T., Satoh, T., Miyake, M.: An automatic operation method forcontrol rods in BWR plants. In: Proc. Specialists Meeting on In-Core Instrumentationand Reactor Core Assessment, Cadarache, France (1988)

9. Klir, G.J., Yuan, B.: Fuzzy sets and fuzzy logic: theory and applications. Pearson Publi-cations (1995)

10. Mller, M.F.: A Scaled Conjugate Gradient Algorithm for Fast Supervised Learning.Neural Networks 6, 525–533 (1993)

11. Nasution, H.: Development of Fuzzy Logic Control for Vehicle Air Conditioning Sys-tem. TELKOMNIKA Indonesian Journal of Electrical Engineering 6(2), 73–82 (2008)

12. Ross, T.J.: Fuzzy logic with engineering applications. McGraw-Hill, New York (1995)13. Rumelhart, D.E., Hinton, G.E., Williams, R.J.: Learning representations by back-

propagation. Nature 323, 533–536 (1986)14. Sugawara, S., Suzuki, T.: Application of fuzzy control to air conditioning environment.

J. Therm. Biol. 18(5-6), 465–472 (1993)15. Wang, Y.L., Chen, H.C., Liu, W.K.: A parallel algorithm for constructing a labeled tree.

IEEE T. Parall. Distr. 8(12), 1236–1240 (1997)16. Yamakawa, T.: Fuzzy controller hardware system. In: Proc. 2nd IFSA Congress, Tokyo,

Japan (1987)17. Yasunobu, S., Miyamoto, S., Ihara, H.: Fuzzy control for automatic train operation sys-

tem. In: Proc. 4th IFAC/ IFIP/ IFORS Int. Congress on Control in Transportation Systems(1983)

18. Zadeh, L.: Knowledge representation in fuzzy logic. IEEE T. Knowl. Data En. 1, 89–100(1989)

Page 86: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Part IIFuzzy Markup Language – Applications

Page 87: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply Fuzzy Markup Language to ASAPAssessment System

Chang-Shing Lee, Mei-Hui Wang, Pi-Hsia Hung, Yi-Ling Kuo,Hui-Min Wang, and Bort-Hung Lin

Abstract. This chapter presents an FML-based semantic inference mechanism foran After School Alternative Program (ASAP) in Taiwan. The Capability MaturityModel Integration (CMMI)-based assessment system for Taiwan’s ASAP is con-structed by National University of Tainan (NUTN) from 2007 to 2011. The ba-sic process of the assessment systems is as follows. First, domain experts provideitem descriptions to construct the item fuzzy ontology repository. Second, a T-scorescale item map is constructed for each item bank by applying the calibration pro-cedures for the 3-parameter Item Response Theory (IRT) model. Third, student re-sponses stored in the response data repository are processed, analyzed, and thensummarized to obtain the semantic descriptions of student performance level. Theitem-map representation then summarizes the performance of each student. Next,the results are stored in the diagnosis report repository so that users such as theinvolved students, teachers, officers, or the ASAP administrator can retrieve the re-ports through the provided ASAP web platform. Simulation results indicate thatthe proposed approach is feasible for large-scale implementation of automaticallygenerated diagnostic reports for the CMMI-based ASAP assessment system.

Chang-Shing Lee · Mei-Hui Wang · Yi-Ling KuoDept. of Computer Science and Information Engineering,National University of Tainan, Taiwane-mail: [email protected],

{mh.alice.wang,egmilkcherry}@gmail.comPi-Hsia Hung · Bort-Hung LinGraduate Institute of Measurement and Statistics, National University of Tainan, Taiwane-mail: [email protected], [email protected]

Hui-Min WangComputer Center, National University of Tainan, Taiwane-mail: [email protected]

G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 73–93.DOI: 10.1007/978-3-642-35488-5_5 c© Springer-Verlag Berlin Heidelberg 2013

Page 88: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

74 C.-S. Lee et al.

1 Introduction

A computerized assessment system can help teachers to assess student perfor-mance not only by providing a teaching aid for disadvantaged students in after-school programs, but also by helping teachers and officials track student learn-ing. Importantly, the disadvantaged students can access the same educational re-sources provided to mainstream students. To develop such a computerized as-sessment system in Taiwan, the principles of Capability Maturity Model Integra-tion (CMMI) should be applied to construct an After School Alternative Program(ASAP) system [19]. Recently, CMMI has been extensively adopted in many re-search fields. For instance, Staples and Niazi [15] investigated the reasons givenfor adopting CMM-based SPI. Sun and Liu [17] applied Quality Function De-velopment (QFD) in a business-oriented software improvement process based onCMMI. Yoo et al. [22] developed a unified CMMI implementation model forISO-certified organizations. Stevens [16] applied CMMI to automated test equip-ment development. Wangenheim et al. [20] compared popular open source toolsfor web-based project management in terms of their support for CMMI devel-opment. Integrating CMMI technology with ontology is another important re-search issue. A system that combines ontology and CMMI technology is neededto make decisions about organizational activities. Similarly, many considerableresearches on ontology have been proposed. For example, Lee and Wang [8]proposed an ontology-based computational intelligent multi-agent for CMMI as-sessment. An ontology-based intelligent decision support agent for CMMI projectmonitoring and control was also proposed [9]. However, the inability of clas-sical ontology to accommodate imprecise and vague knowledge in some real-world applications has increased interest in fuzzy ontology [5]. Several researchershave explored the use of fuzzy ontologies. For example, Lee et al. [10] proposeda fuzzy ontology for news summarization. Knappe et al. [7] proposed a fuzzyontology-based query enrichment. Quan et al. [15] proposed automatic fuzzy on-tology generation for semantic web. Computerized assessment systems focus onenabling teachers to use online tests in order to assess student performance effi-ciently. By reviewing student responses and testing results stored in the assess-ment system, teachers can enhance student learning interest by teaching them atthe appropriate performance levels. Some researchers have also applied ontology toe-learning systems and adaptive learning environments. For example, Pike and Ga-hegan [12] developed a proof-of-concept system that used this knowledge model tosupport learners and researchers in the geosciences domain. Sanchez et al. [16] pre-sented an ontology-based framework for seamlessly integrating intelligent agentsand semantic web services. Tseng et al. [18] proposed a Two-Phase Concept MapConstruction (TP-CMC) approach for automatically constructing the concept mapsbased on the historical testing records of learners. Shih et al. [14] proposed anontology-based approach for organizing and retrieving learning content in widely

Page 89: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply Fuzzy Markup Language to ASAP Assessment System 75

distributed repositories. Yeh et al. [21] designed two optimized self-explanationprompts for dynamic multi-representational learning environments. In this chapter,a CMMI-based assessment system for ASAP in Taiwan is introduced. However, themain research topic of this chapter is focused on Fuzzy Markup Language (FML)-based semantic inference mechanism. A simulation of the CMMI-based ASAP as-sessment system in this study indicates that the proposed approach is feasible forlarge-scale diagnoses of student performance, which are provided to teachers insemantic sentences. The rest of the chapter is organized as follows. Sect. 2 de-scribes the item fuzzy ontology and fuzzy markup language. Sect. 3 then introducesthe CMMI-based ASAP assessment system. Next, Sect. 4 introduces the FML-based semantic inference mechanism. Sect. 5 summarizes the simulation results.Conclusions are finally drawn in Sect. 6, along with recommendations for futureresearch.

2 Item Fuzzy Ontology and Fuzzy Markup Language

The following two subsections describe the item fuzzy ontology and fuzzy markuplanguage (FML).

2.1 Item Fuzzy Ontology

Schools must administer numerous tests each year, and each examination always hasits own item repository. Here, an example of a mathematics test is used to describea flowchart for the Taiwan ASAP test. Mathematics experts first select mathemat-ics items from each unit of the student textbooks. For each item, the experts thendefine the concepts that teachers expect students to understand after learning. Eachitem is also given an identification number (ID), difficulty level (b value), T score,item description, and item statement. A T score is a standardized score that can bemathematically transformed into other standardized scores. Here, a T score is trans-formed according to the values of the average and standard deviation of all studentsattending the conventional test administration. Each student receives a T score aftercompleting the test so that teachers can determine if the score is within the averagerange. Teachers can also compare the test performance of the student with that ofother students. The mathematic item repository is then established. Third, domainexperts assemble the provided items from the item repository into a test paper andstore it in the form repository. Finally, based on the student response to the test pa-per, teachers can quickly obtain summaries of student performance for each conceptby using the approach proposed in this chapter.

Page 90: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

76 C.-S. Lee et al.

One item also contains multiple concepts that students are expected to under-stand after completing the course. Expressing the strength of an item relative tovarious concepts is difficult when using conventional ontology. To obtain such anitem set, a fuzzy ontology is used to describe the items for the elementary schoolstudents. Fig. 1 gives an example of item fuzzy ontology for mathematics. The do-main name is Item for Elementary School. Categories in the category layer includeMathematics, English, Chinese, and Science. The event layer contains several eventsthat describe each test, such as 1st Mathematics Test for 6th Grade and 1st Mathe-matics Test for 1st Grade. The concept layer contains concepts that teachers expectstudents to understand after completing the mathematics course. Each concept inthe concept layer has several attributes, such as ID, b value, T score, Test Time, TestDate, Test Place, Examinee, Performance Level, and Item Type. The instance in theinstance layer represents an instance of the concept in the concept layer. That is, aninstance denotes a single item, each of which has its own ID, b value, T score, TestTime, Test Date, Test Place, Examinee, Performance Level, and Item Type. Perfor-mance Level may be Below Basic, Basic, Proficient, or Advanced. Item Type maybe Number and Operation, Measurement, Algebra, Statistics and Probability, orGeometry.

The instances in the instance layer also have the relationships with the conceptsin the concept layer. For example, the Percentage Computation instance is relatedto the Circle and Graph concepts. Therefore, a Percentage Computation item cansimultaneously test whether students understand both the Circle concept and theGraph concept. The membership degrees of the Percentage Computation conceptto the 1st Mathematics Test for 6th Grade, 1st Mathematics Test for 1st Grade, 2ndMathematics Test for 1st Grade, and 1st Mathematics Test for 4th Grade events are1, 0, 0, and 0.9, respectively.

2.2 Fuzzy Markup Language

The proposed fuzzy inference model is combined with FML to describe the knowl-edge base and rule base of the CMMI-based ASAP assessment system. The FMLis a fuzzy-based markup language that can manage fuzzy concepts, fuzzy rules, anda fuzzy inference engine [1] [4] [3] [4]. The FML also has three layers: eXtensibleMarkup Language (XML), a document-type definition, and extensible stylesheetlanguage transformations. The main components of the fuzzy controller are thefuzzy knowledge base, fuzzy rule base, inference engine, fuzzification subsystem,and defuzzification subsystem. Listing 1 shows the knowledge base and rule baseof the proposed approach, where (1) POS (Part-of-Speech) denotes the path tree be-tween two nodes located on the tagging tree, (2) TW (Term Word) denotes the valueof the conceptual similarity between two Chinese terms, (3) SD (Semantic Distance)is the semantic distance of the concept, and (4) TRS (Term Relation Strength) is theterm relation strength for any term pair [9] [10] [8].

Page 91: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply Fuzzy Markup Language to ASAP Assessment System 77

Fig. 1 Example of an item fuzzy ontology for mathematics

3 CMMI-Based ASAP Assessment System

This section first briefly introduces CMMI. The structure and function descriptionsof the CMMI-based ASAP assessment system are introduced in the following threesubsections [19].

Page 92: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

78 C.-S. Lee et al.

Listing 1 Knowledge base and rule base of proposed approach

<?xml v e r s i o n =” 1 . 0 ”?><F u z z y C o n t r o l l e r i p =” l o c a l h o s t ”>

<KnowledgeBase i p =” l o c a l h o s t ”><F u z z y V a r i a b l e d o m a i n l e f t =”0” d o m a i n r i g h t =”6” i p =” l o c a l h o s t ” name=”POS”

s c a l e =” l e n g t h ” t y p e =”INPUT” d e f u z z i f i e r =”COG”><FuzzyTerm name=”High ”>

<T rapezo idShape param1=”0” param2=”0” param3=”1” param4=”2” /></FuzzyTerm><FuzzyTerm name=”Medium”>

<T rapezo idShape param1=”1” param2=” 2 . 5 ” param3=” 3 . 5 ” param4=”5” /></FuzzyTerm><FuzzyTerm name=”Low”>

<T rapezo idShape param1=”4” param2=”5” param3=”6” param4=”6” /></FuzzyTerm>

</ FuzzyVar iab le >. . .

</KnowledgeBase><RuleBase name=”RB1” t y p e =”Mamdani” a c t i v a t i o n M e t h o d=”MIN”

andMethod=”MIN” orMethod=”MAX” i p =” l o c a l h o s t ”><Rule name=”R1” c o n n e c t o r =”AND” i p =” l o c a l h o s t ” w e i g h t =”1”>

<Anteceden t><Clause>

<V a r i a b l e>POS</ V a r i a b l e><Term>Low</Term>

</Clause><Clause>

<V a r i a b l e>TW</ V a r i a b l e><Term>Low</Term>

</Clause><Clause>

<V a r i a b l e>SD</ V a r i a b l e><Term>Low</Term>

</Clause></ An teceden t><Consequent>

<Clause><V a r i a b l e>TRS</ V a r i a b l e><Term>VeryLow</Term>

</Clause></Consequent>

</Rule>. . .

</RuleBase></ F u z z y C o n t r o l l e r >

3.1 Introduction to CMMI

The CMMI consists of best practices related to the development and maintenance ofproducts and services related to the product throughout its life cycle from conceptionthrough delivery and maintenance.

By integrating these bodies of knowledge, which are essential for product devel-opment, CMMI provides a comprehensive solution for developing and maintaining

Page 93: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply Fuzzy Markup Language to ASAP Assessment System 79

Table 1 Purpose of process areas

No Process Area Purpose

1 REQM

Manage the requirements of the project’s products and prod-uct requirements components and to identify inconsistencies be-tween those and the project’s plans and work products.

2 PP Establish and maintain plans that define project activities.

3 PMC

Provide an understanding of the projects progress so that appro-priate corrective actions can be taken when the projects perfor-mance deviates significantly from the plan.

4 MADevelop and sustain a measurement capability that is used tosupport management information needs.

5 SAMManage the acquisition of products from suppliers for whichthere exists a formal agreement.

6 PPQAProvide staff and management with objective insight into pro-cesses and associated work products.

products and services. The maturity level 2 process areas of CMMI are Require-ment Management (REQM), Project Planning (PP), Project Monitoring and Con-trol (PMC), Supplier Agreement Management (SAM), Measurement and Analysis(MA), Process and Product Quality Assurance (PPQA), and Configuration Manage-ment (CM) [6]. Table 1 lists the purpose of each process area.

3.2 Introduction to ASAP

The ASAP (http://asap.moe.gov.tw/) is an after-school alternative program for dis-advantaged elementary and junior high school students in Taiwan. The programprovides disadvantaged students with after-school assistance and guidance in sub-jects such as Chinese, Mathematics, English, and Science. Since 2006, the NationalUniversity of Tainan (NUTN) has cooperated with the Ministry of Education inestablishing and developing the ASAP web platform, including the CMMI-basedASAP assessment system in Taiwan.

The three parts of ASAP are group studies, group website, and group assess-ment. The main purpose of group studies is to hold experience-sharing conferencesto share experiences with newly involved persons. The group website is responsi-ble for establishing a website that allows involved schools to upload and downloaddocuments via the provided ASAP web platform, which provides valuable studentlearning performance data. The function of group assessment is to provide a com-puterized system that teachers can use to assess student learning progress and toprovide feedback for the group studies. The ASAP web platform and assessment

Page 94: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

80 C.-S. Lee et al.

Table 2 Methods that are consistent with CMMI

No Process Area Purpose

1 REQM Visit the domain experts to write down the requirement docu-ments.

2 PP Write the project execution plan.

3 PMCTake the appropriate corrective action when the schedule signif-icantly deviates from the plan.

4 MA Use the collected data to make measurement and analysis.

5 PPQAObjective team members evaluate if the developed web platformmeets the requirements.

6CM

Manage all generated document and the developed web platformversion.

system are developed according to CMMI requirements. Table 2 shows that theASAP methods are consistent with CMMI.

3.3 Structure of CMMI-Based ASAP Assessment System

Fig. 2 shows the structure of the CMMI-based ASAP assessment system. The sys-tem is implemented in the following steps:

1. Several domain experts provide item descriptions to construct the item repositoryand item fuzzy ontology repository.

2. Domain experts select and confirm the items from the item repository via theitem editor subsystem.

3. Domain experts assemble the selected and confirmed items into a test paper viathe automated test assembly subsystem. The assembled test paper is stored intothe form repository.

4. Students respond to the assembled test paper via the test subsystem. The studentresponses are stored into the response data repository.

5. Based on the item repository, response data repository, item fuzzy ontology repos-itory, and Chinese dictionary, the FML-based semantic inference mechanism per-forms natural language processing, fuzzy reasoning, and semantic summaries toconstruct semantic sentences that teachers can review to assess student perfor-mance for specific course concepts. The output results are stored in the diagnosisreport repository.

6. All users, including the involved students, teachers, officers, or ASAP admin-istrator, depend on different authorities to review the diagnostic reports via theprovided diagnosis report subsystem, learning progress report subsystem, andASAP web platform.

Page 95: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply Fuzzy Markup Language to ASAP Assessment System 81

Fig. 2 Structure of the CMMI-based ASAP assessment system

3.4 Subsystem Function Descriptions

This subsection introduces the functions of each subsystem in Fig. 2. Briefly, thefunction of each subsystem is as follows.

• Item editor subsystem: To provide item experts, item professors, or teachers toedit and review the items.

• Automated test assembly subsystem: To provide item experts, item professors, orteachers to assemble, validate, edit, and confirm the test paper.

• Conventional test administration subsystem: To help teachers to manage the ex-aminee list and schedule the test date. This subsystem also provides fixed-lengthitems for the online test. Fig. 3 shows the calibration procedures for the 3-parameter Item Response Theory (IRT) model. After domain experts finish edit-ing items and assembling the test paper, a pilot test is performed. Based on thepilot test results, the domain experts modify the items and re-assemble the testpaper. A norm test is then performed, and item parameters are sent back to theautomated test assembly subsystem for calibration. Meanwhile, the test resultsare sent to the diagnostic report subsystem for further assessment and diagnosis.

• Adaptive test subsystem: The advantage of the adaptive test is its automatic selec-tion of test items based on previous responses to online test items. Therefore, the

Page 96: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

82 C.-S. Lee et al.

adaptive test enables precise evaluation of examinees with minimal test items.Fig. 4 shows the functions provided by the adaptive test subsystem, includingthe examinee list management, test date schedule, online adaptive test, maximuminformation selection mechanism, and diagnosis report arrangement. The func-tions are (1) to enable teachers to manage the examinee list and to schedule thetest date, (2) to provide students with the online adaptive test, (3) to select itemsfrom the item bank repository according to student online testing responses, andto (4) enable ASAP administrators to obtain student diagnostic reports from theresponse data repository.

• FML-based semantic inference mechanism: To describe student performance inspecific tested concepts by integrating the summarized sentences with the T-scorescale item map.

• Diagnosis report subsystem: To generate diagnostic reports for students, teach-ers, municipal education department officials and Taiwan Ministry of Educationofficials.

• Learning progress report subsystem: To provide learning progress reports to stu-dents, teachers, and officials from the education department of the relevant citygovernment and from the Taiwan Ministry of Education.

Fig. 3 Calibration procedures of the 3-parameter IRT model

Page 97: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply Fuzzy Markup Language to ASAP Assessment System 83

Fig. 4 Functions of the adaptive test

4 FML-Based Semantic Inference Mechanism

This section introduces the structure of the FML-based semantic inference mech-anism, and its mechanisms for natural language processing, fuzzy reasoning, andsemantic summary.

4.1 Structure of FML-Based Semantic Inference Mechanism

Fig. 5 shows the structure of the FML-based semantic inference mechanism, whichincludes a T-score transformation mechanism, an item-map establishing mechanism,an item-map customizing mechanism, a natural language mechanism, a fuzzy rea-soning mechanism, and a semantic summary mechanism. First, the Chinese dictio-nary, item repository, and item fuzzy ontology repository are generated by domainexperts.

The fuzzy ontology repository contains test-related knowledge for Mathemat-ics, Chinese, English, and Science. The student responses to the test paper are thenretrieved from the response data repository. Based on the Chinese dictionary andthe pre-defined item fuzzy ontology, the FML-based semantic inference mecha-nism starts the natural language processing, reasons term relation strength via thefuzzy reasoning mechanism, and, finally, summarizes the student responses via the

Page 98: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

84 C.-S. Lee et al.

Fig. 5 Structure of the FML-based semantic inference mechanism

semantic summary mechanism to assess student performance in each concept of thecourse. Notably, each item retrieved from the item repository has a b value to denoteits difficulty level. The T-score transformation mechanism transforms b values into Tscores. The item-mapping mechanism then uses the transformed T score to constructa T-score scale item map. That is, the b value and T score for each item is calculatedby mathematical transformation. The domain experts use the T scores for all itemsto construct an item map. After testing, each student also receives an individualT score. Students are expected to correctly answer items that have T scores lowerthan their personal T scores. The item-map customizing mechanism customizes theestablished T-score scale item map with the semantic sentences generated to de-scribe the performance of each student and then stores the customized results in thediagnosis report repository. Finally, users such as the involved students, teachers,officers, and ASAP administrators can access the ASAP web platform to review theperformance assessment.

4.2 Natural Language Processing Mechanism

The natural language processing mechanism uses the Chinese dictionary developedby the Chinese Knowledge Information Processing (CKIP) group to implement nat-ural language processing. The first task is tagging the terms of student responses to

Page 99: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply Fuzzy Markup Language to ASAP Assessment System 85

the test paper. Meaningless terms are filtered out to preserve the terms with a nounor verb. Finally, the processed results are sent to the fuzzy reasoning mechanism toinfer the term relation strength between the pre-constructed item fuzzy ontology andthe student responses [9] [10] [8].

4.3 Fuzzy Reasoning Mechanism

The fuzzy variables defined for the fuzzy reasoning mechanism include the threeinput fuzzy variables Part of Speech (POS) similarity, Term Word (TW) similarity,and Semantic Distance (SD) similarity and the output fuzzy variable Term RelationStrength (TRS). The linguistic terms for fuzzy variable POS, TW, and SD are Low,Medium, and High. However, five linguistic terms are defined for fuzzy variableTRS, including VeryHigh, High, Medium, Low, and VeryLow [9] [10] [8]. The POS,TW, SD, and TRS are briefly described below.

• POS: The path length between two nodes located on the tagging tree (Fig. 6).Each node represents one part of speech. For example, nodes N and V may be anoun and a verb, respectively. Each term has its own part of speech. The shorterthe distance between two nodes, the more similar the two terms. For example,the terms “Common Divisor” and “Recognize” are “Na” and “VC”, respectively.According to Fig. 6, therefore, the distance of POS is 4 (Na → N → NV → V→ VC).

• TW: The similarity of two terms according to three criteria. (1) The more identi-cal Chinese words two terms have, the more similar two terms are. (2) The largerthe number of identical and continuous Chinese words in the pair, the greater thesimilarity of the pair. (3) If a term has the same beginning or ending Chineseword, the similarity of the term pair is high. For example, term pair No. 1 is (Tri-angle “ ”, Prism “ ”), and term pair No. 2 is (Common Divisor“ ”, Recognize “ ”). Term pair No. 1 has the same beginning word

Fig. 6 Tagging tree

Page 100: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

86 C.-S. Lee et al.

Fig. 7 Membership functions of the fuzzy variables POS, TW, SD, and TRS

Fig. 8 Structure of the adopted rule-based fuzzy inference mechanism

Page 101: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply Fuzzy Markup Language to ASAP Assessment System 87

Table 3 Adopted fuzzy rules whereVL stands for VeryLow, L for Low, Mfor Medium, H for High and VH forVeryHigh

Rule Fuzzy Variable

No POS TW SD TRS

1 L L L VL

2 L L M L

3 L L H L

4 L M L L

5 L M M L

6 L M H M

7 L H L L

8 L H M M

9 L H H H

10 M L L L

11 M L M L

12 M L H M

13 M M L L

14 M M M M

15 M M H L

16 M H L M

17 M H M H

18 M H H H

19 H L L L

20 H L M M

21 H L H H

22 H M L M

23 H M M H

24 H M H H

25 H H L H

26 H H M H

27 H H H VH

and two identical Chinese words, so the similarity of term pair No. 1 is higherthan that of term pair No. 2.

• SD: The greater the similarity between two terms, the shorter the distance be-tween the terms in the pre-constructed question fuzzy ontology.

Page 102: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

88 C.-S. Lee et al.

• TRS: Term relation strength. TRS is the term relation strength of the term pairinferred from the values for POS, TW, and SD. The higher the term relationstrength, the more similar the term pair.

The FML editor, developed by the Ontology Application & Software Engineer-ing (OASE) Laboratory, National University of Tainan (NUTN), Taiwan, was usedto implement the fuzzy inference mechanism based on the pre-defined FML doc-ument. Fig. 7 shows the membership functions of the fuzzy variables POS, TW,SD, and TRS. Fig. 8 shows the structure of the adopted rule-based fuzzy inferencemechanism. Table 3 lists the adopted fuzzy rules.

4.4 Semantic Summary Mechanism

Based on the inferred term relation strength between the terms of student responsesto the test paper and the concepts of the pre-constructed item fuzzy ontology, themapped concepts can be identified when the TRS value of the term pair exceedsthe pre-set threshold value. Possible sentence paths are then searched by applyingthe Depth-First-Search algorithm. Finally, the key sentences describing student per-formance level are generated. For example, if a student correctly answers the itemsabout the “Common Divisor” or “Prime Factor Recognition”, it denotes that thisstudent can understand the “Prime Factor” concept after taking this course. Fig. 9shows that the mapped concept is Prime Factor for the instances instances CommonDivisor or Prime Factor Recognition.

Fig. 9 Mapped concept is Prime Factor for instances Common Divisor and Prime FactorRecognition

Page 103: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply Fuzzy Markup Language to ASAP Assessment System 89

5 Simulation Results

The proposed CMMI-based assessment system for ASAP in Taiwan was developedby implementing Hypertext Preprocessor (PHP) language and MySQL data-base.The system provided online conventional test administration and adaptive testingwith the involved students. Fig. 10 shows a screenshot of the diagnostic reportsubsystem for the Chinese and Mathematics tests taken by the elementary schoolstudents.

The screenshot of the diagnostic report for Jessica in Fig. 11 indicates that herT score was 56, and her percentile rank (PR) was 74. This data helped teachers toassess her performance in three ways: if Jessica (1) correctly answered the itemswith T scores over 60 indicated that Jessica could answer the items over her ability,and she did well on this test, (2) correctly answered the items with T scores below52 indicated that the difficulty level was appropriate for Jessica, and (3) incorrectlyanswered the items with T scores below 52 indicated that Jessica did not learn thekey concepts presented in the course, and she will need to study harder in the future.That is, if Jessica can answer most items whose T scores are between 52 and 60,then Jessica has successfully challenged the level that she should have.

Although Fig. 11 can mark unusual student responses for teachers, it does notprovide summaries of key points like those provided by domain experts, whichteachers need for quick and efficient assessment of student performance after tak-ing a specific course. Nevertheless, the semantic results obtained for the proposedFML-based semantic inference mechanism not only provides teachers with an indi-cation of student understanding of each course concept in natural language, it also

Fig. 10 Screenshot of the diagnosis report subsystem

Page 104: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

90 C.-S. Lee et al.

Fig. 11 Screenshot of the diagnosis report for Jessica

minimizes teacher workloads and even increases student learning interest. Fig. 12lists the test responses given by Jessica. Fig. 13 lists the semantic descriptions forher performance in Mathematics, which indicate that she understood the conceptsof circle and distance but did not understand the concepts of graph computation,prime factor, algebra, fraction computation, and the mathematics experiment. Fig.14 shows her performance in mathematics. By reviewing these data, teachers canquickly and easily identify which concepts Jessica understands and which conceptsneed further reinforcement.

Page 105: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply Fuzzy Markup Language to ASAP Assessment System 91

Fig. 12 Jessica’s responses to the test paper

Fig. 13 Semantic descriptions for Jessica’s performance level of Mathematics

Fig. 14 Jessica’s performance level for Mathematic

6 Conclusion

The CMMI-based assessment system developed in this work is used to enhancelearning interest and performance in disadvantaged elementary school and juniorhigh school students in Taiwan. Simulation results indicate that the proposed ap-proach is feasible for using the ASAP assessment system to automatically generatediagnostic reports for students in the form of semantic sentences.

Page 106: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

92 C.-S. Lee et al.

Acknowledgements. The authors would like to thank the financially support sponsored bythe Ministry of Education as well as the National Science Council of Taiwan. (Grant No:NSC99-2911-I-024-004, NSC99-2622-E-024-003-CC3, NSC98-2221-E-024-009-MY3, andNSC99-2631-S-011-002). The authors also would like to thank the financial support fromHAMASTAR TECHNOLOGY CO., LTD. of Taiwan, and all of the people to involve thisresearch project.

References

1. Acampora, G., Gaeta, M., Loia, V., Vasilakos, A.V.: Interoperable and adaptive fuzzyservices for ambient intelligence applications. ACM Transactions on Autonomous andAdaptive Systems 5(2), 1–26 (2010)

2. Acampora, G., Loia, V.: Using FML and fuzzy technology in adaptive ambient intelli-gence environments. International Journal of Computational Intelligence Research 1(2),171–182 (2005)

3. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive do-motic framework. IEEE Transactions on Industrial Informatics 2, 97–111 (2005)

4. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelli-gence. Information Sciences 178(3), 631–646 (2008)

5. Calegari, S., Farina, F.: Fuzzy ontologies and scale-free networks analysis. InternationalJournal of Computer Science and Applications 4(2), 125–144 (2007)

6. Chrissis, M.B., Konrad, M., Shrum, S.: CMMI: Guidelines for process integration andproduct improvement. Addison-Wesley, New York (2005)

7. Knappe, R., Bulskov, H., Andreasen, T.: Perspectives on ontology-based querying. Inter-national Journal of Intelligent Systems 22(7), 739–761 (2007)

8. Lee, C.S., Wang, M.H.: Ontology-based computational intelligent multi-agent and itsapplication to CMMI assessment. Applied Intelligence 30(3), 203–219 (2009)

9. Lee, C.S., Wang, M.H., Chen, J.J.: Ontology-based intelligent decision support agent forCMMI project monitoring and control. International Journal of Approximate Reason-ing 48(1), 62–76 (2008)

10. Lee, C.S., Jian, Z.W., Huang, L.K.: A fuzzy ontology and its application to news sum-marization. IEEE Transactions on Systems, Man and Cybernetics Part B 35(5), 859–880(2005)

11. Quan, T.T., Hui, S.C., Fong, A.C.M., Cao, T.H.: Automatic fuzzy ontology generation forsemantic web. IEEE Transaction on Knowledge and Data Engineering 18(6), 842–856(2006)

12. Pike, W., Gahegan, M.: Beyond ontologies: Toward situated representations of scientificknowledge. International Journal of Human-Computer Studies 65(7), 659–673 (2007)

13. Sanchez, F.G., Garca, R.V., Bejar, R.M., Breis, J.T.F.: An ontology, intelligent agent-based framework for the provision of semantic web services. Expert Systems with Ap-plications 36(2), 3167–3187 (2009)

14. Shih, W.C., Yang, C.T., Tseng, S.S.: Ontology-based content organization and retrievalfor SCORM-compliant teaching materials in data grids. Future Generation ComputerSystems 25(6), 687–694 (2009)

15. Stapes, M., Niazi, M.: System review of organizational motivations for adopting CMM-based SPI. Information and Software Technology 50(7-8), 605–620 (2008)

16. Stevens, S.T.: Applying CMMI and strategy to ATE development. IEEE Instrumentation& Measurement Magazine 10(4), 38–43 (2007)

Page 107: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply Fuzzy Markup Language to ASAP Assessment System 93

17. Sun, Y., Liu, X.: Business-oriented software process improvement based on CMMI usingQFD. Information and Software Technology 52(1), 79–91 (2010)

18. Tseng, S.S., Sue, P.C., Su, J.M., Weng, J.F., Tsai, W.N.: A new approach for constructingthe concept map. Computers & Education 49(3), 691–707 (2007)

19. Wang, M.H., Yan, Z.R., Lee, C.S., Hung, P.H., Kuo, Y.L., Wang, H.M., Lin, B.H.: Ap-ply fuzzy ontology to CMMI-based ASAP assessment system. In: 2010 IEEE WorldCongress on Computational Intelligence (WCCI 2010), Barcelona, Spain, July 18-23(2010)

20. Wangenheim, C.G.V., Hauck, J.C.R., Wangeheim, A.V.: Enhancing open source softwarein alignment with CMMI-DEV. IEEE Software 26(2), 59–67 (2009)

21. Yeh, Y.F., Chen, M.C., Hung, P.H., Hwang, G.J.: Optimal self-explanation prompt de-sign in dynamic multi-representational learning environments. Computers and Educa-tion 54(1), 1089–1100 (2010)

22. Yoo, C., Yoon, J., Lee, B., Lee, C., Lee, J., Hyun, S., Wu, C.: A unified model for theimplementation of both ISO 9001:2000 and CMMI by ISO-certified organizations. TheJournal of Systems and Software 79(7), 954–961 (2006)

Page 108: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply Fuzzy Markup Language to KnowledgeRepresentation for Game of Computer Go

Chang-Shing Lee, Mei-Hui Wang, Yu-Jen Chen, and Shi-Jim Yen

Abstract. In order to stimulate the development and research in computer Go, sev-eral Taiwanese Go players were invited to play against some famous computer Goprograms from 2008 to 2011. Those competitions revealed that the ontology modelfor Go game might resolve problems happened in the competitions. Therefore, thischapter presents a model of knowledge representation including game of Go recordontology and Go board ontology based on fuzzy markup language (FML). An FML-based fuzzy system is also introduced to provide the regional alarm level for a Gobeginner or a computer Go program in order to place the stone at the much moreappropriate position. Experimental results indicate that the proposed approach isfeasible for computer Go application. Hopefully, advances in the intelligent agentand the FML-based ontology model can provide a significant amount of knowledgeto make a progress in computer Go program and achieve as much as computer chessor Chinese chess in the future.

1 Introduction

As Go remains a challenge for computer science research [14], Monte Carlo meth-ods are highly promising for such applications, especially for small versions of thegame such as 9 × 9 games [13]. Werf et al. [19] devised a search-based approachfor playing Go on small boards. Bouzy and Cazenave [5] presented an AI-orientedsurvey of computer Go. Martin Muller won despite 29 handicap stones against the

Chang-Shing Lee · Mei-Hui Wang · Yu-Jen Chen · Shi-Jim YenDept. of Computer Science and Information Engineering,National University of Tainan, Taiwane-mail: [email protected], [email protected]

{mh.alice.wang,sincoew}@gmail.com

G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 95–112.DOI: 10.1007/978-3-642-35488-5_6 c© Springer-Verlag Berlin Heidelberg 2013

Page 109: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

96 C.-S. Lee et al.

computer Go program Many Faces of Go [15]. The computer Go program MoGoachieved unprecedented impressive results in 19 × 19 game by winning with a hand-icap of six and seven stones against a 2P and a 9P Go player, respectively, in TaiwanOpen 2009 [14]. The computer Go program Fuego won a 9 × 9 game as Whiteagainst the 9P Go player in August 2009 [20]. The latest world record involved thecomputer Go program MoGoTW winning a 9 × 9 game as Black against the 9P Goplayer in October 2009 (http://mogotw.nutn.edu.tw/), which is extremely more diffi-cult for the computer Go program to win a top professional Go player as Black thanas White. Additionally, from the games results at the competition of IEEE WCCI2010, we know that the computer Go programs won 9 out of the total 22 games.The average performance of the computer Go programs is fast approaching to theprofessional level [15].

Knowledge refers to relevant and actionable information that is based on an in-dividual’s experience [7]. Although all knowledge workers share certain character-istic activities, annotated data is obtained within a framework or ontology [18]. Asa highly effective means of sharing knowledge and representing information andits semantics [16], ontology is a conceptualization of a real world domain in a hu-man understandable, machine-readable format that consists of entities, attributes,relationships, and axioms [17]. Moreover, ontology mediation allows us to com-bine knowledge from the ontologies [18]. For instance, in addition to proposing afuzzy ontology scheme for summarizing news [9], Lee et al. [17] also developed anontology-based intelligent decision support agent for project monitoring and control(PMC) process area of the capability maturity model integration (CMMI). Reformatand Ly [16] devised an ontology-based approach to provide a rich environment forexpressing different information types, including perceptions.

Monte Carlo Tree Search (MCTS)-based computer Go is an important milestonefor computer Go development. Minimax and alpha-beta searches are the conven-tional approaches adopted in computer games. However, in Go, even after prun-ing by patterns or rules, these approaches are clearly outperformed by MCTS [14].Brugmann [6] developed an original evaluation function based on Monte Carlo ex-ploration. However, a recent and considerable improvement is the incremental con-struction of a tree on top of the Monte Carlo evaluation function [16].

The game of Go is one of the remaining board games where the most skilled hu-man players can still easily win against computers in 19 × 19 games. Researchers,however, have devised new performing algorithms and computers are also catchingup rapidly [16]. According to game results of the Taiwan Open 2009 [14], the abilityof computers to continuously improve at this rate would result in humans losing thisadvantage over machines in less than a decade. The game results further demon-strate that the ability of a computer to acquire additional knowledge and strategiesfrom professional Go players based on the constructed ontology would enable thecomputer Go to approach the level of a professional Go player quite rapidly.

This chapter presents an FML-based inference system for computer Go knowl-edge representation and applications. In [16], it focused on the computational

Page 110: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply FML to Knowledge Representation for Game of Computer Go 97

intelligence of MoGo that was revealed based on Taiwan’s computer Go tourna-ments. The competition report on the “Human vs. Computer Go Competition,” heldat the 2009 IEEE International Conference on Fuzzy Systems (FUZZ-IEEE 2009)was introduced in [20]. In [14], an ontology model for computer Go knowledgerepresentation was proposed to apply to the computer Go record management. Fromthe experimental results, it is known that with the proposed computer Go knowledgemanagement scheme, the computer Go is expected to become much more intelligentin the near future. Experimental results also indicate that the proposed approach canincrease the winning rate if a Go beginner or a computer Go program refers to theguidelines to play the game.

The rest of this chapter is organized as follows. Sect. 2 briefly describes theknowledge representation model for game of computer Go, including the gamerecord ontology and game board ontology. Sect. 3 then introduces an FML-baseddecision support agent (FDSA). Next, Sect. 4 summarizes the experimental results.Conclusions are finally drawn in Sect. 5, along with discussions for future research.

2 Knowledge Representation for Game of Computer Go

This section introduces a knowledge representation model for game of computerGo, including a game record ontology and Go board ontology [14] [13].

2.1 Game Record Ontology

The structure of the domain ontology is applied to define the game record ontologymodel for computer Go knowledge management, as shown in Fig. 1 [14] [13].

The domain name of this ontology is “Game Record Ontology”. The categoriesin the category layer include “Amateur” and “Professional”. Several concepts arelocated in the concept layer. For instance, concepts 1D”, 2D”, and “6D” representthe level of dan on the scale for an amateur Go player: 1 dan, 2 dan, and 6 dan,respectively. However, concepts “1P”, “2P”, and “9P” represent the level of danon the scale for a professional Go player: 1 dan, 2 dan, and 9 dan, respectively. Thebuilt game record ontology stores all moves of each game played by the Go play-ers against the computer Go programs. For instance, assume that there are n1 Goplayers with 1D (K1 1D, . . . , and Kn1 1D). Each Go player with 1D may play totaln1 games stored in the game record ontology. Therefore, according to Fig. 1, eachgame of each Go player can be modeled by the built game record ontology. Forinstance, the games that the first Go player with 1D (K1 1D) once played are repre-sented as G1 K1 1D, . . . , and Gq1 K1 1D. For the game G1 K1 1D, the records of gameare represented as moves 1,2, . . . ,r1, that is M1 G1 K1 1D, . . . , and Mr1 G1 K1 1D; itsresult is denoted as RG1 K1 1D [14].

Page 111: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

98 C.-S. Lee et al.

Fig. 1 Game record ontology

2.2 Go Board Ontology

According to Go rules, the player with the most territory wins. However, in ad-dition to the number of black and white stones on the game board, the positionthat stones were placed on the board is also a key point to influence the territory.Therefore, this chapter presents a novel approach to provide the regional alarm

Page 112: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply FML to Knowledge Representation for Game of Computer Go 99

level for a Go beginner or a computer Go program as a reference when he/she is

Fig. 2 Go board ontology

playing the game with his/her opponent. Hopefully, with the assistance of the pro-posed method, a Go beginner or a computer Go program might lose the game bymuch fewer points than not referring to the provided regional alarm level. Basedon the above discussions, the Go board is partitioned into several groups and eachgroup is composed of nine adjacent intersections. Moreover, two adjacent groupsare shared with a common edge with three adjacent intersections to strengthen howtwo groups are related. Such a Go board partition helps the computer to learn the

Page 113: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

100 C.-S. Lee et al.

matched patterns in the game of Go, enabling it to easily stimulate the playing strate-gies of humans.

The size of the Go board has different sizes, such as 9 × 9, 13 × 13, . . . , and19 × 19. For instance, the 9 × 9 game board has 9 horizontal lines and 9 verticallines, labeled as “1, 2, 3, 4, 5, 6, 7, 8, and 9” and “A, B, C, D, E, F, G, H, and J”,respectively. Therefore, the 9 × 9 game board has 81 intersections. For instance, asituation in which a human plays at “A1” implies that a stone is placed at the inter-section of the first horizontal line and the first vertical line. Although the Go playercan place the stone on an empty intersection, the different stone-placed positionsinfluence the game outcome differently. According to the Go board partition [13], aGo board ontology is constructed, as shown in Fig. 2. The domain layer representsthe domain name “Go Board Ontology”. The category layer is designed based onthe general Go board size, including “9 × 9”, “13 × 13”, . . . , and “19 × 19”.

The concept layer contains concepts whose names are represented by the stone-placed position on the Go board. For instance, concept “D6” represents a conceptlocated at the intersection of the vertical line “D” and the horizontal line “6” onthe game board. The nine adjacent concepts are combined to form a group. Eachgroup has a regional alarm level for a Go beginner or a computer Go program as agame-playing reference. However, the regional alarm level of one group is acquiredby referring to the surrounding eight groups. That is, the surrounding eight groupsinfluence the regional alarm level of the center group. The needed information thatimplements the fuzzy inference is stored into the constructed game board ontology,including fuzzy variables Black No (BN), White No (WN), Surrounding Coefficient(SC), and Regional Alarm Level (RAL). After implementing the fuzzy inference, aregional alarm level of one group is obtained.

Fig. 3 Structure of FML-based decision support agent [13]

Page 114: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply FML to Knowledge Representation for Game of Computer Go 101

3 FML-Based Decision Support Agent

This section introduces an FML-based decision support agent (FDSA). The struc-ture of the FDSA is described and then the further details about the fuzzy decisionsupport system are given.

3.1 Structure of FML-Based Decision Support Agent

Fig. 3 shows the structure of the FML-based decision support agent (FDSA), in-cluding a SGF (Smart Game Format) filtering mechanism, a fuzzy decision supportsystem, a Go game record repository, and an FML-based ontology repository.

The fuzzy decision support system consists of three mechanisms, i.e. territorypartition, fuzzy inference, and alarm presentation. The FDSA functions as follows:(1) Domain experts define the Go game record ontology and the Go board ontologybased on FML; in addition, they are stored into the FML-based ontology repository;(2) One Go game (Go player vs. Go player, Go player vs. computer Go program,or computer Go program vs. computer Go program), starts and a game record isgradually generated move by move; (3) Based on the constructed FML-base ontol-ogy and the generated game record, the fuzzy decision support system infers thereal-time regional alarm level of the game for supporting a Go beginner or a com-puter Go program to decide where to place a stone on an appropriate position duringthe game; (4) The inferred regional alarm levels are also stored into the Go gamerecord repository; (5) The SGF filtering mechanism eliminates unnecessary mes-sages from the generated game record; in addition, the filtered SGF files are storedinto the Go game record repository; and (6) The domain experts evaluate the resultsof the proposed approach.

3.2 Fuzzy Decision Support System

Fuzzy Markup Language (FML) is a fuzzy-oriented mark-up language that can man-age fuzzy concepts, fuzzy rules, and fuzzy inference engine directly [1] [4] [3] [4].Additionally, the FML is essentially composed of three layers, including eXtensi-ble Markup Language (XML), document type definition, and extensible stylesheetlanguage transformations. Based on the FML, an FML editor, developed by theLASA Laboratory, University of Salerno, Italy, is used to construct the importantknowledge base and rule base of the FDSA. The knowledge base describes thefuzzy concepts of the FDSA, including fuzzy variables, fuzzy terms, and member-ship functions of fuzzy sets. On the other hand, the rule base describes the fuzzyrule set, including the antecedent and consequence rule part. Listing 1 lists part ofFML view of the FDSA, which is divided into knowledge base and the rule base. Itindicates that there are one output fuzzy variable Region Alarm Level (RAL), 25fuzzy rules, and three input fuzzy variables, including black stone number (BN),white stone number (WN), and surrounding coefficient (SC). Each fuzzy variable has

Page 115: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

102 C.-S. Lee et al.

Listing 1 Part of FML view of the FDSA

<?xml v e r s i o n =” 1 . 0 ” encod ing =”UTF−8” s t a n d a l o n e =”no”?><F u z z y C o n t r o l l e r i p =” 1 2 7 . 0 . 0 . 1 ” name=”GO−Game”>

<KnowledgeBase><F u z z y V a r i a b l e d o m a i n l e f t =” 0 . 0 ” d o m a i n r i g h t =” 9 . 0 ” name=”BN” s c a l e =””

t y p e =” input ”><FuzzyTerm complement =” f a l s e ” name=”Low”>

<T r i a n g u l a r S h a p e param1=” 0 . 0 ” param2=” 0 . 0 ” param3=” 2 . 0 ”/></FuzzyTerm><FuzzyTerm complement =” f a l s e ” name=”Medium”>

<T r i a n g u l a r S h a p e param1=” 1 . 0 ” param2=” 4 . 5 ” param3=” 8 . 1 ”/></FuzzyTerm><FuzzyTerm complement =” f a l s e ” name=”High ”>

<T r i a n g u l a r S h a p e param1=” 5 . 4 ” param2=” 9 . 0 ” param3=” 9 . 0 ”/></FuzzyTerm>

</ FuzzyVar iab le >. . . . .<F u z z y V a r i a b l e name=”RAL” a c c u m u l a t i o n =”MAX” d e f a u l t V a l u e =” 0 . 0 ”

d e f u z z i f i e r =”COG” d o m a i n l e f t =” 0 . 0 ” d o m a i n r i g h t =” 100 . 0 ”s c a l e =”” t y p e =” output ”>

<FuzzyTerm complement =” f a l s e ” name=” VerySafe”><T r i a n g u l a r S h a p e param1=” 0 . 0 ” param2=” 0 . 0 ” param3=” 2 5 . 0 ”/>

</FuzzyTerm><FuzzyTerm complement =” f a l s e ” name=” Safe ”>

<T r i a n g u l a r S h a p e param1=” 0 . 0 ” param2=” 2 5 . 0 ” param3=” 5 0 . 0 ”/></FuzzyTerm><FuzzyTerm complement =” f a l s e ” name=” Balanced”>

<T r i a n g u l a r S h a p e param1=” 2 5 . 0 ” param2=” 5 0 . 0 ” param3=” 7 5 . 0 ”/></FuzzyTerm><FuzzyTerm complement =” f a l s e ” name=”Dangerous”>

<T r i a n g u l a r S h a p e param1=” 5 0 . 0 ” param2=” 7 5 . 0 ” param3=” 100 . 0 ”/></FuzzyTerm><FuzzyTerm complement =” f a l s e ” name=”VeryDangerous ”>

<T r i a n g u l a r S h a p e param1=” 7 5 . 0 ” param2=” 100 . 0 ” param3=” 100 . 0 ”/></FuzzyTerm>

</ FuzzyVar iab le ></KnowledgeBase><RuleBase name=” RuleBase1 ” a c t i v a t i o n M e t h o d=”MIN” andMethod=”MIN”

orMethod=”MAX” t y p e =”mamdani”><Rule c o n n e c t o r =”and” name=”RULE1” o p e r a t o r =”MIN” w e i g h t =” 1 . 0 ”>

<Anteceden t><Clause>

<V a r i a b l e>BN</ V a r i a b l e><Term>Low</Term></Clause><Clause>

<V a r i a b l e>WN</ V a r i a b l e><Term>Low</Term></Clause><Clause>

<V a r i a b l e>SC</ V a r i a b l e><Term>Low</Term></Clause>

</ An teceden t><Consequent>

<Clause><V a r i a b l e>RAL</ V a r i a b l e><Term>VerySafe </Term>

</Clause></Consequent>

</Rule>. . . . . . .

</RuleBase></ F u z z y C o n t r o l l e r >

Page 116: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply FML to Knowledge Representation for Game of Computer Go 103

several fuzzy terms. For example, fuzzy variable BN has three fuzzy terms, namely“Low”, “Medium”, and “High”. The fuzzy variable RAL has five fuzzy terms, namely“VerySafe”, “Safe”, “Balanced”, “Dangerous”, and “VeryDangerous”.

3.3 Territory Partition Mechanism

In order to help a computer recognize important white-and-black patterns, the Goboard is partitioned into several groups to enable a computer to more easily stimu-late the playing strategy of humans. For instance, according to Fig. 4, each dashed-line frame has nine groups, with each group having nine adjacent triangular-markedintersections. Based on the patterns organized by stones placed on the forty-ninetriangular-marked intersections, the circle-marked position of Fig. 4 displays theregional alarm level of group 9 [13].

Fig. 4 9 × 9 Go board partition

3.4 Fuzzy Inference Mechanism

This chapter adopts the fuzzy inference mechanism owing to the Go game, whichis characterized by high uncertainty based on the behavior of a Go player. A hu-man playing the Go game initially observes the entire Go board and then identifiesthe optimal strategy from all available strategies to gain the most points or lose thefewest points within a given time limit. Additionally, exactly how many stones areon the Go board does not need to be known; instead, the entire situation on theGo board only needs to be evaluated roughly. That is, the Go player must maintain abalance between attack and defense. According to Fig. 4, the Go board is partitionedinto several groups, with each group containing 9 adjacent intersections. The fuzzyinference mechanism based on FML comprises three fuzzy input variables and one

Page 117: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

104 C.-S. Lee et al.

fuzzy output variable stored in the knowledge base of FML. Fuzzy variables BlackNo (BN) and White No (WN) represent the counted black stones and white stoneswithin one group, respectively. Both fuzzy variables BN and WN have three linguis-tic terms, i.e. Low, Medium, and High, to denote the distribution of the number ofstones within one group. The third input fuzzy variable is Surrounding Coefficient(SC). For groups 2 to 8 in Fig. 4, SC is set to 4 for the default value. However,for group 9, SC denotes the dangerous level that its surrounding eight groups havecaused. A higher SC of group 9 implies a higher risk for a Go player or a computerGo program. The output fuzzy variable is Regional Alarm Level (RAL), implyingthat the alarm level within the territory surrounded by one group. The regional alarmlevel can be very safe, safe, balanced, dangerous, and very dangerous situations fora Go player or a computer Go program. The fuzzy inference rules are stored in therule base of FML.

Fig. 5 Triangular membership function for fuzzy set A

Notably, it is recommended that a Go beginner should refer to instructions of theregional alarm level to place the stones on the intersections that are represented bythe balanced state. This advice is because the balanced state typically shows wherethe black stones and white stones contact with each other. Additionally, to assistbeginning players of Go, pre-processing information for computer Go programscan reduce the time-consuming Monte Carlo Tree Search to increase the efficiencyof computer Go programs. Fig. 5 displays the triangular membership function fA(x :a,b,c) of fuzzy number A, as used in this chapter, and it is represented as A =[a,b,c]. Tables 1 and 2 list the parameters of triangular membership functions andthe adopted 27 fuzzy rules, respectively. This chapter adopts the MIN operator asthe fuzzy conjunction operator. The MAX operation is performed to integrate thetriggered rules, while the center of the area method is adopted as a defuzzificationmethod.

Page 118: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply FML to Knowledge Representation for Game of Computer Go 105

Table 1 Parameters of triangular membership functions in the knowledge base of FML

Fuzzy Variable Linguistic Term [a,b,c]

Black No (BN)

BN Low [0, 0, 2]

BN Medium [1, 4.5, 8.1]

BN High [5.4, 9, 9]

White No (WN)

WN Low [0, 0, 2]

WN Medium [1, 4.5, 8.1]

WN High [5.4, 9, 9]

Surrounding Coefficient (SC)

SC Low [0, 0, 3.2]

SC Medium [0.8, 4.0, 7.2]

SC High [4.8, 8, 8]

Regional Alarm Level (RAL)

RAL VerySafe [0, 0, 25]

RAL Safe [0, 25, 50]

RAL Blanced [25, 50, 75]

RAL Dangerous [50, 75, 100]

RAL VeryDangerous [75, 100, 100]

3.5 Alarm Presentation Mechanism

Alarm presentation mechanism is responsible for presenting the inferred resultsgraphically to a Go beginner or a computer Go program. With the assistance ofalarm presentation, a Go beginner or a computer Go program can easily and quicklyrealize the overall game board situation, whether the opponent-occupied territoryhas a dangerous level, or whether he/she needs to give up some stones to capturesafer territory. For instance, if the counted black stones are small, the counted whitestones are high, and the surrounding coefficient is high, then the regional alarmlevel is very dangerous. This chapter adopts five regional alarm levels, includingvery safe, safe, balanced, dangerous, and very dangerous. An icon represents eachregional alarm level. The more white area this icon has, the higher risk a Go begin-ner or a computer Go program becomes. On the contrary, the more black area thisicon has, the higher safety a Go beginner or a computer Go program becomes.

Table 3 lists the appearances of these five icons. Fig. 6 presents an exam exampleof the Go game record at move 27. Table 4 lists the outcomes of the fuzzy inferencemechanism when Fig. 6 is used as an example. According to this table, the regionalalarm level of group 9 in Fig. 6 is 0.71, and the semantic meaning of “0.71” is “Bal-anced”. Therefore, position “D6” in Fig. 6 is denoted by a balanced icon “ ”. Fig.7 summarizes the results of the alarm representation mechanism of Fig. 6, indicat-ing that although the bottom left corner is very safe, the right side of the Go boardis dangerous to lose the game for a Go beginner or a computer Go computer.

Page 119: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

106 C.-S. Lee et al.

Table 2 Adopted 27 fuzzy rules in the rule base of FML

Rule Fuzzy Variable

No. BN WN SC RAL

1 Low Low Low VerySafe

2 Low Low Medium Safe

3 Low Low High Balanced

4 Low Medium Low Balanced

5 Low Medium Medium Dangerous

6 Low Medium High VeryDangerous

7 Low High Low Dangerous

8 Low High Medium Dangerous

9 Low High High VeryDangerous

10 Medium Low Low VerySafe

11 Medium Low Medium Safe

12 Medium Low High Balanced

13 Medium Medium Low Balanced

14 Medium Medium Medium Balanced

15 Medium Medium High Dangerous

16 Medium High Low Balanced

17 Medium High Medium Dangerous

18 Medium High High VeryDangerous

19 High Low Low VerySafe

20 High Low Medium Safe

21 High Low High Balanced

22 High Medium Low Safe

23 High Medium Medium Balanced

24 High Medium High Dangerous

25 High High Low Safe

26 High High Medium Balanced

27 High High High VeryDangerous

4 Experimental Results

This chapter has constructed an experimental platform at National University ofTainan (Taiwan), INRIA (France), and National Dong Hwa University (Taiwan) toevaluate the performance of the proposed approach. In the first experiment, a 5D Goplayer (Cheng-Wen Dong, 70-year-old) as White was invited to compete against 9KGo player (Yu-Jen Chen, 23-year-old) as Black in 19 × 19 game with four handicapstones.

Page 120: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply FML to Knowledge Representation for Game of Computer Go 107

Table 3 Icons for the regional alarm level

No Icon Semantic Meaning

1 Very Safe

2 Safe

3 Balanced

4 Dangerous

5 Very Dangerous

Fig. 6 Game record of an example game at move 27

Fig. 8(a) shows the game record, while Fig. 8(b) shows the FDSA-providedalarm representation. Fig. 8 reveals the following: (1) Fig. 8(a) indicates that thearea surrounded by the dashed-line frame is Black’s territory. White cannot be alivewithin this territory. According to Fig. 8(b), FDSA is feasible for stimulating similarhuman-playing thinking because the dashed-line frame is surrounded by the “Safe”icons; (2) Fig. 8(b) indicates that the territory marked by “Balanced” icons is exactlywhat the contacts between Black and White are. Hence, the adjacent intersectionsaround the “Balanced” icon could be an indicator of Black placing the stone on thegame board during the game; (3) A situation in which the territory is marked “Very-Dangerous” icons implies that this situation is very unfavorable for Black. Accord-ing to Fig. 8(a), the top-left corner and bottom-right corners are White territory. Fig.8(b) also reveals that the “VeryDangerous” icons are represented in the top-left cor-ner and bottom-right corner of the game board. Based on the above discussions, wecan infer that the provided regional alarm levels coincide with the human’s approachto evaluate the current situation of the game board.

Page 121: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

108 C.-S. Lee et al.

Table 4 Outcomes of the fuzzy inference mechanism

Group No Black No White No Surrounding Coefficient Region Alarm Level

1 2 0 4 0.25

2 2 3 4 0.5

3 1 4 4 0.75

4 3 1 4 0.25

5 3 0 4 0.25

6 3 4 4 0.5

7 0 3 4 0.75

8 2 2 4 0.5

9 3 4 5 0.711 The default surrounding coefficient for groups 1 to 8 is 4.2 Based on the region alarm level value of groups 1 to 8, the surrounding coefficient value ofthe group 9 is acquired. If the region alarm level value of groups 1 to 8 is larger or equal 0.5,the surrounding coefficient value of the group 9 is plus 1.

Fig. 7 Results of the alarm representation mechanism

The second experiment involves observing whether the FDSA can successfullyguide Go beginners to make them lose the game by significantly fewer pointswhen their opponent’s is stronger than them. Four Go players play with MoGo(MoGo release3) running on a Windows PC with 4 cores. Meanwhile, another be-ginning Go player competes against MoGo (v4.86) running on a super computerwith 16 cores through a KGS server. Komi is 7.5 and the Chinese rule is adopted.Table 4 lists the game results of beginning Go players vs. MoGo, where “GP” refersto “Go Player”. This table reveals the variance in lost points under the conditions ofwith and without the guidelines of the FDSA, where the lost points are reduced if

Page 122: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply FML to Knowledge Representation for Game of Computer Go 109

(a) (b)

Fig. 8 (a) Game record (b) Regional alarm levels

the Go beginning players refer to the regional alarm level provided by the FDSAto play the games. Figs. 9(a)-(b) display the game record and generated regionalalarm level of game 20 at move 32, respectively. Fig. 9(b) indicates that the top-right corner and bottom side are very dangerous for Go player 5, which matcheswith the situation of the game board in Fig. 9(a).

(a) (b)

Fig. 9 (a) Game record and (b) regional alarm level of game 20 at move 32

Page 123: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

110 C.-S. Lee et al.

Table 5 Game results of Go players vs. MoGo

Time Per Side Game No White BlackResult FDSA

No Yes

5min

1 MoGo GP1 W+88.5

2 MoGo GP1 W+10.5

3 MoGo GP1 W+88.5

4 MoGo GP1 W+56.5

5 GP1 MoGo B+72.5

6 GP1 MoGo B+72.5

7 GP1 MoGo B+72.5

8 GP1 MoGo B+52.5

9 MoGo GP2 W+88.5

10 MoGo GP2 W+17.5

11 MoGo GP2 W+39.5

12 MoGo GP2 W+87.5

13 MoGo GP2 W+87.5

14 MoGo GP2 W+6.5

15 MoGo GP3 W+63.5

16 MoGo GP3 W+60.5

17 MoGo GP4 W+44.5

18 MoGo GP4 W+20.5

10min

19 MoGo GP5 W+18.5

20 MoGo GP5 W+12.5

21 GP5 MoGo B+23.5

22 GP5 MoGo B+3.5

The final experimental is to observe the output 3-dimension surface of the FDSA,shown in Fig. 10. The major trends can be observed in the following rules’ descrip-tions:

1. The RAL does increase as the SC increases;2. The RAL does increase as the WN increases;3. If BN is low, WN is low, and SC is low, then RAL is very safe;4. If BN is high, WN is high, and SC is high, then RAL is very dangerous.

From the major trends shown in Fig. 10, it is known that the behavior of the proposedFDSA meets the human-playing thoughts. Hence, the proposed approach is feasibleto apply to the computer Go application which gives a great help to the Go beginnersduring playing game.

Page 124: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Apply FML to Knowledge Representation for Game of Computer Go 111

(a) (b)

Fig. 10 Surface view for FDSA (a) Inputs (X-SC and Y-WN)/output (RAL), (b) Inputs (X-SCand Y-BN)/output (RAL)

5 Conclusions

This chapter presents a novel FML-based inference approach for computer Go ap-plications. Experimental results indicate that the winning rate can be increased if theproper membership functions are identified. Additionally, some regional alarm lev-els provide a valuable reference for either a Go beginner or a computer Go programwhen playing the game. However, the proposed approach still has certain limita-tions so that future research should (1) combine the proposed method with MCTSmethod to reduce expensive searching cost by searching for the optimal move withinthe dangerous region, (2) add machine learning methods such as a genetic algorithmor neural network to increase the winning rate, (3) enhance more closely examininghuman-playing strategies of the constructed ontology for use as reference for givingup stones, (4) add the weights to the territory of the Go board to strengthen the re-lationship among groups, and (5) display the regional alarm levels in the semanticexpressions of humans.

Acknowledgements. The authors would like to thank the National Science Council of Tai-wan for financially supporting this research (NSC99-2911-I-024-004, NCS99-2923-E-024-003-MY3, and NSC98-2221-E-024-009-MY3). Additionally, the authors also would like tothank the Go players for their playing against MoGo as well as Dr. Olivier Teytaud, Mr.Cheng-Wei Chou, Mr. Chun-Hsun Chou, Prof. Shang-Rong Tsai, and Prof. Shun-Chin Hsufor their help with this chapter.

References

1. Acampora, G., Gaeta, M., Loia, V., Vasilakos, A.V.: Interoperable and adaptive fuzzyservices for ambient intelligence applications. ACM Transactions on Autonomous andAdaptive Systems 5(2), 1–26 (2010)

Page 125: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

112 C.-S. Lee et al.

2. Acampora, G., Loia, V.: Using FML and fuzzy technology in adaptive ambient intelli-gence environments. International Journal of Computational Intelligence Research 1(2),171–182 (2005)

3. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive do-motic framework. IEEE Transactions on Industrial Informatics 2, 97–111 (2005)

4. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelli-gence. Information Sciences 178(3), 631–646 (2008)

5. Bouzy, B., Cazenave, T.: Computer Go: an AI-oriented survey. Artificial IntelligenceJournal 132(1), 39–103 (2001)

6. Brugmann, B.: Monte Carlo Go (1993),http://www.ideanest.com/vegos/MonteCarloGo.pdf

7. Ghosh, B., Scott, J.E.: Comparing knowledge management in health-care andtechnical support organizations. IEEE Transactions on Information Technology inBiomedicine 9(2), 162–168 (2005)

8. Lee, C.S., Jian, Z.W., Huang, L.K.: A fuzzy ontology and its application to news sum-marization. IEEE Transactions on Systems, Man, and cybernetics, Part B: Cybernet-ics 35(5), 859–880 (2005)

9. Lee, C.S., Wang, M.H., Chaslot, C., Hoock, J.B., Rimmel, A., Teytaud, O., Tsai, S.R.,Hsu, S.C., Hong, T.P.: The computational intelligence of MoGo revealed in Taiwan’scomputer Go tournaments. IEEE Transactions on Computational Intelligence and AI inGames 1(1), 73–89 (2009)

10. Lee, C.S., Wang, M.H., Chen, J.J.: Ontology-based intelligent decision support agent forCMMI project monitoring and control. International Journal of Approximate Reason-ing 48(1), 62–76 (2008)

11. Lee, C.S., Wang, M.H., Hong, T.P., Chaslot, G., Hoock, J.B., Rimmel, A., Teytaud, O.,Kuo, Y.H.: A novel ontology for computer Go knowledge management. In: Proceedingof the 2009 IEEE International Conference on Fuzzy System (FUZZ-IEEE 2009), JejuIsland, Korea, August 19-24, pp. 1056–1061 (2009)

12. Lee, C.S., Wang, M.H., Teytaud, O.: The game of Go @ IEEE WCCI 2010. IEEE Com-putational Intelligence Magazine 5(4), 6–7 (2010)

13. Lee, C.S., Wang, M.H., Yen, S.J., Chen, Y.J., Chou, C.W., Chaslot, G., Hoock, J.B.,Rimmel, A., Doghmen, H.: An ontology-based fuzzy inference system for computer Goapplications. International Journal of Fuzzy Systems 12(2), 103–115 (2010)

14. Lucas, S.M., Kendall, G.: Evolutionary computation and games. IEEE ComputationalIntelligence Magazine 1(1), 10–18 (2006)

15. Mueller, M.: Computer Go. Artificial Intelligence 134(1-2), 145–179 (2002)16. Reformat, M., Ly, C.: Ontological approach to development of computing with words

based systems. International Journal of Approximate Reasoning 50(1), 72–91 (2009)17. Tho, Q.T., Hui, S.C., Fong, A.C.M., Cao, T.H.: Automatic fuzzy ontology generation for

semantic web. IEEE Transactions on Knowledge and Data Engineering 18(6), 842–856(2006)

18. Warren, P.: Knowledge management and the semantic web: from scenario to technology.IEEE Intelligent Systems 21(1), 53–59 (2006)

19. Werf, E.C.D., Herik, H.J., Uiterwijk, J.W.H.M.: Solving Go on small boards. Interna-tional Computer Games Association (ICGA) Journal 26(2), 92–107 (2003)

20. Yen, S.J., Lee, C.S., Teytaud, O.: Human vs. computer Go competition in FUZZ-IEEE 2009. International Computer Games Association (ICGA) Journal 32(3), 178–180(2009)

Page 126: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Fuzzy Markup Language for MalwareBehavioral Analysis

Hsien-De Huang, Giovanni Acampora, Vincenzo Loia, Chang-Shing Lee,Hani Hagras, Mei-Hui Wang, Hung-Yu Kao, and Jee-Gong Chang

Abstract. In recent years, antimalware applications represented one of the most im-portant research topics in the area of network security threat. In addition, malwarehave become a growing important problem for governments and commercial orga-nizations. The key point of the research on the network security is to judge andvalidate the similarity metrics among the malicious software. Indeed, most com-puter network issues are also caused by malware. As a consequence, one enhancedsystem to analyze the behavior of malwares is needed to try to predict the maliciousactions and to minimize the computer damages caused by the malware. However,

Hsien-De Huang · Jee-Gong ChangNational Center for High-Performance Computing, Taiwane-mail: [email protected], [email protected]

Giovanni AcamporaSchool of Industrial Engineering, Information Systems, Eindhoven University of Technology,P.O. Box 513, 5600 MB, Eindhoven, The Netherlandse-mail: [email protected]

Vincenzo LoiaDepartment of Computer Science, University of Salerno, Italye-mail: [email protected]

Chang-Shing Lee · Mei-Hui WangDept. of Computer Science and Information Engineering,National University of Tainan, Taiwane-mail: [email protected], [email protected]

Hani HagrasThe Computational Intelligence Centre,School of Computer Science and Electronic Engineering, University of Essex, UKe-mail: [email protected]

Hung-Yu KaoDept. of Computer Science and Information Engineering,National Cheng Kung University, Taiwane-mail: [email protected]

G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 113–132.DOI: 10.1007/978-3-642-35488-5_7 c© Springer-Verlag Berlin Heidelberg 2013

Page 127: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

114 H.-D. Huang et al.

the conventional data analysis tools lack the ability to deal with the computer safetybecause the environments malwares operating are with high levels of imprecisionand vagueness. For this reason, we have developed Taiwan Malware Analysis Net(TWMAN) to improve the accuracy of malware behavioral analysis. This chaptertries to explorer and deal with these computer security and safety issues by integrat-ing the semantic technologies and computational intelligence methods, such as thefuzzy ontologies and fuzzy markup language (FML). With the proposed approach,the malware identification has achieved a good performance according to the exper-imental results.

1 Introduction

In recent years, the rapid growth of information technology has strongly enhancedcomputer systems both in terms of computational and networking capabilities. How-ever, these novel distributed computing scenarios have simultaneously increased theissues about the security and safety of the interconnected hardware systems. Actu-ally, computer threats, such as viruses and backdoor programs, have caused differentkinds of the economical and technological disasters all around the world. Internetfraud activities [7], users private data stealing, and malwares damaging computersystems without getting the owner’s informed consent [19] are only some exam-ples that computer threats cause the sabotage of the personal, academic, and indus-trial computer equipments. As a consequence, this chapter tries to integrate differentkinds of the computational intelligence methods, such as the fuzzy ontologies [9] [9]and fuzzy markup language (FML) [3] [4] to face the problem with the computerthreats.

Ontologies are structural frameworks for modeling information by means of anexplicit specification and a shared conceptualization [16] and they are mainly usedas the good knowledge representation and communication model for intelligentagents [9]. Nevertheless, the traditional ontologies are not enough to deal with im-precise and vague knowledge. Hence, many re-searchers have explored the use offuzzy ontologies, i.e., structural frameworks based on fuzzy logic used for modelinginformation characterized by high levels of imprecision and vagueness. Lee et al. [9]proposed a fuzzy ontology for designing an intelligent decision making system forsummarization systems. Quan et al. [15] presented the automatic fuzzy ontologygeneration for semantic help desk support and the automatic fuzzy ontology gen-eration for semantic web. Typically, the joint exploitation of fuzzy ontologies andFML is mainly used as one supported framework for designing the intelligent fuzzyinference systems, which is one of the key research topics in the artificial and com-putational intelligence areas [6].

Today, there is a growing interest in the development of systems based onknowledge representation by means of ontological approaches. Nevertheless, theconventional ontology languages are not appropriate to deal with uncertainty [5],vagueness, or imprecision which strongly characterizes the real world scenarios. It

Page 128: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Fuzzy Markup Language for Malware Behavioral Analysis 115

is not surprising that the fuzzy set theory and fuzzy logic can handle these typesof knowledge and indeed the fuzzy ontologies are emerging as a useful methodol-ogy for knowledge representation in several semantic-oriented applications. Lee etal. [13] applied the FML to university assessment. Wang et al. [25] presented theFML-based food ontology applications.

The FML is a novel computer language useful for modeling the advanced fuzzysystems by means of a structural and taxonomic approach that improves the fuzzysystems design from two points of view: transparency and reliability [3]. Althoughmany malware behavioral analysis tools have actually been developed by the soft-ware companies, such as the Norman Sandbox and Virus Total and Threat Expert,the behavior of some fractional exceptional malware still cannot be detected. As aresult, this chapter presents an FML-based ontological agent for malware behav-ioral analysis to model the malware behavioral knowledge defined by domain ex-perts. Based on the proposed agent, one real operation system (OS) environment,called Taiwan Malware Analysis Net (TWMAN), has been developed to analysisthe malware behavioral, detect the known or unknown malware, and finally outputthe analysis reports to users [7] [9] [8].

This remainder of the chapter is as follows. Sect. 2 describes the literature surveyabout Web Ontology Language (OWL), FML, and TWMAN. Sect. 3 describes theintegration of a fuzzy ontology model and FML for modeling the knowledge aboutmalware behaviors and proposes an intelligent decision making system for detect-ing computer anomalies. Sect. 4 discusses the experimental results. Finally, someconclusive remarks are given in Sect. 5.

2 Basic Concepts: Improving TWMAN through FML andOWL

In this section, an introduction to the encountered challenges this chapter faced, themain components of the proposed technical architecture, and how to integrate OWLand FML with TWMAN are described.

2.1 Ontology Web Language (OWL) for Modeling MalwaresDomain

When a malware behavioral analysis tool owns the malwares source code at its dis-posal, the analysis of the malware becomes quite simple. However, in fact, only ifone malware behavioral analysis tool is able to understand, read, interpret, and lookfor key-code fragments, the key information on the attacker and the attack will berevealed by the tool. Unfortunately, the proposed approach in this chapter does notown malwares source codes to detect eventual viruses or similar programs, but thischapter exploits an ontological view of malwares behavior in order to define a moregeneral and efficient detection platform. In order to express the ontological knowl-edge about the malware behavior, our proposed approach uses the OWL2 language,

Page 129: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

116 H.-D. Huang et al.

Fig. 1 Structure of the domain ontology

a standard tool for modeling knowledge in a semantic way, to represent a novelstructure of the domain ontology.

Fig. 1 shows the structure of the domain ontology, including a domain layer,a category layer, a concept layer, and an instance layer [25]. The domain layerrepresents the domain names of the ontology. The category layer defines severalcategories labeled as “category 1, category 2, category 3, . . . , and category k”. Theconcept layer defines several concepts labeled as “concept 1, concept 2, concept 3,. . . , and concept k”. Each concept in the concept layer contains an instance set in theinstance layer for an application domain. Based on the structure of the domain on-tology [25], some descriptions about how to apply the domain ontology to TWMANare given in sect. 3.

Based on the structure of Fig. 1, the OWL is used to describe an ontologicalmodel of the malware behavioral, including File Hash (FH), Connect IP (CI), FilesChange (FC), and Similarity (SI) [7] [9]. Fig. 2 shows the structure of the malwarebehavioral ontology. Precisely, File Hash (FH) is a malware information which iscomputed by the ssdeep program [11]. The generated Hash values allow analysts toassign a percentage score to represent the similarity between two malwares. ConnectIP (CI) allows us to count the number of TCP/IP connections via the INetSim [10]to detect if there is the unknown malware behavioral. File Change (FC), computed

Page 130: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Fuzzy Markup Language for Malware Behavioral Analysis 117

Fig. 2 Structure of the malware behavioral ontology

by the Advanced Intrusion Detection Environment (AIDE) [14], is the number ofchanges occurred in the client-side file system due to some eventual malware ac-tions. The Similarity (SI) is calculated similarity between unknown sampled pro-grams and known malware according to the values of the FH, CI, and FC. However,even though OWL enables a suitable representation of malwares knowledge, it isnot able to apply the advanced inference mechanisms to derive the additional im-precise and vague knowledge in the scenario of malwares detection. For this reason,we exploit the FML to bridge the gap among other methodologies.

2.2 Fuzzy Markup Language (FML) as Inference Engine forMalwares Analysis

Proposed by Acampora and Loia [3], FML is a domain-specific language and itsmain aim is to model fuzzy systems by directly dealing with fuzzy concepts, fuzzyrules, and fuzzy inference engines [6]. In particular, it is used to model two well-known kinds of fuzzy controllers: Mamdani and Takagi-Sugeno-Kang (TSK). Thislanguage is an XML-based language, so FML programs are coded through a col-lection of correlated semantic XML tags, following an opportune XML Schema,

Page 131: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

118 H.-D. Huang et al.

Fig. 3 The tree structure of FML

capable of modeling the different components of a fuzzy controller. Some samplesof FML tag are as follows [1] [4]: (1) <FUZZYCONTROL> that models a wholefuzzy system, and (2) <KNOWLEDGEBASE> and <RULEBASE> that representthe main components of a fuzzy system: the knowledge base and the rule base.

However, since an FML program realizes only a static view of a fuzzy system, theso-called eXtensible Stylesheet Language Translator (XSLT) is provided to changethis static view to a computable version. FML is essentially composed by threelayers [6]: (1) XML in order to create a new markup language for fuzzy logic con-trol, (2) a XML Schema Document (XSD) as grammar to define the legal buildingblocks, and (3) a XSLT in order to convert a fuzzy controller description into ageneral-purpose computer language. Different from other similar approaches usedto describe fuzzy controllers such as Fuzzy Control Language or MATLAB FuzzyInference System (FIS) developed by the Math Works, FML allows fuzzy design-ers to simply code their ideas on heterogeneous hardware by exploiting abstractionbenefits offered by XML tools. Fig. 3 shows the tree structure of FML.

2.3 Taiwan Malware Analysis Net (TWMAN)

According to Joe Stewart’s Truman, a real OS environment open source software [7][8] [17], TWMAN (http://TWMAN.org) is developed as an open source (GPL v2)

Page 132: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Fuzzy Markup Language for Malware Behavioral Analysis 119

project. Some important features of TWMAN are given as follows: (1) TWMANalso is an automated behavioral malware analysis software to analyze the malwareand developed by following the client-server architecture. (2) The server works onLinux, while the client runs under Microsoft Windows and uses the PXE-Boot toboot. (3) In a client-side Windows environment, malware usually attempts to exe-cute or to install other applications in the Windows, so TWMAN also includes theWinSock functions, which can be able to communicate with TCP/IP-networks, suchas the Internet or an intranet system. (4) Via the InetSim, TWMAN is able to skimsome important connections such as HTTP, FTP, SMTP, and IRC connections to ex-tract the important data (i.e. FTP and IRC login information). (5) TWMAN also cancompare the before-infected image file with the after-infected one in the client sideto get known if the registry files where Windows NT/2000/2003/XP stores configu-ration data, including systems, user, applications, and hardware, have been modifiedor configured to auto-start by some malware. (6) Through the Advanced IntrusionDetection Environment (AIDE), TWMAN is also skilful to exactly detect what filesare added, modified, or deleted by comparing the disk image with the clean imageuploaded to the client before the process, and then to take a note after being infectedby malware.

In order to test and verify the performance of the proposed approach, we havecompleted the analysis of 10000 malware samples and then generated the reportsvia the developed TWMAN. Fig. 4 shows the partial reports from TWMAN. Fromthe experimental results, the proposed approach can get much more correct mal-ware behavioral information than other analysis tools. In this way, the proposedFML-based ontological agent for malware behavioral analysis is able to solve muchmore complex problems, exploit the malware behavioral to infer the additional in-formation, and even provide the advanced services to end users.

3 An FML-Based Fuzzy Ontological Model for TWMAN

This section is devoted to integrate OWL and FML in order to design a semanticmethodology for improving malware behavioral analysis. In particular, in this sec-tion, we describe how to use fuzzy ontologies to model the knowledge related tomalware behaviors and how to merge these fuzzy ontologies with FML in order todesign the proposed intelligent system. The main tools used to achieve the proposedresults are: OWL by Protege and FML by VisualFML, a visual programming toolbased on FML. By using these tools, an FML-based malware behavioral inferenceengine is introduced. As shown in Fig. 5, the proposed engine is composed of aKnowledge Base, containing the fuzzy static information related to the malware do-main, and a Rule Base, representing the fuzzy reasoning parts taking the opportunesafety critical decisions.

Page 133: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

120 H.-D. Huang et al.

Fig. 4 Example Report Part of TWMAN

3.1 Integrating OWL and FML for Analyzing Malware Behaviors

The main aim of ontological languages is to provide a shared vocabulary of anapplication domain for designing advanced distributed applications. Indeed, OWLcan describe the relation between concepts with instances and inference new in-stance; but, however, it is not capable of modeling inference mechanism for gen-erating new knowledge. For this reason, other languages such as SWRL or JESSshould be integrated in OWL. Nevertheless, aforementioned languages do not sup-port the fuzzy computation that, as shown in experiments, strongly supports themalware behavioral analysis. Therefore, we improve the OWL with FML to modelthe malware behavioral knowledge, shown as follows. FML parser was used toextract the knowledge from the FML-based definition. The input is the FML-based definition of the fuzzy controller which is denoted by CFML. The output is

Page 134: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Fuzzy Markup Language for Malware Behavioral Analysis 121

Fig. 5 The structure of FML-based malware behavioral analysis

composed of a set of Fin={FileHashVeryLess, FileHashLess, FileHashNormal,FileHashMuch, FileHashVeryMuch, ConnectIPVeryLess, ConnectIPLess, Connec-tIPNormal, ConnectIPMuch, ConnectIPVeryMuch, FileChangeLess, FileChangeV-eryLess, FileChangeNormal, FileChangeMuch, FileChangeVeryMuch}, and a set ofFout={SimilarityVeryLow, SimilarityLow, SimilarityMedium, SimilarityHigh, Simi-larityVeryHigh}, and a fuzzy inference rules set FS={Rule1, Rule2,.., and Rule125}.Listings 1 and 2 show an example of partial of OWL code and FML code,respectively.

VisualFML Tool is a development environment for fuzzy-inference-based sys-tems developed by Acampora and Loia. The environment has been completely pro-grammed in Java, so it can be executed on any platform with JRE (Java RuntimeEnvironment) installed. Its functionalities cover the different stages of the fuzzysystem design process, from their initial description to the final implementation. Itis possible to import a .fml file to build a fuzzy controller, and also to export a systemcreated by the tool in a .fml file. The main functionalities the tool provides are thefollowing ones: (1) Fuzzy system description: define the system creating linguisticvariables and rules; (2) Verification: monitor the system behavior showing outputscorresponding to different inserted inputs; (3) Tuning: apply algorithms based onneural network; and (4) Synthesis: generate high-level languages descriptions.

Page 135: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

122 H.-D. Huang et al.

Listing 1 The part of example OWL code

<?xml v e r s i o n =” 1 . 0 ”?><r d f :RDF

xmlns : r d f =” http : / / www. w3 . org /1999 /02 /22− rdf−syntax−ns #”xmlns =” f i l e : / D : /TWMAN/TWMAN. owl #”xmlns : p r o t e g e =” http : / / protege . s t a n f o r d . edu / p l u g i n s /

owl / protege #”xmlns : xsp=” http : / / www. owl−o n t o l o g i e s . com / 2 0 0 5 / 0 8 / 0 7 /

xsp . owl #”xmlns : owl=” http : / / www. w3 . org / 2 0 0 2 / 0 7 / owl #”xmlns : s q w r l=” http : / / sqwrl . s t a n f o r d . edu / o n t o l o g i e s /

b u i l t −i n s / 3 . 4 / sqwrl . owl #”xmlns : xsd=” http : / / www. w3 . org / 2 0 0 1 /XMLSchema#”xmlns : s w r l =” http : / / www. w3 . org / 2 0 0 3 / 1 1 / s wr l #”xmlns : s w r l b=” http : / / www. w3 . org / 2 0 0 3 / 1 1 / swrlb #”xmlns : r d f s =” http : / / www. w3 . org / 2 0 0 0 / 0 1 / rdf−schema#”xmlns : s w r l a =” http : / / s wr l . s t a n f o r d . edu / o n t o l o g i e s / 3 . 3 /

swrla . owl #”xml : bas e =” f i l e : / D : /TWMAN/TWMAN. owl ”><owl : Onto logy r d f : a b o u t=” f i l e : / D : /TWMAN/TWMAN. owl ”><owl : i m p o r t s r d f : r e s o u r c e =” http : / / s wr l . s t a n f o r d . edu /

o n t o l o g i e s / 3 . 3 / swrla . owl ”/>. . . .

<V a r i a b l e>Fi leChange </ V a r i a b l e><Term>VeryLess</Term>

</Clause><Clause>

<V a r i a b l e>ConnectIP </ V a r i a b l e><Term>Less </Term>

</Clause></ An teceden t><Consequent>

<Clause><V a r i a b l e>S i m i l a r i t y </ V a r i a b l e><Term>VeryLow</Term>

</Clause></Consequent>

</Rule></RuleBase>

</ F u z z y C o n t r o l l e r >

3.2 Fuzzy Inference Mechanism

In order to design our proposal of malware behavioral analysis tool, the main fuzzycomponents composing the system have to be defined. Fig. 6 shows the fuzzy in-put variable editor in VisualFML and Fig.7 shows the conceptual framework forthe fuzzy controller. The task of this mechanism is to infer the possibility of de-veloping malware behavioral of each instance according to the malware behavioralknowledge base and rule base. First, there are four input fuzzy variables, includingFile Hash (FH), Connect IP (CI), File Change (FC), and one output fuzzy vari-able Similarity (SI) considered in this fuzzy inference mechanism. In this chapter, atrapezoidal function is adopted as the membership function of fuzzy number. It canbe expressed as the parameter set [a,b,c,d] and Figs. 8(a)-(d) show the membershipfunctions of the fuzzy variables:FH, CI, FC, and SI, respectively.

Page 136: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Fuzzy Markup Language for Malware Behavioral Analysis 123

Listing 2 The part of example FML code

<?xml v e r s i o n =” 1 . 0 ” encod ing =”UTF−8”?><F u z z y C o n t r o l l e r name=”TWMAN−3i5v −1o5v ” i p =” 1 4 0 . 1 1 0 . 9 6 . 1 0 0 ”>

<KnowledgeBase><F u z z y V a r i a b l e name=” ConnectIP ” d o m a i n l e f t =” 0 . 0 ” d o m a i n r i g h t =” 10000 . 0 ”

s c a l e =”” t y p e =” input ”><FuzzyTerm name=” Less ” complement =” f a l s e ”>

<T rapezo idShape Param1=” 1818 . 181818” Param2=” 2727 . 272727”Param3=” 3636 . 363636” Param4=” 4545 . 454545”/>

</FuzzyTerm><FuzzyTerm name=”Much” complement =” f a l s e ”>

<T rapezo idShape Param1=” 5454 . 545455” Param2=” 6363 . 636364”Param3=” 7272 . 727273” Param4=” 8181 . 818182”/>

</FuzzyTerm><FuzzyTerm name=”Normal” complement =” f a l s e ”>

<T rapezo idShape Param1=” 3636 . 363636” Param2=” 4545 . 454545”Param3=” 5454 . 545455” Param4=” 6363 . 636364”/>

</FuzzyTerm><FuzzyTerm name=” VeryLess ” complement =” f a l s e ”>

<T rapezo idShape Param1=” 0 . 0 ” Param2=” 0 . 0 ”Param3=” 1818 . 181818” Param4=” 2727 . 272727”/>

</FuzzyTerm><FuzzyTerm name=”VeryMuch” complement =” f a l s e ”>

<T rapezo idShape Param1=” 7272 . 727273” Param2=” 8181 . 818182”Param3=” 10000 . 0 ” Param4=” 10000 . 0 ”/>

</FuzzyTerm></ FuzzyVar iab le >

. . . .<KnowledgeBase><RuleBase name=”RB1” t y p e =”Mamdani”>

. . . .<Rule name=”RULE99” c o n n e c t o r =”and” o p e r a t o r =”MIN” w e i g h t =” 1 . 0 ”>

<Anteceden t><Clause>

<V a r i a b l e>Fi leHas h </ V a r i a b l e><Term>Less </Term>

</Clause><Clause>

<V a r i a b l e>Fi leChange </ V a r i a b l e><Term>VeryLess</Term>

</Clause><Clause>

<V a r i a b l e>ConnectIP </ V a r i a b l e><Term>Less </Term>

</Clause></ An teceden t><Consequent>

<Clause><V a r i a b l e>S i m i l a r i t y </ V a r i a b l e><Term>VeryLow</Term>

</Clause></Consequent>

</Rule></RuleBase>

</ F u z z y C o n t r o l l e r >

First, for fuzzy variable File Hash, Connect IP, and File Change there are five lin-guistic terms, Very Less, Low, Normal, Much, and Very Much, to express the trape-zoidal membership functions are represented as [0, 0, 1818, 2727], [1818, 2727,3636, 4545], [3636, 4545, 5454, 6363], [5454, 6363, 7272, 8181], and [7272, 8181,10000, 10000], respectively. Second, the fuzzy inference mechanism performs the

Page 137: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

124 H.-D. Huang et al.

Fig. 6 The fuzzy input variable editor in VisualFML

Fig. 7 Conceptual framework for the fuzzy controller

membership functions to compute the membership degrees for each instance storedin the ontology. The AND operator is then used to combine the matching degreeof each fuzzy rule’s condition. Next, the center of area of each rule is calculated.We utilize the membership functions of fuzzy output variable Similarity with fivelinguistic terms are Very Low, Low, Medium, High, and Very High, whose trape-zoidal membership functions are denoted as [0, 0.09, 0.18, 0.27], [0.18, 0.27, 0.36,0.45], [0.36, 0.45, 0.54, 0.63], [0.54, 0.63, 0.72, 0.81], and [0.72, 0.81, 0.90, 1], re-spectively. Finally, the fuzzy inference mechanism performs the MAX operation tointegrate the triggered rules having the same consequences and outputs the maxi-mum center of area. Table 1 lists the parameters of the membership functions. Table2 lists part of the fuzzy rules, which are constructed by the domain experts. Start-ing from this initial information, the proposed approach is able to take opportunedecisions to detect the malicious program.

Page 138: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Fuzzy Markup Language for Malware Behavioral Analysis 125

(a) (b)

(c) (d)

Fig. 8 The membership functions of the fuzzy variables (a) FH, (b) CI, (c) FC, and (d) SIand k means 103

4 Experimental Results

This section is devoted to introduce a case study where our intelligent frameworkhas been tested and validated. In order to evaluate the effectiveness of the proposedapproach, 10000 attendance records retrieved from the malware repository of Na-tional Center for High Performance and Computing (NCHC) of Taiwan are used asthe experimental data, shown in Table 3.

Fig. 9 shows a three-dimensional graphical representation of the system behaviorand results of the fuzzy inference process, where X axis is File Hash and Y axisis File Change. Fig. 10 shows anther system behavior view, where X axis is FileChange and Y axis is Connect IP. Figs. 9 and 10 indicate that we can effectivelyjudge the Similarity of the unknown malware by the Connect IP and File Hash,instead of File Hash and File Change.

The performance of the proposed approach is evaluated according to the criteriasuch as accuracy, precision, and recall. The accuracy, precision, and recall functionsare calculated by Eqs. 4, 5 and 6, respectively. The parameters of TP (true posi-tive), FP (false positive), FN (false negative), and T N (true negative) are definedand listed in Table 4. T P and TN denote correct classifications. A FP is when the

Page 139: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

126 H.-D. Huang et al.

Table 1 Parameters of the membership functions

Symbol Fuzzy Term Membership Function

FH

Very Less [0, 0, 1818, 2727]

Less [1818, 2727, 3636, 4545]

Normal [3636, 4545, 5454, 6363]

Much [5454, 6363, 7272, 8181]

Very Much [7272, 8181, 10000, 10000]

FC

Very Less [0, 0, 1818, 2727]

Less [1818, 2727, 3636, 4545]

Normal [3636, 4545, 5454, 6363]

Much [5454, 6363, 7272, 8181]

Very Much [7272, 8181, 10000, 10000]

CI

Very Less [0, 0, 1818, 2727]

Less [1818, 2727, 3636, 4545]

Normal [3636, 4545, 5454, 6363]

Much [5454, 6363, 7272, 8181]

Very Much [7272, 8181, 10000, 10000]

SI

Very Low [0, 0.09, 0.18, 0.27]

Low [0.18, 0.27, 0.36, 0.45]

Medium [0.36, 0.45, 0.54, 0.63]

High [0.54, 0.63, 0.72, 0.81]

Very High [0.72, 0.81, 0.90, 1]

outcome is not correctly predicted as Yes but in fact, it is No. A FN is when out-come is not correctly predicted as No, but in fact, it is Yes. The distribution of theaccuracy, precision and recall are shown in Fig. 11.

Accuracy =(T N +TP)

(T P+TN +FP+FN)× 100% (1)

Precision =TP

(TP+FP)× 100% (2)

Recall =TP

(T P+FN)× 100% (3)

5 Conclusions

A fuzzy logic approach involves the ability to compare two distinctly different itemsand determines a fundamental level of similarity between the two items. This chap-ter explores the possibility of utilizing the fuzzy techniques as a means to identify

Page 140: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Fuzzy Markup Language for Malware Behavioral Analysis 127

Table 2 Part of the fuzzy rules

Rule Input Variables Output Variable

No FH FC CI SI

1 Normal Normal Normal Medium

2 Normal Normal Very Much High

3 Normal Normal Much Medium

4 Normal Normal Less Low

5 Normal Normal Very Less Very Low

6 Normal Very Much Normal Medium

7 Normal Very Much Very Much High

8 Normal Very Much Much High

9 Normal Very Much Less Medium

10 Normal Very Much Very Less Medium

11 Normal Much Normal Medium

12 Normal Much Very Much High

13 Normal Much Much High

. . . . . . . . .

114 Very Less Normal Less Low

115 Very Less Normal Very Less Low

116 Very Less Less Very Much Low

117 Very Less Less Much Medium

118 Very Less Less Normal Low

119 Very Less Less Less Low

120 Very Less Less Very Less Very Low

121 Very Less Very Less Very Much Low

122 Very Less Very Less Much Medium

123 Very Less Very Less Normal Medium

124 Very Less Very Less Less Low

125 Very Less Very Less Very Less Very Low

the similarities in emerging families of malicious software. However, the similar-ity degree of two programs is usually used to determine that whether one programof these two is a variant of the other. In this model, malicious characteristics of aprogram are first abstracted by the fuzzy pattern recognition, and then the fuzzy on-tology for malware behavioral analysis scheme is presented. The proposed approachis composed of a fuzzy inference and semantic decision-making mechanism to de-scribe the changes of the registry key value, network connection, and file changeto build the ontology and behavioral rules. The experimental results show that ourapproach is feasible and usable for malware behavioral analysis system. This pro-posed approach is capability of detecting unknown malicious programs and malware

Page 141: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

128 H.-D. Huang et al.

Table 3 Experimental data input

Input Output

FH CI FC SI

Unit [0,10000] [0,10000] [0,10000] [0,1]

No Desired Inferred

1 4561 2686 9239 0.951 0.681

2 1225 2655 8883 0 0.499

3 1125 2674 8707 0 0.5

4 6523 2673 7846 0.927 0.681

5 2541 2675 1313 0 0.15

6 7521 2675 7731 0.951 0.746

7 6564 3673 6680 0.951 0.672

8 6256 3705 4152 0.951 0.571

9 5421 4055 8480 0.927 0.681

10 6325 6562 7332 0.975 0.681

11 235 5 0 0 0.136

12 6134 7353 10000 0.951 0.703

13 7661 7543 10000 0.927 0.745

14 461 145 115 0 0.136

15 2564 106 726 0 0.281

16 6741 9621 10000 0.953 0.753

17 1954 264 0 0 0.167

18 167 912 0 0 0.136

19 647 922 0 0 0.136

20 6197 9462 7565 0.976 0.743

21 6347 7680 8565 0.951 0.764

22 235 140 850 0 0.136

23 8647 9420 7850 1 0.794

24 8647 9820 10000 0.976 0.863

25 233 365 0 0 0.136

26 6635 7432 8865 0.975 0.717

27 5142 7450 7650 0.929 0.681

28 5127 6503 8850 0.951 0.681

29 8138 8543 9850 0.976 0.863

30 7138 7873 9850 1 0.798

31 674 324 0 0 0.136

32 1297 156 339 0 0.136

33 179 258 0 0 0.136

34 675 28 0 0 0.136

Page 142: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Fuzzy Markup Language for Malware Behavioral Analysis 129

Table 3 (continued)

Input Output

FH CI FC SI

Unit [0,10000] [0,10000] [0,10000] [0,1]

No Desired Inferred

35 6571 6541 947 0.927 0.863

36 6429 7831 8565 0.951 0.791

37 6943 7585 9543 0.927 0.747

38 1257 145 115 0 0.136

39 8642 8007 5726 0.976 0.639

40 6431 6921 6026 0.951 0.611

41 5741 8421 10000 0.829 0.742

42 6652 8650 10000 0.95 0.863

43 7410 7922 6520 0.814 0.647

44 2268 94 0 0 0.226

45 2149 680 0 0 0.205

46 6541 8041 7850 0.976 0.794

47 1421 2402 1850 0.024 0.146

48 2431 3997 5939 0.634 0.103

49 6643 6756 9329 1 0.681

50 314 478 0 0 0.136

Fig. 9 Fuzzy variable control surface viewer

Page 143: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

130 H.-D. Huang et al.

Fig. 10 Fuzzy variable control surface viewer

Table 4 Various parameters used in Eqs. 4, 5 and 6

Actual resultsPrediction results

Yes No

Yes T P (true positive) FN (false negative)

No FP (false positive) T N (true negative)

Fig. 11 Results of the accuracy, precision and recall

variants to make sure the behaviors of virus or malicious program and provide betterprotection and services to end users.

In the future, introducing the fuzzy techniques to a larger of collection and an-alyzing the infrastructure of other security-related data points, such as malware,Botnet family similarity, and social networking inferences of similar malware, willbe considered. In addition, vaguer knowledge of OS platform with experimentaldata will be collected because type-1 FML is not enough to deal with. Therefore,some upgradable technologies, like the genetic algorithm and the type-2 fuzzy set,will be included to compare with the current technology. We also compare the per-formance with other classification methods. In order to take prompt and appro-priate measures, TWMAN can integrate with a human thinking semantic model.

Page 144: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Fuzzy Markup Language for Malware Behavioral Analysis 131

Therefore, we consider that TWMAN could be a powerful tool to improve thenetwork safety.

Acknowledgements. This work is partially supported by the National Science Council ofTaiwan under the grant NSC98-2221-E-024-009-MY3 and NSC99-2911-I-024-004. The au-thors would like to thank National University of Tainan in Taiwan and University of Essex inUK for their supporting this research project.

References

1. Acampora, G., Gaeta, M., Loia, V., Vasilakos, A.V.: Interoperable and adaptive fuzzyservices for ambient intelligence applications. ACM Transactions on Autonomous andAdaptive Systems 5(2), 1–26 (2010)

2. Acampora, G., Loia, V.: Using FML and fuzzy technology in adaptive ambient intelli-gence environments. International Journal of Computational Intelligence Research 1(2),171–182 (2005)

3. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive do-motic framework. IEEE Transactions on Industrial Informatics 2, 97–111 (2005)

4. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelli-gence. Information Sciences 178(3), 631–646 (2008)

5. Bobillo, F., Straccia, U.: Representing fuzzy ontologies in OWL 2. In: 2010 IEEE WorldCongress on Computational Intelligence (WCCI 2010), Barcelona, Spain, July 18-23(2010)

6. Ho, S.H., Yang, C.L., Chen, C.Y., Hsu, C.Y., Chang, Y.K.: An Intelligent-Mamdani Infer-ence Scheme for Healthcare Applications Based on Fuzzy Markup Language. In: 200910th International Symposium on Pervasive Systems, Algorithms, and Networks (ISPAN2009), Kaohsiung, Taiwan, December 14-16 (2009)

7. Huang, H.D., Chuang, T.Y., Tsai, Y.L., Lee, C.S.: Ontology-based Intelligent Systemfor Malware Behavioral Analysis. In: 2010 IEEE World Congress on ComputationalIntelligence (WCCI 2010), Barcelona, Spain, July 18-23 (2010)

8. Huang, H.D., Lee, C.S., Kao, H.Y., Tsai, Y.L., Chang, J.G.: Malware Behavioral Anal-ysis System: TWMAN. In: 2011 IEEE Symposium on Computational Intelligence forIntelligent Agent (IEEE SSCI 2011), Paris, France, April 11-15 (2011)

9. Huang, H.D., Loia, V., Acampora, G., Lee, C.S., Kao, H.Y.: Applying FML and FuzzyOntologies to Malware Behavioral Analysis. In: 2011 IEEE International Conference onFuzzy Systems (FUZZ-IEEE 2011), Taipei, Taiwan, June 27-30 (2011)

10. Hungenberg, T., Eckert, M.: INetSim (2010), http://www.inetsim.org11. Kornblum, J.: ssdeep (2010), http://ssdeep.sourceforge.net12. Lee, C.S., Jian, Z.W., Huang, L.K.: A fuzzy ontology and its application to news sum-

marization. IEEE Transactions on Systems, Man and Cybernetics Part B 35(5), 859–880(2005)

13. Lee, C.S., Wang, M.H., Su, M.K., Wu, N.Y., Liu, C.H., Tseng, Y.Y., Wang, Y.L., Wang,H.M.: Fuzzy markup language for university assessment. In: 2011 IEEE InternationalConference on Systems, Man, and Cybernetics (IEEE SMC 2011), Anchorage, Alaska,USA, October 9-12 (2011)

14. Lehti, R., Virolainen, P.: AIDE (2011), http://aide.sourceforge.net

Page 145: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

132 H.-D. Huang et al.

15. Quan, T.T., Hui, S.C., Fong, A.C.M., Cao, T.H.: Automatic fuzzy ontology generation forsemantic web. IEEE Transaction on Knowledge and Data Engineering 18(6), 842–856(2006)

16. Sanchez, F.G., Bejar, R.M., Contreras, L., Breis, J.T.F., Nieves, D.C.: An ontology-basedintelligent system for recruitment. Expert Systems with Applications 31(2), 248–263(2006)

17. Stewart, J.: Behavioural malware analysis using Sandnets. Computer Fraud & Secu-rity 12, 4–6 (2006)

18. Wang, M.H., Lee, C.S., Hsieh, K.L., Hsu, C.Y., Chang, C.C.: Intelligent ontologicalmulti-agent for healthy diet planning. In: 2009 IEEE International Conference on FuzzySystem (FUZZ-IEEE 2009), Jeju Island, Korea, August 19-24 (2009)

19. Zhao, H., Xu, M., Zheng, N., Yao, J., Ho, Q.: Malicious Executables Classification Basedon Behavioral Factor Analysis. In: 2010 International Conference on e-Education, e-Business, e-Management and e-Learning, Sanya, China, January 22-24 (2010)

Page 146: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Applying FML-Based Fuzzy Ontology toUniversity Assessment

Mei-Hui Wang, Chang-Shing Lee, Hani Hagras, Ming-Kai Su, Yu-Yang Tseng,Hui-Min Wang, Yuan-Liang Wang, and Che-Hung Liu

Abstract. The goal of higher education evaluation and accreditation is to ensure thateducation provided by institutions meets acceptable levels of quality. In 2011, thehigher education evaluation and accreditation council of Taiwan (HEEACT) startedto evaluate the higher education institutions through five predefined items, includ-ing (1) university goal, (2) university governance and management, (3) teachingand learning resource, (4) performance and society responsibility, and (5) improve-ment and quality assurance mechanism. In this chapter, we present a novel FuzzyMarkup Language (FML)-based fuzzy ontology and its application to university as-sessment for National University of Tainan (NUTN), Taiwan. The proposed fuzzyontology model is utilized to represent the university evaluation and accreditationdomain knowledge predefined by domain experts. The FML is adopted to describethe knowledge base and rule base of the university assessment. Simulation resultsindicate that the proposed approach can effectively infer the pass level of the uni-versity assessment.

Mei-Hui Wang · Chang-Shing Lee · Ming-Kai SuDept. of Computer Science and Information Engineering,National University of Tainan, Taiwane-mail: {mh.alice.wang,devil74825}@gmail.com,

[email protected]

Hani HagrasThe Computational Intelligence Centre, University of Essex, UKe-mail: [email protected]

Yu-Yang Tseng · Che-Hung LiuDept. of Business and Management, National University of Tainan, Taiwane-mail: {kofninja,chehung}@gmail.comHui-Min Wang · Yuan-Liang WangComputer Center, National University of Tainan, Taiwane-mail: [email protected], [email protected]

G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 133–147.DOI: 10.1007/978-3-642-35488-5_8 c© Springer-Verlag Berlin Heidelberg 2013

Page 147: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

134 M.-H. Wang et al.

1 Introduction

The higher education accreditation is conducted or supported by a government or-ganization in many countries, such as the ministry of education. In 2005, the HigherEducation Evaluation and Accreditation Council of Taiwan (HEEACT) has beenestablished to cooperate with Ministry of Education to execute the university as-sessment in Taiwan. Additionally, the HEEACT also develops the indicators, inter-acts with the practitioners, and exchanges with the international evaluation councilsfor the higher education evaluation. For most higher education institutes, collecting,confirming, and organizing the necessary documents about the university evalua-tion is a very time-consuming and exhausted job. After almost all of the thingsare ready, it is still unknown if the institute can pass the accreditation. Hence, inthis chapter, we present a fuzzy markup language (FML)-based university assess-ment system, combined the FML, fuzzy ontology, and fuzzy inference mechanismto help the higher education institutes to create a reference for the results of the eval-uation. Fuzzy Markup Language (FML) is a fuzzy-based markup language that canmanage fuzzy concepts, fuzzy rules, and a fuzzy inference engine [4] [3] [4]. Addi-tionally, FML is composed of three layers-eXtensible Markup Language (XML), adocument-type definition, and extensible stylesheet language transformations. Thedeveloped approach is different from the other similar approaches such as FuzzyControl Language (FCL) or MATLAB Fuzzy Inference System (FIS) developedby the Mathworks. The root of the fuzzy controller taxonomy, controller node, isrepresented through the FML tag <FuzzyController>. The fuzzy knowledge baseis defined by means of the tag <KnowledgeBase> which maintains the set of thefuzzy concepts used to model the fuzzy rule base. The root of the fuzzy rule basecomponent is modeled by the <RuleBase> tag which defines a fuzzy rule set [11].There are many FML-based applications, suc h as Acampora et al. [1] who proposedthe interoperable and adaptive fuzzy services for ambient intelligent applications.

The knowledge is defined as any information that is relevant, actionable, and itis based on the experience of a person. All knowledge workers share certain charac-teristic activities. However, when data is annotated, it is done against a frameworkor ontology. Ontology has become a very powerful way of sharing the knowledge aswell as representing the information and its semantic. An ontology is a collection ofkey concepts and their inter-relationships collectively providing an abstract view ofan application domain [17]. With the support of the ontology, both user and systemcan communicate with each other by the shared and common understanding of adomain [17]. In addition, an ontology is an essential element in many applications,including agent systems, knowledge management systems, and e-commerce plat-forms. For example, Lee et al. [9] presented a fuzzy ontology and applied it to newssummarization. They also proposed a novel episode-based ontology constructionmechanism to extract domain ontology from unstructured text documents [11].

In this chapter, the FML is applied to represent the knowledge base of the uni-versity assessment. In particular, National University of Tainan (NUTN) is given aninstance to be described. In addition, the rule base of the university assessment inTaiwan is also constructed by using the FML. According to the HEEACT [5], there

Page 148: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Applying FML-Based Fuzzy Ontology to University Assessment 135

are five items, including (1) university goal, (2) university governance and manage-ment, (3) teaching and learning resource, (4) performance and society responsibil-ity, and (5) improvement and quality assurance mechanism, to be considered if thisuniversity passes the assessment or not. We will take the university goal as an exam-ple for constructing the FML knowledge base and rule base in this chapter. Basedon the HEEACT, there are six factors that will affect the university goal’s evaluatedresults, namely, the SWOT (Strength, Weakness, Opportunity, and Threat) analysis,development plan, student core ability, academic office, development direction, anddevelopment identification. The simulation results show that the proposed approachcan work effectively.

The remainder of this chapter is structured as follows. Sect. 2 presents the struc-ture of the university goal ontology. In Sect. 3, the fuzzy markup language (FML)is briefly introduced and then the FML-based university assessment system is pre-sented. The simulation results are shown in Sect. 4. Finally, the conclusions aredrawn in Sect. 5.

2 Structure of University Goal Ontology

In this section, the structure of university goal ontology is introduced. The structureof the domain ontology adopted in this chapter contains four layers, namely thedomain layer, category layer, concept layer, and instance layer. The domain layerrepresents the domain name of the university goal ontology, and consists of variouscategories defined by domain experts. The category layer defines several categories.Each concept in the concept layer contains a concept name and some attributes foran application domain. The instance layer is composed of lots of instances. Theassociation indicates a semantic relationship between concepts in the concept layerand instances in the instance layer [9] [11].

According to the criteria defined by the HEEACT, the university is not able topass the evaluation and accreditation unless the university certainly plans the univer-sity goal, does the university governance and management as well as teaching andlearning resource, checks the performance and society responsibility, and eventu-ally acts the improvement and quality assurance mechanism. That is, the universitycan fully pass the evaluation and accreditation if the university completely achievesthe goal of PDCA (Plan, Do, Check, and Act) action circulation circle [5]. Forplanning the university goal, it is necessary for the university to (1) analyze thestrength, weakness, opportunity, and threat from the internal and external highereducation environment, (2) describe the completeness and rationality of the univer-sity goal based on SWOT, (3) define the university’s developing plan with vision,goal, strategy, and action item to meet the planned university goal, (4) develop theuniversity-level and college-level students’ basic accomplishment and core ability,and then further guide the departments to define department-level students’ basicaccomplishment and core ability, (5) fully statement the installation of the admin-istrative units and departments to meet the planned university goal and achieve thegoal of the university development, and (6) make use of diverse ways to promote

Page 149: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

136 M.-H. Wang et al.

Fig. 1 Partial fuzzy ontology model for university goal in English

the students’ basic accomplishment and core ability to the faculty and students andassess the performance of such a promotion.

Based on the above-mentioned fundamental knowledge of the university assess-ment [5], this chapter designs the fuzzy ontology for the university goal. Figs. 1and 2 show the partial fuzzy ontology model for planning the university goal inEnglish and in Chinese, respectively. In the domain layer, the domain name of thisontology is University Goal. There are six categories, including (1) SWOT Analysis,

Page 150: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Applying FML-Based Fuzzy Ontology to University Assessment 137

Fig. 2 Partial fuzzy ontology model for university goal in Chinese

(2) Development Plan, (3) Student Core Ability, (4) Academic Office, (5) Devel-opment Direction, and (6) Development Identification, in the category layer of theontology.

Every concept in the concept layer contains a concept name and an attribute set,that is, each concept contains various attributes with values. Take the concept SWOT

Page 151: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

138 M.-H. Wang et al.

Analysis for an example. The SWOT denotes Strength, Weakness, Opportunity, andThreat. This concept can divide into two parts including internal factors and exter-nal factors, and then these factors are considered as the fuzzy variables and fuzzysets for the knowledge base and rule base of the FML-based university assessmentsystem.

Table 1 Example of categories and concepts for university goal ontology

Category Concept Attribute

SWOT Analysis

InternalStrength, Weakness,

Completeness, Rationality

ExternalOpportunity, Threat,

Completeness, Rationality

Development Plan

Member Fitness, Consult Expert

Developed Proposal Meeting Material, Meeting Record

Content Vision, Goal, Strategy, Action Item

Student Core Ability

UniversityBasic Accomplishment,

Core Ability, University Goal

CollegeBasic Accomplishment,

Core Ability, Feature

Department Basic Accomplishment, Core Ability

Academic Office

Academic Unit Plan, Setting,

Planning and Setting Vision, Goal

Academic Unit Definite Mechanism,

Review Mechanism Definite Procedure

Development DirectionUniversity Development Plan Direction, Feature

College Development Plan Direction, Strategy

Development Identification

Involvement Development Involvement,

Plan of Faculty Understanding

Understanding DevelopmentVision, Goal

Plan of Students

Understanding Basic Accomplishment,

the Goal of Faculty Core Ability

Understanding Basic Accomplishment,

the Goal of Students Core Ability

Table 1 shows the examples of categories and their corresponding concepts andattributes for the university goal ontology. For instance, the concepts of the cate-gory Development Plan contain Member, Developed Proposal, and Content. Theattributes of the concept Member are Fitness and Consult Expert. Take NUTN as aninstance of university goal ontology. The values of the attributes Fitness and ConsultExpert are Excellent and Expert outside the School, respectively.

Page 152: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Applying FML-Based Fuzzy Ontology to University Assessment 139

3 FML-Based University Assessment System

In this section, combined the fuzzy markup language, fuzzy ontology, and fuzzyinference mechanism, the FML-based university assessment system is introduced.

3.1 Fuzzy Markup Language

Composed of the knowledge base and rule base, the fuzzy markup language is de-veloped by Dr. Giovanni Acampora and Prof. Vincenzo Loia, University of Salerno,Italy [4] [3]. Recently, FML has been successfully applied to lots of research top-ics such as diet and meeting scheduling [11] [15] [13]. The knowledge base is de-fined by means of the tag <KnowledgeBase> which maintains the set of fuzzyconcepts used to model the fuzzy rule base. The <KnowledgeBase> uses theattribute ip that determines the location in the network of whole fuzzy knowl-edge base of our system. In order to define the fuzzy concept related controlledsystem, <KnowledgeBase> tag uses a set of nested tags: (1)<FuzzyVariable>;(2)<FuzzyTerm>; (3) a set of tags defining a shape of fuzzy sets. <FuzzyVariable>defines the fuzzy concept, for example, “temperature”; <FuzzyTerm> defines a lin-guistic term describing the fuzzy concept, for example, “low temperature”; the setof tags defining the shapes of fuzzy sets are related to fuzzy terms. The attributesof <FuzzyVariable> tags are: name, scale, domainLeft, domainRight, type, andip. <FuzzyTerm> uses one attribute, name, used to define the linguistic value,to associate with fuzzy concept. Fuzzy shape tags, used to complete the defini-tion of fuzzy concept, are: <PIShape>, <SShape>, <ZShape>, <LinearShape>,<TrapezoidShape>, and <TriangularShape>. Every shaping tag uses a set of at-tributes which define the real outline of corresponding fuzzy set [11].

The root of fuzzy rule base component is modeled by the <RuleBase> tag whichdefines a fuzzy rule set. The <RuleBase> tag uses two attributes: inferenceEngineand ip. The former is used to define inference operator type: MinMaxMin Mamdanior LarsonProduct. The latter defines the network location of the set of rules usedin fuzzy controller. In order to define the single rule, the <Rule> tag is used. Thetags used by <Rule> are: id, connector, weight, and ip. The definition of antecedentand consequent rule part is obtained by using <Antecedent> and <Consequent>tags. To complete the definition of fuzzy clause, the <Variable>, <Term>, and<TSKParam> have to be used. In particular, the pair “<Variable>, <Term>” isused to define fuzzy clauses in antecedent and consequent part of Mamdani con-troller rules as well as in antecedent part of TSK controller rules. While, the pair“<Variable>, <TSKParam>” is used to model the consequent part of Takagi-Sugeno-Kang (TSK) controller rules [11].

3.2 Knowledge Base of University Assessment System

The knowledge base of university assessment system for evaluating the univer-sity goal consists of five input fuzzy variables, namely SWOT Analysis (SWOTA),

Page 153: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

140 M.-H. Wang et al.

Development Plan (DP), Student Core Ability (SCA), Academic Office (AO), Devel-opment Direction (DD), and Development Identification (DI), and one output fuzzyvariable University Goal (UG). Listing 1 lists the partial knowledge base of assess-ing university goal, and Table 2 shows the parameters of fuzzy variables and fuzzysets. Figs. 3(a)-3(g) show the membership functions for fuzzy variables SWOTA,DP, SCA, AO, DD, DI, and UG, respectively.

Listing 1 Partial knowledge base of assessing university goal

<KnowledgeBase><F u z z y V a r i a b l e d o m a i n l e f t =”0” d o m a i n r i g h t =”100 ” name=”SWOTA” s c a l e =” l e v e l ”

t y p e =” input ”><FuzzyTerm name=” Pass ” hedge=”Normal”>

<T rapezo idShape Param1=”40” Param2=”60” Param3=”100 ” Param4=” 100 ” /></FuzzyTerm>

<FuzzyTerm name=” F a i l ” hedge=”Normal”><T rapezo idShape Param1=”0” Param2=”0” Param3=”0” Param4=”60” /></FuzzyTerm>

</FuzzyVar iab le ><F u z z y V a r i a b l e d o m a i n l e f t =”0” d o m a i n r i g h t =” 100 ” name=”DP” s c a l e =” l e v e l ”

t y p e =” input ”><FuzzyTerm name=” Pass ” hedge=”Normal”><T rapezo idShape Param1=”40” Param2=”60” Param3=” 100 ” Param4=”100 ” /></FuzzyTerm>

<FuzzyTerm name=” F a i l ” hedge=”Normal”><T rapezo idShape Param1=”0” Param2=”0” Param3=”0” Param4=”60” /></FuzzyTerm>

</ FuzzyVar iab le >. . . .<F u z z y V a r i a b l e d o m a i n l e f t =”0” d o m a i n r i g h t =” 100 ” name=”UG” s c a l e =” l e v e l ”

t y p e =” output ”><FuzzyTerm name=” Pass ” hedge=”Normal”><T rapezo idShape Param1=”65” Param2=”70” Param3=” 100 ” Param4=”100 ” /></FuzzyTerm>

<FuzzyTerm name=” Condi t iona l ” hedge=”Normal”><T rapezo idShape Param1=”50” Param2=”55” Param3=”65” Param4=”70” /></FuzzyTerm>

<FuzzyTerm name=” F a i l ” hedge=”Normal”><T rapezo idShape Param1=”0” Param2=”0” Param3=”50” Param4=”55” /></FuzzyTerm>

</ FuzzyVar iab le ></KnowledgeBase>

3.3 Rule Base of University Assessment System

In this subsection, the rule base of the university assessment system for assessingthe passing level of the university goal is introduced. Listing 2 and Table 3 show thepartial rule base of FML and fuzzy inference rules for assessing the university goal,respectively. Each input fuzzy variable has two fuzzy sets adopted to simplify thefuzzy inference rule in this chapter. Hence, the total number of the fuzzy inferencerules is 64 in this chapter. Moreover, there are three fuzzy sets, including Pass,Conditional, and Fail, defined in the output fuzzy variables.

Page 154: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Applying FML-Based Fuzzy Ontology to University Assessment 141

Table 2 Parameters of fuzzy variables and fuzzy sets

Fuzzy Variable Fuzzy Set Membership Function

SWOTAPass [40, 60, 100,100]

Fail [0, 0, 60]

SCAPass [40, 60, 100,100]

Fail [0, 0, 60]

DDPass [40, 60, 100,100]

Fail [0, 0, 60]

UG

Pass [65, 70, 100,100]

Conditional [50, 55, 65, 70]

Fail [0, 0, 50, 55]

DPPass [40, 60, 100,100]

Fail [0, 0, 60]

AOPass [40, 60, 100,100]

Fail [0, 0, 60]

DIPass [40, 60, 100,100]

Fail [0, 0, 60]

4 Simulation Results

In this section, some simulation results are given. The proposed FML-based univer-sity assessment system is implemented by ASP.Net (Web Inference), Microsoft C#programming language (Fuzzy Inference Mechanism), and Java (FML and VisualEditor). The research performance presented in this chapter is a research projectinvolving with the NUTN and HAMASTAR TECHNOLOGY CO., LTD. in Tai-wan. With the support of the involved domain experts and the on-line informationprovided by the HEEACT [5], the proposed method is applied to the university as-sessment’s five domain areas, including (1) planning the university goal, (2) doingthe university governance and management, (3) doing the teaching and learning re-source, (4) checking the performance and society responsibility, and (5) acting theimprovement and quality assurance mechanism. In this section, the university goaldomain is implemented to give an example. Fig. 4 shows the screenshot of the web-based university assessment system for NUTN. Fig. 5 shows the screenshot of theFML-based university assessment system when assessing the passing level of plan-ning university goal. Fig. 6 shows the screenshot that the university goal is passedif the values of the SWOTA, DP, SCA, AO, DD, and DI are 80, 85, 70, 80, 80, and90, respectively.

Page 155: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

142 M.-H. Wang et al.

Fig. 3 Membership functions for fuzzy variables (a) SWOTA, (b) DP, (c) SCA, (d) AO, (e)DD, (f) DI, and (g) UG

Next, the three-dimension curves implemented by the FML Editor provided bythe University of Salerno are shown in Fig. 7. Fig. 7(a) shows the relationship amongSCA, DP, and UG. It indicates that the UG does start to increase as the SCA and DPapproaches the pass state (40 ∼ 100). On the contrary, if SCA and DP reduce to-ward the fail state (0 ∼ 60), the passing possibility of the university goal graduallydecreases. Fixed the values of SCA, DP, AO, and DI at 0, 100, 100, and 100, re-spectively, and varied the values of the SWOTA and DD, Fig. 7(b) shows that thepassing possibility of the university goal gradually increases when the values of theboth SWOTA and DD increase.

Fig. 7(c) illustrates the variances in UG when changing the values of AO andDI. Fixed the values of SWOTA, SCA, AO, and DI at 0, 80, 80, 80, respectively,Fig. 7(d) indicates that UG decreases if the value of the DP or DD is below 60. Based

Page 156: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Applying FML-Based Fuzzy Ontology to University Assessment 143

Listing 2 Partial rule base of FML for assessing university goal

<RuleBase a c t i v a t i o n M e t h o d=”MIN” andMethod=”MIN” orMethod=”MAX”name=” RuleBase1 ” t y p e =”mamdani”>

<Rule name=” Rule1” c o n n e c t o r =”and” w e i g h t=”1” o p e r a t o r =”MIN”><Anteceden t>

<Clause><V a r i a b l e>SWOTA</ V a r i a b l e> <Term>Pass </Term>

</Clause><Clause>

<V a r i a b l e>DP</ V a r i a b l e> <Term>Pass </Term></Clause><Clause>

<V a r i a b l e>SCA</ V a r i a b l e> <Term>Pass </Term></Clause><Clause>

<V a r i a b l e>AO</ V a r i a b l e> <Term>Pass </Term></Clause><Clause>

<V a r i a b l e>DD</ V a r i a b l e> <Term>Pass </Term></Clause><Clause>

<V a r i a b l e>DI</ V a r i a b l e> <Term>Pass </Term></Clause>

</ An teceden t><Consequent>

<Clause><V a r i a b l e>UG</ V a r i a b l e> <Term>Pass </Term>

</Clause></Consequent>

</Rule>. . .<Rule name=” Rule64 ” c o n n e c t o r =”and” w e i g h t =”1” o p e r a t o r =”MIN”>

<Anteceden t><Clause>

<V a r i a b l e>SWOTA</ V a r i a b l e> <Term>F a i l </Term></Clause><Clause>

<V a r i a b l e>DP</ V a r i a b l e> <Term>F a i l </Term></Clause><Clause>

<V a r i a b l e>SCA</ V a r i a b l e> <Term>F a i l </Term></Clause><Clause>

<V a r i a b l e>AO</ V a r i a b l e> <Term>F a i l </Term></Clause><Clause>

<V a r i a b l e>DD</ V a r i a b l e> <Term>F a i l </Term></Clause><Clause>

<V a r i a b l e>DI</ V a r i a b l e> <Term>F a i l </Term></Clause>

</ An teceden t><Consequent>

<Clause><V a r i a b l e>UG</ V a r i a b l e> <Term>F a i l </Term>

</Clause></Consequent>

</Rule></RuleBase>

Page 157: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

144 M.-H. Wang et al.

on the major trends of Fig. 7, the behavior of the proposed FML-based universityassessment system meets the criteria defined by the HEEACT [5]; that is, the higherthe values of affected factors, the higher the passing possibility of the universitygoal. Hence, the proposed approach is feasible for the university evaluation.

Table 3 Partial fuzzy inference rules for assessing university goal

NoInput Variables Output Variable

SWOTA DP SCA AO DD DI UG

1 Pass Pass Pass Pass Pass Pass Pass

2 Pass Pass Pass Pass Pass Fail Pass

3 Pass Pass Pass Pass Fail Pass Pass

4 Pass Pass Pass Pass Fail Fail Conditional

5 Pass Pass Pass Fail Pass Pass Pass

6 Pass Pass Pass Fail Pass Fail Conditional

7 Pass Pass Pass Fail Fail Pass Conditional

8 Pass Pass Pass Fail Fail Fail Conditional

9 Pass Pass Fail Pass Pass Pass Pass

10 Pass Pass Fail Pass Pass Fail Conditional

11 Pass Pass Fail Pass Fail Pass Conditional

12 Pass Pass Fail Pass Fail Fail Conditional

13 Pass Pass Fail Fail Pass Pass Conditional

14 Pass Pass Fail Fail Pass Fail Conditional

15 Pass Pass Fail Fail Fail Pass Conditional

... ... ...

56 Fail Fail Pass Fail Fail Fail Fail

57 Fail Fail Fail Pass Pass Pass Conditional

58 Fail Fail Fail Pass Pass Fail Fail

59 Fail Fail Fail Pass Fail Pass Fail

60 Fail Fail Fail Pass Fail Fail Fail

61 Fail Fail Fail Fail Pass Pass Fail

62 Fail Fail Fail Fail Pass Fail Fail

63 Fail Fail Fail Fail Fail Pass Fail

64 Fail Fail Fail Fail Fail Fail Fail

Page 158: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Applying FML-Based Fuzzy Ontology to University Assessment 145

Fig. 4 Screenshot of the web-based university assessment system for NUTN

Fig. 5 Screenshot for assessing the university goal

Fig. 6 Screenshot of the inferred assessing results of the university goal

Page 159: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

146 M.-H. Wang et al.

Fig. 7 Surface view for FML-based university assessment system (a) Inputs (SCA andDP)/output (UG), (b) Inputs (SWOTA and DD/output (UG), (c) Inputs (AO and DI)/output(UG), and (d) Inputs (DP, DD)/output (UG)

5 Conclusions

This chapter applied the FML to represent the knowledge base and rule base offuzzy ontology. Additionally, the FML-based university assessment system is con-structed at NUTN to support the evaluation of the university. The simulation resultsshow that the proposed approach is workable for the higher education institutes. Inthe future, it is hoped to improve the performance of the university assessment sys-tem by adding the genetic algorithm, and extend the developed tool to the highereducation institutes to simulate the evaluated results of other domain areas in theuniversity assessment.

Acknowledgements. The authors would like to thank the National Science Council of Tai-wan for financially supporting this international cooperation research project under the grantNSC99-2911-I-024-004, NSC99-2622-E-024-003-CC3, NSC98-2221-E-024-009-MY3, andNSC99-2631-S-011-002. In addition, the authors also would like to express their thanks to(1) Mr. Chin-Yuan Hsu, Dr. Giovanni Acampora, and Prof. Vincenzo Loia for providing the

Page 160: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Applying FML-Based Fuzzy Ontology to University Assessment 147

developed FML editors for simulating the university assessment, and (2) National Universityof Tainan in Taiwan, HAMASTAR TECHNOLOGY CO., LTD. in Taiwan, and University ofEssex in UK for their supporting this research project.

References

1. Acampora, G., Gaeta, M., Loia, V., Vasilakos, A.V.: Interoperable and adaptive fuzzyservices for ambient intelligence applications. ACM Transactions on Autonomous andAdaptive Systems 5(2), 1–26 (2010)

2. Acampora, G., Loia, V.: Using FML and fuzzy technology in adaptive ambient intelli-gence environments. International Journal of Computational Intelligence Research 1(2),171–182 (2005)

3. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive do-motic framework. IEEE Transactions on Industrial Informatics 2, 97–111 (2005)

4. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelli-gence. Information Sciences 178(3), 631–646 (2008)

5. Higher Education Evaluation and Accreditation Council of Taiwan (2010),http://www.heeact.edu.tw/mp.asp?mp=4

6. Lee, C.S., Jian, Z.W., Huang, L.K.: A fuzzy ontology and its application to news sum-marization. IEEE Transactions on Systems, Man, and cybernetics, Part B: Cybernet-ics 35(5), 859–880 (2005)

7. Lee, C.S., Kao, Y.F., Kao, Y.H., Wang, M.H.: Automated ontology construction for un-structured text documents. Data and Knowledge Engineering 60(3), 547–566 (2007)

8. Lee, C.S., Wang, M.H., Chen, J.J.: Ontology-based intelligent decision support agent forCMMI project monitoring and control. International Journal of Approximate Reason-ing 48(1), 62–76 (2008)

9. Lee, C.S., Wang, M.H., Acampora, G., Hsu, C.Y., Hagras, H.: Diet assessment based ontype-2 fuzzy ontology and fuzzy markup language. International Journal of IntelligentSystem 25(12), 1187–1216 (2010)

10. Lee, C.S., Wang, M.H., Wu, M.H., Hsu, C.Y., Lin, Y.C., Yen, S.J.: A type-2 fuzzy per-sonal ontology for meeting scheduling system. In: 2010 IEEE World Congress on Com-putational Intelligence (IEEE WCCI 2010), pp. 18–23 (2010)

11. Wang, M.H., Lee, C.S., Hsieh, K.L., Hsu, C.Y., Acampora, G., Chang, C.C.: Ontology-based multi-agents for intelligent healthcare applications. Journal of Ambient Intelli-gence and Humanized Computing 1(2), 111–131 (2010)

Page 161: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

A Type-2 FML-Based Fuzzy Ontology forDietary Assessment

Mei-Hui Wang, Chang-Shing Lee, Zhi-Wei Chen, Hani Hagras, Su-E Kuo,Hui-Ching Kuo, and Hui-Hua Cheng

Abstract. Diabetes and cardiovascular diseases have gradually become one of theworld’s top ten fatal causes of death for the past few years. As far as the diet isconcerned, it is easy to find out how to eat healthily and which food is good forpeople on the Internet. The diet behavior is highly personalized and also associatedwith the culture and religion. In this chapter, the type-2 FML-based fuzzy ontologyis introduced. Moreover, the food ontology and type-2 fuzzy dietary ontology arefurther applied to the dietary assessment. Additionally, with the technologies of thetype-2 fuzzy sets and fuzzy inference approach based on FML, the dietary healthylevel is obtained to give users a reference for their eating. Experimental results showthat the proposed approach is feasible to evaluate the dietary healthy level for thecollected meal records.

1 Introduction

In health education clinic, sometimes dietary assessment carried out face-to-facewith a patient is time-consuming for the researcher or clinician [21]. For this reason,

Mei-Hui Wang · Chang-Shing Lee · Zhi-Wei ChenDept. of Computer Science and Information Engineering,National University of Tainan, Taiwane-mail: {mh.alice.wang,a301203034}@gmail.com,

[email protected]

Hani HagrasThe Computational Intelligence Centre,School of Computer Science and Electronic Engineering, University of Essex, UKe-mail: [email protected]

Su-E Kuo · Hui-Hua Cheng · Hui-Ching KuoDept. of Nutritional Service, National Cheng Kung University Hospital, Taiwane-mail: {iris,susan,n941272}@mail.ncku.edu.tw

G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 149–168.DOI: 10.1007/978-3-642-35488-5_9 c© Springer-Verlag Berlin Heidelberg 2013

Page 162: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

150 M.-H. Wang et al.

a computer-assisted dietary assessment system with standardization of the question-ing sequence, immediate results, and increased flexibility is a good choice for thehealth practitioners to allow them to focus their time on the nutritional needs of theindividual rather than the coding and sorting of the dietary data [23]. Additionally,the computer-assisted systems can provide recommendations based on an individ-ual’s usual eating habits, food preferences, and state of change [22]. Consequently,Probst et al. [21] designed a meal-based framework to allow patients with diabetesto self-report their dietary information for individualized dietary prescription. Leeet al. proposed a novel fuzzy ontology to apply to diet assessment [16] and an in-telligent ontology-based agent system for diabetic food recommendation [17] [15].Wang et al. [25] proposed an intelligent ontological multi-agent system for healthydiet planning. Lee and Wag [12] proposed a fuzzy expert system for diabetes deci-sion support application.

People’s diet is deeply affected by the culture, religion, and lifestyle. Each per-son has a specific eating habit such that the diet behavior is highly personalized.The ontology model could support us to determine individual dietary status to pro-pose the most suitable and healthy dietary pattern for each individual. The researchcommunity of the ontology has spent considerable effort making these ontology lan-guages a formal semantic and completely unambiguous. Recently, the research onthe ontology has been popularized widely in many research fields such as knowl-edge management, semantic Web, business-to-business applications, multi-agentsystems, database design, software engineering, and several other application ar-eas [5]. For example, Gutierrez et al. [9] proposed the ontology of virtual humans toincorporate semantics into human shapes. Lee et al. presented a fuzzy ontology toapply to news summarization [9] and also proposed a novel episode-based ontologyconstruction mechanism to extract domain ontology from unstructured text docu-ments [11]. Chau [6] proposed ontology-based knowledge management system forflow and water quality modeling. Francisco et al. [8] developed an ontology-basedintelligent web portal to provide more intelligent matches between job offers andcandidates’ curricula.

Type-2 fuzzy sets (T2FSs) are originally introduced by Zadeh [26]. The defini-tions of type-2 fuzzy sets and type-2 fuzzy logic system are described with higheruncertainties. T2FSs can provide additional design degrees of freedom in Mam-dani and Takagi-Sugeno-Kang (TSK) fuzzy logic systems (FLSs). They can be veryuseful when the systems are with lots of uncertainties [14]. T2FSs also have beenapplied several applications where Zarandi et al. [22] proposed type-2 fuzzy rule-based expert system model for stock price analysis, Miller and John [20] devel-oped an interval type-2 fuzzy multiple echelon supply chain model, and Yimin andJing [20] applied type-2 fuzzy mathematical modeling to analyze dynamical behav-iors of complex ecosystems. Lee et al. [13] proposed a diet assessment system basedon type-2 fuzzy ontology and type-2 fuzzy markup language (FML2), a type-2 fuzzylogic extension of FML [1] [2] [3] [4].

Page 163: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

A Type-2 FML-Based Fuzzy Ontology for Dietary Assessment 151

Nowadays, owing to the popularity of the Internet, it is easy to retrieve the diet-related information from the website to increase the knowledge of the diet. Gen-erally speaking, most people know that eating healthily is very important to livein a high-quality life but they don’t exactly know whether what they have eaten ishealthy or not. This is because the diet is very complicated, highly uncertain, anddeeply affected by many external factors. For example, 2200 kcal/day is enough foran adult with the average levels of physical activity, but 2200 kcal/day is too muchfor a weight-losing person. Additionally, according to the dieticians, they just cangive an approximately value rather than a precise value to describe the nutritionfacts of each food. Consequently, this chapter combines the type-2 fuzzy sets andthe ontology model to propose a type-2 fuzzy ontology.

In this chapter, we present a type-2 FML-based fuzzy ontology for dietary as-sessment system to analyze the dietary healthy level for the collected meal recordsfrom the involved subjects. The experimental results indicate that the proposed sys-tem is feasible to analyze the dietary healthy level for the subjects’ meal records.The remainder of this chapter is structured as follows. The definition of fuzzy on-tology is introduced in Sect. 2. The type-2 FML-based fuzzy ontology for dietaryassessment system is described in Sect. 3. The experiment results are shown in Sect.4. Conclusions are finally drawn in Sect. 5.

2 Definition of Fuzzy Ontology

This chapter introduces a type-2 FML-based fuzzy ontology to describe the fuzzyconcepts and fuzzy relations in the dietary domain which is an extension version ofthe domain ontology [11] and fuzzy ontology [9] proposed by our previous researchworks. The definition of fuzzy ontology is first introduced. The type-2 fuzzy dietaryontology is then developed based on the proposed fuzzy ontology [9] [11] [12].

2.1 Fuzzy Ontology [12]

A fuzzy ontology (ΩF ) is a knowledge representation model for describing the do-main knowledge that is with uncertainty. It is an extension of the domain ontologyand contains five layers, including a fuzzy information layer, a fuzzy group rela-tion layer, a fuzzy group domain layer, a fuzzy individual relation layer, and a fuzzyindividual domain layer. The concepts and relations of the fuzzy ontology are con-structed by fuzzy variables and fuzzy numbers, respectively. That is, a fuzzy variableincluding some fuzzy numbers is used to represent a fuzzy concept. In addition, therelations in the fuzzy group relation layer and the fuzzy individual relation layer areconstructed by the fuzzy numbers [12].

Page 164: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

152 M.-H. Wang et al.

Fig. 1 Structure of the fuzzy ontology

Fig. 1 shows the structure of the fuzzy ontology. The fuzzy group relation layercontains p fuzzy group relations, such as ℜ≥FG1 , . . . , and ℜ≥FGp . The fuzzy groupdomain layer has n fuzzy group domains (FGDs), including FGD1, . . . , and FGDn.Each FGD is composed of various fuzzy individual domains (FIDs), for instance,if FGD1 comprises i FIDs, then we denote them as FID11,. . . , and FID1i, respec-tively. The fuzzy individual relation layer has q relations, like ℜ=FG1 , . . . , andℜ=FGq . The final layer, fuzzy individual domain layer, has r FIDs, for example,FID1,. . . , and FIDr. The detailed introduction about the proposed fuzzy ontologywill be introduced as follows.

1. A fuzzy information layer contains the fuzzy information domain name, variouscategories of the fuzzy domain, and fuzzy concept sets. The concept sets con-tains some fuzzy variables. Each fuzzy variable in the concept sets has somefuzzy numbers to describe the characteristics of the fuzzy variable.

2. A fuzzy group relation, denoted by ℜ≥FG, is an extension of instance-of re-lation that describes the “greater than” relationship between the fuzzy con-cept in the fuzzy information layer and its specific instance in the fuzzy groupdomain layer using a fuzzy number. For a fuzzy concept set IC of the fuzzy

Page 165: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

A Type-2 FML-Based Fuzzy Ontology for Dietary Assessment 153

information layer and an instance set IG of the fuzzy group domain layer, anysubset of IC × IG is called an ℜ≥FG from IC to IG.

3. The ℜ≥FG on a IC × IG is called fuzzy reflexive if for all fuzzy concept pairs(Ci,Cj) in IC × IG, where Ci is in the set IC, Cj is in the set IG, and Ci =Cj, wedenote that (Ci,Cj) ∈ IC × IG, (Ci,Cj) ∈ ℜ≥FG.

4. The ℜ≥FG on a IC × IG is called fuzzy anti-symmetric if for all fuzzy conceptpairs (Ci,Cj) in IC × IG, where Ci is in the set IC, Cj is in the set IG, we denotethat (Ci,Cj), (Ci,Cj) ∈ IC × IG, Ciℜ≥FGCj , and Ciℜ≥FG =⇒CjCi =Cj.

5. For a IC × IG, an ℜ≥FG on a IC × IG is called fuzzy transitive, if for all fuzzyconcept pairs (Ci,Cj) in IC × IG, where Ci is in the set IC and Cj is in the set IG,we denote that (Ci,Cj), (Cj ,Ck), (Ck,Ci) ∈ IC × IG, (Ci,Cj) ∈ ℜ≥FG, (Cj ,Ck) ∈ℜ≥FG =⇒ (Ci,Ck) ∈ ℜ≥FG.

6. A fuzzy group relation ℜ≥FG is called a fuzzy partial order relation if ℜ≥FG isfuzzy reflexive, fuzzy anti-symmetric, and fuzzy transitive.

7. A fuzzy group domain layer is a specific fuzzy information layer, includingthe concepts of the instances with specific properties and the similar relationdefined in the fuzzy ontology.

8. A fuzzy individual relation, denoted by ℜ=FI , is an extension of instance-ofrelation that describes the relationship between the fuzzy concept in the fuzzygroup domain layer and its specific instance in the fuzzy individual domainlayer using a fuzzy number. For a fuzzy concept set IG of the fuzzy group do-main layer and an instance set II of the fuzzy individual domain layer, anysubset of IG × II is called an ℜ=FI from IG to II .

9. The ℜ=FI on a IG × II is called fuzzy reflexive if for all fuzzy concept pairs(Ci,Cj) in IC × IG, where Ci is in the set IC, Cj is in the set IG, and Ci =Cj, wedenote that (Ci,Cj) ∈ IC × IG, (Ci,Cj) ∈ ℜ=FI .

10. The ℜ=FI on a IG × II is called fuzzy symmetric if for all fuzzy concept pairs(Ci,Cj) in IC × IG, where Ci is in the set IC, Cj is in the set IG, we denotethat (Ci,Cj) ∈ ℜ=FI =⇒ (Cj ,Ci) ∈ ℜ=FI , for all fuzzy concept pairs (Ci,Cj),(Cj,Ci) ∈ IC × IG.

11. For a IG × II , an ℜ=FI on a IG × II is called fuzzy transitive, if for all fuzzyconcept pairs (Ci,Cj) in IC × IG, where Ci is in the set IC and Cj is in the set IG,we denote that (Ci,Cj), (Cj ,Ck), (Ck,Ci) ∈ IG × II , (Ci,Cj) ∈ ℜ=FI , (Cj,Ck) ∈ℜ=FI =⇒ (Ci,Ck) ∈ ℜ=FI .

12. A fuzzy individual relation ℜ=FI is called a fuzzy equivalence relation if ℜ=FI

is fuzzy reflexive, fuzzy symmetric, and fuzzy transitive.13. A fuzzy Individual domain layer is a specific fuzzy information layer, including

the concepts of the instance with the same fuzzy number properties defined inthe fuzzy ontology.

2.2 Type-2 Fuzzy Set

Because the words mean different things to different people, hence the type-2 fuzzylogic systems (T2FLS) have the potential to provide better performance than a

Page 166: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

154 M.-H. Wang et al.

type-1 FLS (T1FLS) when such linguistic uncertainties are presented [14]. A T2FS,denoted A is characterized by a type-2 membership function (MF) μA(x,u), anddenoted by Eq. 1, where x ∈ X and u ∈ Jx ⊆ [0,1], 0 ≤ μA(x,u) ≤ 1. A can alsoexpressed by Eq. 2 for discrete universes of discourse. When all μA(x,u) = 1, thenA is an interval T2FS (IT2FS) [14].

A = {((x,u),μA(x,u))|∀x ∈ X ,u ∈ Jx ⊆ [0,1]} (1)

A = ∑x∈X

∑u∈Jx

μA(x,u)(x,u)

(2)

Fig. 2 Type-2 trapezoidal membership function

Fig. 2 shows a trapezoidal type-2 fuzzy set A. The upper membership function(UMF) and lower membership function (LMF) are completely bounded the shadedregion, called the footprint of uncertainty (FOU) [14] [13]. The UMF is associatedwith the upper bound of FOU(A) and is denoted by UMF(A) or μ A(x), where ∀x ∈X . The Lower MF (LMF) is associated with the lower bound of FOU(A) and isdenoted by LMF(A) or μ

A(x), where ∀x ∈ X . A is represented by the following

parameters on the x-axis and is denoted by Eq. 3. That is, unlike a type-1 fuzzy setwhose membership degree is a crisp value in [0,1], a type-2 membership grade canbe described as any fuzzy subset in [0,1]. This fuzzy subset is called the primarymembership. And, for each primary membership, there is a secondary grade thatdefines the possibility for the primary membership [20].

A = {μA(x),μ A(x)} = {[a,b,c,d], [e, f ,g,h]} (3)

Page 167: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

A Type-2 FML-Based Fuzzy Ontology for Dietary Assessment 155

Fig. 3 Structure of fuzzy diet ontology

Page 168: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

156 M.-H. Wang et al.

2.3 Type-2 Fuzzy Diet Ontology

Fig. 3 displays the structure for type-2 fuzzy diet ontology, and its brief descriptionsare as follows.

• Fuzzy diet layer: In the fuzzy diet layer, the domain name is type-2 fuzzy dietontology. The categories are Underweight, Normal, Overweight, and Obesity.Additionally, some fuzzy variables and fuzzy numbers represent the fuzzy con-cepts, including PCC (Percentage of Calories from Carbohydrate), FVPCC, PCP(Percentage of Calories from Protein), FVPCP, PCF (Percentage of Caloriesfrom Fat), FVPCF , CD (Caloric Difference), FVCD, FGB (Food Group Balance),FVFGB, DHL (Dietary Healthy Level), and FVDHL. For instance, fuzzy conceptPCC has an attribute set {FNPCC, ValuePCC}. Fuzzy variable FVPCC is derivedfrom fuzzy concept PCC and has an attribute set {FNPCC Low, FNPCC Medium, andFNPCC High}, which represents the knowledge of FVPCC.

• Fuzzy group relation layer: In this layer, there are various relations such asℜ≥FGFGB1

and ℜ≥FGFGB6. For instance, ℜ≥FGFGB1

describes a situation in whicha “the number of six food groups that the meal contains is greater than 1” re-lationship exists between the fuzzy concept FGB in the fuzzy diet layer and itsspecific instances in the fuzzy group diet layer.

• Fuzzy group diet layer: In this layer, it is a specific fuzzy diet layer and containsthe concepts of the instances. Each group is composed of some instances withsimilar value of the actual diet healthy level. The extended instance-of relationℜ≥FGFGB3

is used to describe that the FGB values of these three specific instancesFID1i, FIDn1, and FIDn j are greater than 3.

• Fuzzy individual relation layer: This layer also has some relations like , ℜ=FIFGB2,

. . . , and ℜ=FIFGB6. For instance, ℜ=FIFGB3

represents a situation in which a “thenumber of six food groups that the meal contains equals about 3” relationship ex-ists between the fuzzy concept FGB in the fuzzy group diet layer and its specificinstance FID1 in the fuzzy individual diet layer [14].

• Fuzzy individual diet layer: It is a specific fuzzy individual diet layer. Take FID1

for an example, its values of the PCC, PCP, PCF , CD, and FGB are 65.7%,18.7%, 15.6%, 467.1kcal, and 2.8, respectively. The extended instance-of re-lation ℜ=FGFGB28

is used to describe that the FGB values of the both specificinstances FID1i and FID1 are 2.8.

3 Type-2 FML-Based Dietary Assessment System

This section utilizes the predefined food ontology and fuzzy diet ontology to per-form the type-2 FML-based dietary assessment. The system structure is first in-troduced. The food nutrition facts database and type-2 FML-based fuzzy inferencemechanism are described are follows.

Page 169: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

A Type-2 FML-Based Fuzzy Ontology for Dietary Assessment 157

Fig. 4 The structure of the type-2 FML-based dietary assessment system

3.1 Structure of the Proposed System

Fig. 4 shows the structure of the type-2 FML-based dietary assessment system. First,the nutrition facts for some popular food eaten in Taiwan are collected from the In-ternet, convenient stores, and nutrition books. Second, the dieticians confirm anddefine the nutrition facts, and then store them into the food nutrition facts database.The information about each food’s nutrition facts contains the amount of variousnutrients, calories, portion size, and servings of six food groups. Third, based on thefood nutrition facts database, the ontology engineering constructs the type-2 fuzzyontology, including food ontology and type-2 fuzzy dietary ontology, and type-2FML (FML2). Additionally, the involved subjects’ brief personal profiles includ-ing height, weight, age, sex, and body mass index (BMI), are also built. Fourth, theinvolved subjects are routinely requested to input eaten items each day through anotebook, cell phone, personal digital assistant (PDA), or personal computer. Af-terwards, the proposed type-2 fuzzy ontology-based dietary assessment operates asfollows:

1. The ingredients extraction mechanism retrieves the nutrition facts of each eatenitem from the food ontology.

2. The nutrients analysis mechanism diagnoses the percentage of calories fromcarbohydrates, proteins, and fats for one meal.

3. The calorie computation mechanism calculates the caloric difference betweenactual calories people consume and planned caloric intake set by dieticians.

4. The balance evaluation mechanism is to consider the balance of six food groups.That is, the more food group the eaten food contains, the more balanced theeaten food is.

Page 170: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

158 M.-H. Wang et al.

5. The type-2 fuzzy inference mechanism based on FML infers the dietary healthylevel of the eaten food based on the predefined ontology and outputs from steps1 to 4.

6. Finally, the dietary healthy level is stored into the dietary assessment reposi-tory and validated by the dieticians to evaluate the performance of the proposedapproach.

Table 1 Well-balanced diet for an adult Taiwanese

Six Food Groups Serving Size Amount/day

Grains & Starches 1 serving=1/4 bowl of cooked rice (50g) 3-6 bowls

Vegetables 1 serving=1 dish (about 100g) raw vegetables 3 dishes

Fruits 1 serving=1 medium orange 2 servings

Milk 1 serving=1 cup (240cc) milk 1∼2 cup(s)

Meats & Proteins 1 serving=1 egg 4∼5 servings

Fats 1 serving=2 tablespoons of vegetable oil 2∼3 spoons

3.2 Food Nutrition Facts

The information of the food nutrition facts, including serving size, calories, andnutrient information, can vary with each food product. The nutrients in foods containvitamins B, calcium, carbohydrate, fat, fiber, sodium, protein, vitamin A, etc. Thebody’s main source of energy comes from carbohydrate, protein, and fat. Therefore,the percentage of calories from carbohydrate (PCC), percentage of calories fromprotein (PCP), and percentage of calories from fat (PCF) are considered to be oneof the features of healthy dietary assessment. The suggested percentages of caloriesfrom carbohydrate, protein, and fat are 55-65%, 10-20%, and 25-35%, respectively,for one-day meal. According to dieticians, PCF is more important than PCC andPCP. The closer to the suggested percentages the values of PCC, PCP, and PCF ,the healthier the eaten food is.

According to dieticians, a healthy and well-balanced diet is to eat the right quan-tity and variety of foods from each of the main food groups every day. From thisviewpoint, how to balance the energy between intake and burn is very important.The Harris-Benedict Equation [7] is used to calculate each person’s daily calorie re-quirements based on each person’s height, weight, age, sex, and activity level. Baseon predefined ontology, we can know the actual calories intake from the collectedmeal records. The smaller the caloric difference (CD) between the planned dailycaloric intake and actual daily caloric intake, the healthier the eaten food is. Thefeature of CD is especially important for those who are losing weight or need toconsider the weight management such as diabetes.

Page 171: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

A Type-2 FML-Based Fuzzy Ontology for Dietary Assessment 159

Another key point to have a healthy and well-balanced meal is to try your bestto cover six food groups for your one-day eaten food as possible as you can. Thesix food groups are Grains & Starches, Vegetables, Fruits, Milk, Meats & Proteins,and Fats. Following the food pyramid to eat can help you to choose from a varietyof foods so you can get the nutrients you need, and the suggested serving sizes canhelp you control the amount of calories, fat, or sodium in your diet. Table 1 lists afood pyramid example of a well-balanced diet for an adult Taiwanese for one day.The more the eaten food covers the number of six food groups is, the more balancedthe eaten food is. As a result, the input of the proposed system also takes food groupbalance (FGB) into consideration. For dieticians, FGB is the most important featureto decide if your eaten meal is healthy or not.

Table 2 Parameters of Type-2 fuzzy sets stored in the knowledge base of Type-2 FML

Fuzzy Variable Linguistic Term T2FS as {[a, b, c, d], [e, f, g, h]}

PCC

˜Low {[0, 0, ,35 ,40], [0, 0, 35, 50]}˜Medium {[45, 50, 55, 60,] [35 50 55 65]}˜High {[65, 70, 100, 100], [60, 70, 100, 100]}

PCP

˜Low {[0, 0, 5, 10], [0, 0, 5, 15]}˜Medium {[10, 15, 20, 25], [5, 15, 20, 30]}˜High {[25, 30, 100, 100], [20, 30, 100, 100]}

PCF

˜Low {[0, 0, 10, 15], [0, 0, 10, 20]}˜Medium {[15, 20, 25, 30], [10, 20, 25, 35]}˜High {[35, 40, 100, 100], [30, 40, 100, 100]}

CD

˜Low {[0, 0, 60, 70], [0, 0, 60, 100]}˜Medium {[90, 100, 160, 170], [60, 100, 160, 200]}˜High {[190, 200, 300, 300], [160, 200, 300, 300]}

FGB

˜Low {[0, 0, 2, 2.5], [0, 0, 2, 3]}˜Medium {[2.5, 3, 4, 4.5], [2, 3, 4, 5]}˜High {[4.5, 5, 6, 6], [4, 5, 6, 6]}

DHL

˜VeryLow {[0, 0, 2, 2.5], [0, 0, 2, 3]}˜Low {[2.5, 3, 4, 4.5], [2, 3, 4, 5]}˜Medium {[4.5, 5, 6, 6.5], [4, 5, 6, 7]}˜High {[6.5, 7, 8, 8.5], [6, 7, 8, 9]}˜VeryHigh {[8.5, 9, 10, 10], [8, 9, 10, 10]}

3.3 Type-2 Fuzzy Inference Mechanism

In the type-2 fuzzy inference mechanism based on FML, five attributes, namelyPCC, PCF , PCP, CD, and FGB, are chosen as the input fuzzy variables of the

Page 172: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

160 M.-H. Wang et al.

adopted fuzzy rule-based inference and the related information about fuzzy num-bers is stored in the FML-based fuzzy ontology. The output fuzzy variable is DHL,which describes the healthy level of the eaten food. Tuned and validated by thedieticians, the parameters of the fuzzy numbers are presented in Table 2. It showsthat PCC, PCP, and PCF have three linguistic terms, namely ˜Low, ˜Medium and

˜High. If the values of the PCC, PCP, and PCF approach to ˜Medium, it means thatthe percentages of eaten-meal calories from carbohydrate, protein, and fat are muchmore balanced, respectively.

Fig. 5 Type-2 fuzzy sets stored in the knowledge base of Type-2 FML for fuzzy variables (a)PCC, (b) PCP, (c) PCF , (d) CD, (e) FGB, and (f) DHL

For fuzzy variable CD, there are three linguistic terms, including ˜Small, ˜Mediumand ˜Large, to express concepts and knowledge of CD. The FGB fuzzy variable de-fines three linguistic terms, namely ˜Low, ˜Medium and ˜High, to represent the levelthat the eaten food covers six food groups. The output fuzzy variable is DHL withfive linguistic terms, namely ˜VeryLow, ˜Low, ˜Medium, ˜High and ˜VeryHigh. If theDHL value is large, the membership degree for the dietary healthy level is high. Ad-ditionally, the Karnik-Mendel (KM) algorithm [13] is used to compute the centroidsof type-2 fuzzy sets. Figs. 5(a)-5(f) show the type-2 fuzzy sets of the fuzzy variables

Page 173: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

A Type-2 FML-Based Fuzzy Ontology for Dietary Assessment 161

PCC, PCP, PCF , CD, FGB, and DHL, respectively. Table 3 lists part of the fuzzyrules, which are constructed by the domain experts, where the highest priority isFGB, then PCF , PCC, PCP, and CD. Fig. 6 shows the structure of the type-2 fuzzyinference mechanism based on FML. Listings 1 and 2 respectively show partial ofknowledge base and rule base of the type-2 fuzzy markup language.

Table 3 Parts of the constructed fuzzy rules stored in rule base of Type-2 FML

Rule Input Fuzzy Variable Output Fuzzy VariableNo PCC PCP PCF CD FGB DHL

1 ˜Low ˜Low ˜Low ˜Small ˜Low ˜VeryLow2 ˜Low ˜Low ˜Low ˜Small ˜Medium ˜Low3 ˜Low ˜Low ˜Low ˜Small ˜High ˜Medium4 ˜Low ˜Low ˜Low ˜Medium ˜Low ˜VeryLow5 ˜Low ˜Low ˜Low ˜Medium ˜Medium ˜VeryLow6 ˜Low ˜Low ˜Low ˜Medium ˜High ˜Low7 ˜Low ˜Low ˜Low ˜Large ˜Low ˜VeryLow8 ˜Low ˜Low ˜Low ˜Large ˜Medium ˜VeryLow9 ˜Low ˜Low ˜Low ˜Large ˜High ˜Low10 ˜Low ˜Low ˜Medium ˜Small ˜Low ˜Low11 ˜Low ˜Low ˜Medium ˜Small ˜Medium ˜Medium12 ˜Low ˜Low ˜Medium ˜Small ˜High ˜High13 ˜Low ˜Low ˜Medium ˜Medium ˜Low ˜VeryLow14 ˜Low ˜Low ˜Medium ˜Medium ˜Medium ˜Low15 ˜Low ˜Low ˜Medium ˜Medium ˜High ˜Medium

. . . . . . . . .

234 ˜High ˜High ˜Medium ˜Large ˜High ˜Medium235 ˜High ˜High ˜High ˜Small ˜Low ˜VeryLow236 ˜High ˜High ˜High ˜Small ˜Medium ˜Low237 ˜High ˜High ˜High ˜Small ˜High ˜Medium238 ˜High ˜High ˜High ˜Medium ˜Low ˜VeryLow239 ˜High ˜High ˜High ˜Medium ˜Medium ˜VeryLow240 ˜High ˜High ˜High ˜Medium ˜High ˜Medium241 ˜High ˜High ˜High ˜Large ˜Low ˜VeryLow242 ˜High ˜High ˜High ˜Large ˜Medium ˜VeryLow243 ˜High ˜High ˜High ˜Large ˜High ˜Low

4 Experiments and Results

We have conducted several experiments which focus on people who are aged from20 to 30 years old and with the average levels of physical activity. Seven students of

Page 174: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

162 M.-H. Wang et al.

Ontology Application & software Engineering (OASE) Lab. of National Universityof Tainan (NUTN) in Taiwan were involved in this experiment. They recorded theirthree meals from Monday to Friday for twenty days. Therefore, 60 records werecollected for each subject. In this chapter, we take subjects 1 and 2 as examples todescribe the experiments. Table 4 shows the nutrition facts for the collected food perportion. Table 5 shows part of the collected food’s servings of six food groups perportion. Table 6 lists the ten collected meal records for subjects 1 and 2 and eachsubject contains five meals.

Listing 1 Partial knowledge base of the type-2 fuzzy markup language

<?xml v e r s i o n =” 1 . 0 ”?><F u z z y C o n t r o l l e r i p =” l o c a l h o s t ”>

<KnowledgeBase i p =” l o c a l h o s t ”><T ype2FuzzyVar iab le d o m a i n l e f t =”0” d o m a i n r i g h t =” 100 ” i p =” l o c a l h o s t ”

name=”PCC” s c a l e =” percentage ” t y p e =”INPUT”><Type2FuzzyTerm name=”Low”>

<Type2TrapezoidShape><UMF param1=”0” param2=”0” param3=”35” param4=”50” /><LMF param1=”0” param2=”0” param3=”35” param4=”40” />

</Type2TrapezoidShape></Type2FuzzyTerm><Type2FuzzyTerm name=”Medium”>

<Type2TrapezoidShape><UMF param1=”35” param2=”50” param3=”55” param4=”65” /><LMF param1=”45” param2=”50” param3=”55” param4=”60” />

</Type2TrapezoidShape></Type2FuzzyTerm><Type2FuzzyTerm name=”High ”>

<Type2TrapezoidShape><UMF param1=”60” param2=”70” param3=”100 ” param4=” 100 ” /><LMF param1=”65” param2=”70” param3=”100 ” param4=” 100 ” />

</Type2TrapezoidShape></Type2FuzzyTerm>

</ T ype2FuzzyVar iab le><T ype2FuzzyVar iab le d o m a i n l e f t =”0” d o m a i n r i g h t =” 100 ” i p =” l o c a l h o s t ”

name=”PCP” s c a l e =” percentage ” t y p e =”INPUT”><Type2FuzzyTerm name=”Low”>

<Type2TrapezoidShape><UMF param1=”0” param2=”0” param3=”5” param4=”15” /><LMF param1=”0” param2=”0” param3=”5” param4=”10” />

</Type2TrapezoidShape></Type2FuzzyTerm><Type2FuzzyTerm name=”Medium”>

<Type2TrapezoidShape><UMF param1=”5” param2=”15” param3=”20” param4=”30” /><LMF param1=”10” param2=”15” param3=”20” param4=”25” />

</Type2TrapezoidShape></Type2FuzzyTerm><Type2FuzzyTerm name=”High ”>

<Type2TrapezoidShape><UMF param1=”20” param2=”30” param3=”100 ” param4=” 100 ” /><LMF param1=”25” param2=”30” param3=”100 ” param4=” 100 ” />

</Type2TrapezoidShape></Type2FuzzyTerm>

</ T ype2FuzzyVar iab le>. . .

</KnowledgeBase></ F u z z y C o n t r o l l e r >

Page 175: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

A Type-2 FML-Based Fuzzy Ontology for Dietary Assessment 163

Listing 2 Partial rule base of the type-2 fuzzy markup language

<?xml v e r s i o n =” 1 . 0 ”?><F u z z y C o n t r o l l e r i p =” l o c a l h o s t ”>. . . .<RuleBase a c t i v a t i o n M e t h o d=”MIN” andMethod=”MIN” orMethod=”MAX”

t y p e =”mamdani” i p =” l o c a l h o s t ”><Rule c o n n e c t o r =”AND” i p =” l o c a l h o s t ” w e i g h t =”1” name=”R1”>

<Anteceden t><Clause>

<V a r i a b l e>PCC</ V a r i a b l e> <Term>Low</Term></Clause><Clause>

<V a r i a b l e>PCP</ V a r i a b l e> <Term>Low</Term></Clause><Clause>

<V a r i a b l e>PCF</ V a r i a b l e> <Term>Low</Term></Clause><Clause>

<V a r i a b l e>CD</ V a r i a b l e> <Term>Small</Term></Clause><Clause>

<V a r i a b l e>FGB</ V a r i a b l e> <Term>Low</Term></Clause>

</ An teceden t><Consequent>

<Clause><V a r i a b l e>DHL</ V a r i a b l e> <Term>VeryLow</Term>

</Clause></Consequent>

</Rule><Rule c o n n e c t o r =”AND” i p =” l o c a l h o s t ” w e i g h t =”1” name=”R243”>

<Anteceden t><Clause>

<V a r i a b l e>PCC</ V a r i a b l e> <Term>High</Term></Clause><Clause>

<V a r i a b l e>PCP</ V a r i a b l e> <Term>High</Term></Clause><Clause>

<V a r i a b l e>PCF</ V a r i a b l e> <Term>High</Term></Clause><Clause>

<V a r i a b l e>CD</ V a r i a b l e> <Term>Large</Term></Clause><Clause>

<V a r i a b l e>FGB</ V a r i a b l e> <Term>High</Term></Clause>

</ An teceden t><Consequent>

<Clause><V a r i a b l e>DHL</ V a r i a b l e> <Term>VeryLow</Term>

</Clause></Consequent>

</Rule></RuleBase>

</ F u z z y C o n t r o l l e r >

Table 7 shows the inputs and outputs of the proposed method. Additionally, it alsolists the evaluated results from three dieticians and their mean value. It is observedthat meals 1 and 8 have much larger difference between the proposed method andthe dieticians. However, the caloric difference is also the first two high for meals 1and 8. According to the membership functions for fuzzy variable CD, we know if

Page 176: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

164 M.-H. Wang et al.

Fig. 6 Structure of type-2 fuzzy inference mechanism based on Type-2 FML

the CD value is over 300 kcal, the caloric difference is very large for our proposedmethod. Nevertheless, from the viewpoint of the dieticians, it will not affect thedietary healthy level if one common person eats a few calories for one meal unlessthe CD value is extremely unreasonable or this person keeps ingesting excessive

Table 4 Nutrition facts for the collected food per portion

No Item Calorie (kcal) Carbohydrate (g) Protein (g) Fat (g)

1 Sushi 289 47.5 13.5 5.0

2 Beef Noodles 531 75.0 24.0 15.0

3 Hot Pot with Seafood 596.5 65.0 33.5 22.5

4 Spaghetti with Pork Sauce 689 90.0 26.0 25.0

5 Wonton Soup 186 15.0 9.0 10.0

6 Pan-fried Pork Pie 301.5 22.5 13.5 17.5

7 Laver Soup with Egg 59 0.0 3.5 5.0

8 Lemon Juice with Kumquat 240 60.0 0.0 0.0

9 Dumpling 431.5 45.0 23.5 17.5

10 Creamed Corn Soup 161.6 22.5 4.4 6.0

11Porridge with Lean Meat

440.5 60.0 22.0 12.5and Preserved Egg

12 Spring Pancake 202.8 18.5 9.7 10.0

13 Sesame Paste Noodles 538.3 61.0 11.7 27.5

14 Hamburger with Chicken 440 45.0 20.0 20.0

15 Lemon Black Tea 150 37.5 0.0 0.0

Page 177: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

A Type-2 FML-Based Fuzzy Ontology for Dietary Assessment 165

Table 5 Servings of Six food groups per portion

No Item

Six Food Groups

Grains &Vegetables Fruits Milk

Meats &Fats

Starches Proteins

1 Sushi 3.0 0.5 0.0 0.0 1.0 0.0

2 Beef Noodles 5.0 0.0 0.0 0.0 2.0 1.0

3 Hot Pot with Seafood 4.0 1.0 0.0 0.0 3.5 1.0

4 Spaghetti with Pork Sauce 6.0 0.0 0.0 0.0 2.0 3.0

5 Wonton Soup 1.0 0.0 0.0 0.0 1.0 1.0

6 Pan-fried Pork Pie 1.5 0.0 0.0 0.0 1.5 2.0

7 Laver Soup 0.0 0.0 0.0 0.0 0.5 0.5

8 Lemon Juice with Kumquat 4.0 0.0 1.0 0.0 0.0 0.0

9 Dumpling 3.0 0.0 0.0 0.0 2.5 1.0

10 Creamed Corn Soup 1.5 0.0 0.0 0.0 0.2 1.0

11Porridge with Lean Meat

4.0 0.0 0.0 0.0 2.0 0.5and Preserved Egg

12 Spring Pancake 1.0 0.7 0.0 0.0 1.0 1.0

13 Sesame Paste Noodles 4.0 0.2 0.0 0.0 0.5 5.0

14 Hamburger with Chicken 3.0 0.0 0.0 0.0 2.0 2.0

15 Lemon Black Tea 2.5 0.0 0.0 0.0 0.0 0.0

Table 6 Partial collected meal records for two subjects

MealContent (Portions)

No

1 Sushi (1.5)

2 Beef Noodles (1)

3 Hot Pot with Seafood (1)

4 Spaghetti with Pork Sauce (1) and Wonton Soup (1)

5 Pan-fried Pork Pie (3), Laver Soup with Egg (1), and Lemon Juice with Kumquat (1)

6 Dumpling (1) and Creamed Corn Soup (1)

7 Porridge with Lean Meat and Preserved Egg (1)

8 Spring Pancake (1)

9 Sesame Paste Noodles (1)

10 Hamburger with Chicken (1), Creamed Corn Soup (1), and Lemon Black Tea (1)

or insufficient calories for a longer time like one month. Next is to observe thevariances of the mean square error (MSE), calculated by Eq. 4, between our methodand dieticians. The MSE values between the proposed method and dieticians 1, 2,and 3 are 3.01, 2.15, and 2.38, respectively. The MSE value for the three-dieticianmean evaluated results is 2.11, which indicates that the MSE has been reduced.

Page 178: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

166 M.-H. Wang et al.

Consequently, it is likely to give different evaluated results for the domain expertseven the evaluated data are identical, which shows that the diet is very complicatedand suitable to use T2FS to solve the problem.

MSE =1n

n

∑i=1

e2i (4)

where n is the total number of meals, and e is the outcome difference between theproposed method and dieticians.

Table 7 Inputs and Outputs of proposed method and dieticians

Meal No

Inputs Outputs

PCC PCP PCF CD FGB DHL

% % % kcalOur Dietician

Method 1 2 3 Mean

1 65.7 18.7 15.6 467.1 2.8 3.42 6 5 6 5

2 56.5 18.1 25.4 369.6 3.0 7.48 6 5 5 5

3 43.6 22.5 33.9 304.1 4.0 4.46 8 7 5 6

4 48.0 16.0 36.0 25.6 3.0 4.05 5 4 3 4

5 42.4 14.6 43.0 302.9 3.0 2.39 4 2 3 3

6 45.5 18.8 35.7 33.0 3.0 4.51 6 5 5 5

7 54.5 20.0 25.5 185.6 2.5 6.53 6 5 5 5

8 36.5 19.1 44.4 423.3 3.7 2.31 4 4 4 4

9 45.3 8.7 46.0 87.8 2.7 3.44 4 4 5 4

10 55.9 13.0 31.1 125.5 3.0 4.46 4 4 4 4

5 Conclusions

In this chapter, the property of the fuzzy ontology and a type-2 FML-based dietaryassessment system are proposed. Based on the viewpoint from dieticians, the per-centage of calories from carbohydrate, the percentage of calories from protein, thepercentage of calories from fat, and six food groups balance are considered as oneof the features to evaluate if the eaten food is healthy or not. From the experimen-tal results, it shows that the proposed approach is feasible for dietary assessment.Additionally, owning to the change of the lifestyle, more and more processed foodis generated to meet modern-people requirements. However, the natural food (freshfruit juice) is much healthier than processed food (packaged fruit juice) even withthe same provided calories and nutrients. This is because the valuable nutrients con-tained in the raw food will be definitely partially washed away after the food is pro-cessed. Consequently, the food-processed level and the genetic learning machinewill be considered to improve the experimental results in the future.

Page 179: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

A Type-2 FML-Based Fuzzy Ontology for Dietary Assessment 167

Acknowledgements. This work is supported by the National Science Council of Taiwan un-der the grant NSC99-2911-I-024-004 and NSC98-2221-E-024-009-MY3. The authors wouldlike to thank National University of Tainan in Taiwan and University of Essex in UK for theirsupporting this research project.

References

1. Acampora, G., Gaeta, M., Loia, V., Vasilakos, A.V.: Interoperable and adaptive fuzzyservices for ambient intelligence applications. ACM Transactions on Autonomous andAdaptive Systems 5(2), 1–26 (2010)

2. Acampora, G., Loia, V.: Using FML and fuzzy technology in adaptive ambient intelli-gence environments. International Journal of Computational Intelligence Research 1(2),171–182 (2005)

3. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive do-motic framework. IEEE Transactions on Industrial Informatics 1(2), 97–111 (2005)

4. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelli-gence. Information Sciences 178(3), 631–646 (2008)

5. Brewster, C., O’Hara, K., Fuller, S., Wilks, Y., Franconi, E., Musen, M.A., Ellman, J.,Shum, S.B.: Knowledge representation with ontologies: the present and future. IEEEIntelligent Systems 19(1), 72–81 (2004)

6. Chau, K.W.: An ontology-based knowledge management system for flow and water qual-ity modeling. Engineering Software 38(3), 172–181 (2006)

7. Frankenfield, D.C., Muth, E.R., Rowe, W.A.: The harris-benedict studies of human basalmetabolism: history and limitations. Journal of the American Dietetic Association 98(4),439–445 (1998)

8. Garca-Snchez, F., Martnez-Bjar, R., Contreras, L., Fernndez-Breis, J.T., Castellanos-Nieves, D.: An ontology-based intelligent system for recruitment. Expert Systems withApplications 31(2), 248–263 (2006)

9. Gutierrez, M., Rojas, A.G., Thalmann, D., Vexo, F., Moccozet, L., Thalmann, N.M.,Mortara, M., Spagnuolo, M.: An ontology of virtual humans: incorporating seman-tics into human shapes. Visual Computing: International Journal of Computer Graph-ics 23(3), 207–218 (2007)

10. Lee, C.S., Jian, Z.W., Huang, L.K.: A fuzzy ontology and its application to news sum-marization. IEEE Transactions on Systems, Man, and Cybernetics, Part B: Cybernet-ics 35(5), 859–880 (2005)

11. Lee, C.S., Kao, Y.F., Kuo, Y.H., Wang, M.H.: Automated ontology construction for un-structured text documents. Data & Knowledge Engineering 60(3), 547–566 (2007)

12. Lee, C.S., Wang, M.H.: A fuzzy expert system for diabetes decision support application.IEEE Transactions on Systems, Man, and Cybernetics Part B: Cybernetics 41(1), 139–153 (2011)

13. Lee, C.S., Wang, M.H., Acampora, G., Hsu, C.Y., Hagras, H.: Diet assessment based ontype-2 fuzzy ontology and fuzzy markup language. International Journal of IntelligentSystem 25(12), 1187–1216 (2010)

14. Lee, C.S., Wang, M.H., Acampora, G., Loia, V., Hsu, C.Y.: Ontology-based intelligentfuzzy agent for diabetes application. In: Proc. of the 2009 IEEE Symposium on Com-putational Intelligence for Intelligent Agent (IEEE SSCI 2009), Nashville, USA, March30-April 2 (2009)

Page 180: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

168 M.-H. Wang et al.

15. Lee, C.S., Wang, M.H., Hagras, H.: A type-2 ontology and its application to personal dia-betic diet recommendation. IEEE Transactions on Fuzzy Systems 18(2), 374–395 (2010)

16. Lee, C.S., Wang, M.H., Hsu, C.Y., Hagras, H.: A novel fuzzy ontology and its applicationto diet assessment. In: Proc. of the 2009 IEEE/WIC/ACM International Conferences onWeb Intelligence (WI 2009) and Intelligent Agent Technology (IAT 2009), Milan, Italy,September 15-18 (2009)

17. Lee, C.S., Wang, M.H., Li, H.C., Chen, W.H.: Intelligent ontological agent for diabeticfood recommendation. In: Proc. of the 2008 IEEE World Congress on ComputationalIntelligence (WCCI 2008), Hong Kong, Junuary 1-6 (2008)

18. Mendel, J.M.: Type-2 fuzzy sets and systems: an overview. IEEE Computational Intelli-gence Magazine 2(l), 20–29 (2007)

19. Mendel, J.M., John, R.I., Liu, F.: Interval Type-2 Fuzzy Logic Systems Made Simple.IEEE Transactions on Fuzzy Systems 14(6), 808–821 (2006)

20. Miller, S., John, R.: An interval type-2 fuzzy multiple echelon supply chain model.Knowledge-Based Systems 23(4), 363–368 (2010)

21. Probst, Y.C., Farajil, S., Batterham, M., Steel, D.G., Tapsell, L.C.: Computerized dietaryassessments compare well with interviewer administered diet histories for patients withtype 2 diabetes mellitus in the primary healthcare setting. Patient Education and Coun-seling 72(1), 49–55 (2008)

22. Probst, Y.C., Tapsell, L.C.: Overview of computerized dietary assessment programs forresearch and practice in nutrition education. Nutrition. Journal of Nutrition Educationand Behavior 37(1), 20–26 (2005)

23. Probst, Y.C., Tapsell, L., Batterham, M.: Relationships between patient age and BMIand use of a self-administered computerised dietary assessment in a primary healthcaresetting. Journal of Food Composition and Analysis 21(1), 56–59 (2008)

24. Yimin, L., Jing, H.: Type-2 fuzzy mathematical modeling and analysis of the dynami-cal behaviors of complex ecosystems. Simulation Modelling Practice and Theory 16(9),1379–1391 (2008)

25. Wang, M.H., Lee, C.S., Hsieh, K.L., Hsu, C.Y., Chang, C.C.: Intelligent ontologicalmulti-agent for healthy diet planning. In: Proc. of the 2009 IEEE International Con-ference on Fuzzy System (FUZZ-IEEE 2009), Jeju Island, Korea, August 19-24 (2009)

26. Zadeh, L.A.: The concept of a linguistic variable and its application to approximate rea-soning. Information Sciences 8(3), 199–249 (1975)

27. Zarandi, M.H.F., Rezaee, B., Turksen, I.B., Neshat, E.: A type-2 fuzzy rule-based expertsystem model for stock price analysis. Expert Systems with Applications 36(1), 139–154(2009)

Page 181: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

A Type-2 FML-Based Meeting SchedulingSupport System

Chang-Shing Lee, Mei-Hui Wang, Ming-Kai Su, Min-Hsiang Wu, and Hani Hagras

Abstract. Scheduling meetings in organizations involves many considerations suchas scheduling conflicts and even personal preferences. The host of an organizationalmeeting typically expends substantial time conferring with potential attendees todetermine the optimal time slot. To minimize the time and effort required for thisscheduling process, this chapter introduces a novel type-2 FML-based personal on-tology, a type-2 meeting scheduling ontology, and a decision supported system. TheFuzzy markup language (FML) is also used to describe the knowledge base and rulebase of the proposed meeting scheduling system, and a fuzzy inference mechanismis then used to infer the probability of attendance for each potential attendee. Finally,the system generates a semantic description that indicates the estimated probabilityof attendance for each potential attendee. The experimental results show that theproposed approach is feasible for meeting scheduling.

1 Introduction

Many organizations require frequent meetings to establish internal standards, proce-dures, and other regulations. Meetings are also important for providing organization-related activities, descriptions, and so on. However, before successfully hosting ameeting, the host must consider the preferences, scheduling conflicts, and other con-straints of potential attendees by calling them, emailing them, or even by speaking

Chang-Shing Lee · Mei-Hui Wang · Ming-Kai Su · Min-Hsiang WuDept. of Computer Science and Information Engineering,National University of Tainan, Taiwane-mail: [email protected],

{mh.alice.wang,devil74825,izumo19831006}@gmail.comHani HagrasThe Computational Intelligence Centre, School of Computer Science andElectronic Engineering, University of Essex, UKe-mail: [email protected]

G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 169–186.DOI: 10.1007/978-3-642-35488-5_10 c© Springer-Verlag Berlin Heidelberg 2013

Page 182: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

170 C.-S. Lee et al.

to them directly. Unfortunately, this task can be quite tedious and time-consumingand may require several rounds of negotiations among several people regarding themeeting date, time, and place before a meeting is finally scheduled [7]. These per-sonal issues can be considered personal hidden knowledge. From the managementviewpoint, how to present and then reuse the acquired personal hidden knowledgeis very significant for the knowledge management. Nevertheless, ontology is a goodway to present and reuse the hidden personal knowledge.

An ontology defines the application domain items that provide a shared and com-mon understanding of some domain, an ontology is also a set of terms, including theirconcepts, properties, and relations [24], and an ontology is an essential element inmany applications, including agent systems, knowledge management systems, ande-commerce platforms. For example, Buitelaar et al. [6] presented an ontology-basedinformation system for extracting and integrating heterogeneous data resources suchas plain texts, tables, and image captions. Sourouni et al. [19] proposed an ontology-based government knowledge repository to support the change, transformation, andevolution of e-Government. Zhang et al. [23] adopted ontology technologies to en-hance terminology extraction from documents. The ontology developed by Sanchezet al. [18] to represent recruitment domain knowledge has been used to guide appli-cation designs and to provide systems with semantic capabilities. Orgun and Vu [16]proposed an ontology based on health level seven reference information model (HL7-RIM) to manage patient information in a healthcare organization. Lee et al. [9] de-veloped a fuzzy ontology for summarizing news.

Integrating agent technology with ontology is also an important research issue. Asystem with both ontology and agent technologies becomes much smarter than theone without ontology so that it can make some decisions regarding organizationalactivities. The extensive literature on agent technology includes Sabar et al. [17],who developed a multi-agent approach for solving personal scheduling problemsin assembly centers by minimizing operational costs and personal dissatisfactions.Many studies applied ontology and agent in researches are also increasingly grow-ing in the world, for example, Lee et al. proposed a fuzzy decision agent [10] and agenetic fuzzy agent for meeting scheduling systems [8]. Type-2 fuzzy sets (T2FSs)provide additional design freedom in traditional fuzzy logic systems (FLSs) and canbe very useful in systems are with many uncertainties [14]. Zarandi et al. [22] de-veloped a type-2 fuzzy rule-based expert system for stock price analysis, Miller andJohn [15] introduced an interval type-2 fuzzy logic model for a multiple echelonsupply chain, Yimin and Jing [20] used a type-2 fuzzy mathematical model to ana-lyze the dynamical behavior of complex ecosystems, and Lee et al. [12] proposed atype-2 fuzzy ontology and its application to personal diabetic-diet recommendation.

Meeting scheduling involves numerous considerations, including personal con-straints, preferences, and even personal constraint. The process of optimizing ameeting schedule for most invitees often requires substantial time and effort. Chunet al. [7] therefore developed novel preference estimation techniques for optimizingmeeting scheduling in agent-based environments. Benhassine and Ho [5] developeda scalable agent-based approach for solving dynamic meeting scheduling problems

Page 183: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

A Type-2 FML-Based Meeting Scheduling Support System 171

with preferences. Wainer et al. [21] presented four meeting scheduling protocols formulti-agent negotiations.

This chapter proposes a meeting scheduling system that combines type-2 fuzzysets and an ontology model to create a type-2 fuzzy ontology. The experimentalresults confirm the feasibility of the proposed method, and the inferred results pro-vide a reference for meeting hosts. The rest of this chapter is organized as follows.Sect. 2 describes the type-2 fuzzy set, the type-2 FML-based personal ontology, andthe type-2 FML-based meeting scheduling ontology. Sect. 3 introduces the FML-based meeting scheduling system. Sect. 4 presents the experimental results. Finally,conclusions are drawn in Sect. 5.

2 Type-2 FML-Based Personal Ontology

This section introduces a type-2 fuzzy set, a type-2 FML-based personal ontology,and a type-2 FML-based meeting scheduling ontology for the proposed schedulingsystem.

2.1 Type-2 Fuzzy Set

Because the words mean different things to different people, hence the type-2 fuzzylogic systems (T2FLS) have the potential to provide better performance than a type-1 FLS (T1FLS) when such linguistic uncertainties are presented [14]. A T2FS,denoted A, is characterized by a type-2 membership function (MF) μA(x,u), anddenoted by Eq. 1, where x ∈ X and u ∈ Jx ⊆ [0,1], 0 ≤ μA(x,u) ≤ 1. A can alsoexpressed by Eq. 2 for discrete universes of discourse. When all μA(x,u) = 1, thenA is an interval T2FS (IT2FS) [14].

A = {((x,u),μA(x,u))|∀x ∈ X ,u ∈ Jx ⊆ [0,1]} (1)

A = ∑x∈X

∑u∈Jx

μA(x,u)(x,u)

(2)

Fig. 1 shows a trapezoidal type-2 fuzzy set A. The upper membership function(UMF) and lower membership function (LMF) are completely bounded the shadedregion, called the footprint of uncertainty (FOU) [14] [13]. The UMF is associ-ated with the upper bound of FOU(A) and is denoted by UMF(A) or μ A(x), where∀x ∈ X . The Lower MF (LMF) is associated with the lower bound of FOU(A) andis denoted by LMF(A) or μ

A(x), where ∀x ∈ X . A is represented by the following

parameters on the x-axis and is denoted by Eq. 3. That is, unlike a type-1 fuzzy setwhose membership degree is a crisp value in [0,1], a type-2 membership grade canbe described as any fuzzy subset in [0,1]. This fuzzy subset is called the primary

Page 184: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

172 C.-S. Lee et al.

Fig. 1 Type-2 trapezoidal membership function

membership. And, for each primary membership, there is a secondary grade thatdefines the possibility for the primary membership [20].

A = {μA(x),μ A(x)} = {[a,b,c,d], [e, f ,g,h]} (3)

2.2 Type-2 FML-Based Personal Ontology

This section describes the type-2 FML-based personal ontology for the meetingscheduling system presented in Fig. 2. The system supports the meeting host inselecting suitable meeting times for invitees. The meeting scheduling probleminvolves substantial uncertainty because many personal elements must be con-sidered. The following example of a meeting schedule generated for universitylaboratory members demonstrates the proposed system. Each laboratory memberassumedly performs many activities simultaneously, including research, course-work, and leisure activities. Unfortunately, however, scheduling conflicts may oc-cur. Therefore, invitees may decide whether or not to participate in activities basedon their personal preferences and personal calendars. Based on the above concept,Fig. 2 shows the type-2 FML-based personal ontology constructed by the domainexpert. The four-layer ontology includes a domain layer, category layer, conceptlayer, and instance layer. The domain name is Type-2 Fuzzy Personal Ontology.Some categories, namely, Research, Course, and Leisure, are included in the cate-gory layer. The concept layer includes various concepts such as Time, Place, Activ-ity, Conflicting Activity, and Meeting Role. Each concept has numerous attributes.For example, the concept Meeting Role has attributes attendee priority (AP), meet-ing subject preference (MSP), conflicting activity priority (CAP), meeting forcingdegree (MFD), and meeting time length (MTL). Various instances such as MeetingType and Restaurant are located in the instance layer. Assume that the ontology inFig. 2 is the personal ontology for meeting scheduling for a student, Vincent, who

Page 185: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

A Type-2 FML-Based Meeting Scheduling Support System 173

is an attendee and a host for a Lab. meeting and a farewell party. The time of thesetwo activities conflicts, so he must choose which to attend. In a word, scheduling ameeting is still very difficult for a man, not to mention for an agent.

Fig. 2 Type-2 FML-based personal ontology

2.3 Type-2 FML-Based Meeting Scheduling Ontology

The type-2 FML-based meeting scheduling ontology in Fig. 3 includes a domainlayer, category layer, sub-category layer, concept layer, and type-2 fuzzy set layer.The domain name is type-2 FML-based meeting scheduling ontology. The fourmeeting types in the category layer are Regular Meeting, Department Meeting,Research Meeting, and Administrative Meeting. Various sub-categories are storedin the sub-category layer of the type-2 FML-based personal ontology for each at-tendee. For example, invitees 3, 4, and 5 are expected to attend a Department Meet-ing. Invitees 4, 5, and 6 are expected to attend a Research Meeting. Hence, invitees4 and 5 may be professors because they must attend both department and researchmeetings. For example, a professor tells his secretary, “I would like to hold a two-hour meeting to discuss research approaches with Vincent, Jay, Eddie, . . . , sometimenext week in room B215. Next Saturday afternoon is preferable.”

Page 186: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

174 C.-S. Lee et al.

Fig. 3 Type-2 FML-based meeting scheduling ontology

In this example, some meeting-related information could be abstracted, such asthe host, the invitees, the subject, the length, the time, and the place of the meeting.It also reveals the personal preferences for the meeting time, place, and duration.Moreover, the prioritization of the meeting for each attendee and the enforcementof their attendance at the meeting are indicated. Here, for example, Vincent, Jay,and Eddie must attend the meeting whereas other members such as Joyce can at-tend the meeting if and when they are available. Thus, numerous fuzzy variablessuch as Meeting Subject Preference (MSP) and Meeting Time Length (MTL), whichare located in the concept layer that store essential meeting information. Moreover,various fuzzy linguistic terms are located in the type-2 fuzzy set layer. For example,the fuzzy variable MTL has two fuzzy linguistic terms, Short and Long. Jennifer,who is the secretary for Professor Lee, can determine the Meeting Attendance Pos-sibility (MAP) for each potential attendee based on the AP, MSP, CAP, MFD, andMTL information. The secretary can then assign suitable time slots for invitees and,finally, report the scheduled-meeting in-formation to Professor Lee and the Lab.members.

Page 187: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

A Type-2 FML-Based Meeting Scheduling Support System 175

3 FML-Based Meeting Scheduling System

The structure and the knowledge base of the decision supported system for the type-2 FML-based meeting scheduling system are introduced in the four sub-sectionsbelow.

Fig. 4 Type-2 FML-based meeting scheduling system

3.1 Type-2 FML-Based Meeting Scheduling System

Fig. 4 shows the type-2 FML-based meeting scheduling system, including a decisionsupported system, a type-2 FML-based meeting scheduling ontology, and varioustype-2 FML-based personal ontologies. The type-2 FML-based meeting schedul-ing ontology and the type-2 FML-based personal ontologies are pre-defined by thedomain experts. The proposed system operates as follows:

1. The host asks his personal agent to submit a meeting request.2. The personal agent of the host sends the meeting-related information, such as

the subject, time, and place, to the decision-supported system.3. The scheduling mechanism notifies the host and personal agents of all invitees

to retrieve meeting preferences and schedules for future activities from theirown type-2 FML-based personal ontology.

4. The scheduling mechanism organizes all retrieved meeting-related informationto construct the type-2 FML-based meeting scheduling ontology for all poten-tial attendees. Meanwhile, the domain experts also help to confirm the con-structed type-2 FML-based meeting scheduling ontology.

5. The meeting scheduling mechanism retrieves the generated type-2 FML-basedmeeting scheduling ontology to obtain invitee schedules and preferences.

6. If none of the potential attendees have a scheduling conflict with the meeting,the meeting scheduling mechanism reports the results to the personal agent ofthe host. Otherwise, the agent negotiates with each personal agent.

Page 188: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

176 C.-S. Lee et al.

7. If the negotiation is successful, the meeting negotiation mechanism sends theresults back to the personal agent of the host.

8. If the negotiation fails, the meeting negotiation mechanism passes the meeting-related information to the fuzzy inference mechanism to infer the meeting at-tendance possibility for each invitee.

9. The sentence extraction mechanism transforms the inferred results into a se-mantic sentence and sends the results to the host.

10. The host announces the final meeting-related information such as the confirmedinvitees, the pre-defined meeting time, and the pre-defined meeting place to thefinal attendees.

3.2 Knowledge Base for Type-2 FML-Based Meeting SchedulingSystem

The Fuzzy Markup Language (FML) can manage fuzzy concepts, fuzzy rules, anda fuzzy inference engine [1] [2] [3] [4]. The FML is implemented using eXten-sible Markup Language (XML) and is used to exploit typical XML tools as theXML Schema and the extensible style-sheet language transformations (XSLT). Theknowledge base describes fuzzy concepts, including fuzzy variables, fuzzy terms,and membership functions of fuzzy sets, whereas the rule base describes the fuzzyrule set, including the antecedent and consequent rules. Fig. 5 shows the structure ofthe fuzzy markup language for the type-2 FML-based meeting scheduling system.The structure includes five input fuzzy variables, AP, MSP, CAP, MFD, and MTL,one output fuzzy variable, MAP, and 162 fuzzy rules. Listing 1 lists the FML for

Fig. 5 FML structure for type-2 FML-based meeting scheduling system

Page 189: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

A Type-2 FML-Based Meeting Scheduling Support System 177

Listing 1 Partial knowledge base of the type-2 fuzzy markup language

<?xml v e r s i o n =” 1 . 0 ”?><F u z z y C o n t r o l l e r i p =” l o c a l h o s t ”>

<KnowledgeBase i p =” l o c a l h o s t ”><T ype2FuzzyVar iab le d o m a i n l e f t =”0” d o m a i n r i g h t =”10” i p =” l o c a l h o s t ”

name=”AP” s c a l e =” Degree ” t y p e =”INPUT”><Type2FuzzyTerm name=”Low”>

<Type2TrapezoidShape><UMF param1=”0” param2=”0” param3=”0” param4=”4” /><LMF param1=”0” param2=”0” param3=”0” param4=”3” />

</Type2TrapezoidShape></Type2FuzzyTerm>

<Type2FuzzyTerm name=”Medium”><Type2TrapezoidShape>

<UMF param1=”2” param2=”4” param3=”6” param4=”8” /><LMF param1=”3” param2=”4” param3=”6” param4=”7” />

<Type2TrapezoidShape></Type2FuzzyTerm><Type2FuzzyTerm name=”High ”>

<Type2TrapezoidShape><UMF param1=”6” param2=”10” param3=”10” param4=”10” /><LMF param1=”8” param2=”10” param3=”10” param4=”10” />

<Type2TrapezoidShape></Type2FuzzyTerm>

</ T ype2FuzzyVar iab le>. . .</KnowledgeBase><RuleBase name=”RB1” a c t i v a t i o n M e t h o d=”MIN” t y p e =”mamdani” i p =” l o c a l h o s t ”>

<Rule c o n n e c t o r =”AND” i p =” l o c a l h o s t ” w e i g h t =”1” name=”R1”><Anteceden t>

<Clause><V a r i a b l e>AP</ V a r i a b l e><Term>Low</Term>

</Clause><Clause>

<V a r i a b l e>MSP</ V a r i a b l e><Term>Low</Term>

</Clause><Clause>

<V a r i a b l e>CAP</ V a r i a b l e><Term>Low</Term>

</Clause><Clause>

<V a r i a b l e>MFD</VARIABLE><Term>Low</Term>

</Clause><Clause>

<V a r i a b l e>MTL</ V a r i a b l e><Term>Shor t </Term>

</Clause></ An teceden t><Consequent>

<Clause><V a r i a b l e>MAP</ V a r i a b l e><Term>Low</Term>

</Clause></Consequent>

</Rule>. . . . . . .

</RuleBase></ F u z z y C o n t r o l l e r >

Page 190: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

178 C.-S. Lee et al.

Fig. 6 Structure of fuzzy inference mechanism

Fig. 7 Type-2 fuzzy sets for fuzzy variables (a) AP, (b) MSP, (c) CAP, (d) MFD, (e) MTL,and (f) MAP

Page 191: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

A Type-2 FML-Based Meeting Scheduling Support System 179

the type-2 FML-based meeting scheduling system, which stores related informationfrom the knowledge base and rule base of the proposed type-2 FML-based meetingscheduling system. Each fuzzy variable is described in detail below.

• Attendee Priority (AP) represents the overall importance of the attendee to themeeting. The higher the AP, the more important the attendee.

• Meeting Subject Preference (MSP) indicates the meeting subject that the attendeeprefers. The higher the MSP, the more the attendee prefers the meeting subjects.

• Conflicting Activity Priority (CAP) indicates the importance of conflicting activ-ities from the perspective of the attendee. The higher the CAP is, the higher thepriority of the conflicting activity is.

• Meeting Forcing Degree (MFD) represents the enforcement of meeting atten-dance. When MFD tends towards low, it means that it doesn’t matter whetherthis person can attend the meeting or not. On the contrary, when MFD tendstowards high, it means that the degree of being forced to attend the meeting isgradually becoming high.

• Meeting Time Length (MTL) denotes the duration of the meeting. The larger theMTL is, the longer the meeting is.

• Meeting Attendance Possibility (MAP) is the possibility of attending the meetingfor each attendee.

Table 1 Parameters of the type-2 fuzzy sets

Fuzzy Variable Linguistic Term T2FS as {[a, b, c, d], [e, f, g, h]}

AP

Low {[0, 0, 0, 3], [0, 0, 0, 4]}Medium {[3, 4, 6, 7], [2, 4, 6, 8]}

High {[8, 10, 10, 10], [6, 10, 10, 10]}

MSP

Low {[0, 0, 0, 3], [0, 0, 0, 4]}Medium {[4, 4, 5, 6], [3, 4, 5, 7]}

High {[6, 10, 10, 10], [5, 10, 10, 10]}

CAP

Low {[0, 0, 0, 4], [0, 0, 0, 5]}Medium { [3, 4, 7, 7], [2, 4, 7, 8] }

High {[7, 10, 10, 10], [6, 10, 10, 10] }

MFD

Low {[0, 0, 2, 3], [0, 0, 2, 4]}Medium {[4, 5, 5, 6], [3, 5, 5, 7]}

High {[7, 9, 10, 10], [6, 9, 10, 10]}

MTLShort {[0, 0, 0, 2], [0, 0, 0, 3.5]}Long {[2.5, 5, 5, 5], [2, 5, 5, 5]}

MAP

Low {[0, 0, 0, 0.3], [0, 0, 0, 0.4]}Medium {[0.4, 0.4, 0.6, 0.6], [0.3, 0.4, 0.6, 0.7]}

High {[0.7, 1, 1, 1], [0.6, 1, 1, 1]}

Page 192: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

180 C.-S. Lee et al.

Table 2 Part of the fuzzy rules

Rule Input Fuzzy Variable Output Fuzzy Variable

No AP MSP CAP MFD MTL MAP

1 Low Low Low Low Short Low

2 Low Low Low Low Long Low

3 Low Low Low Medium Short Medium

4 Low Low Low Medium Long Low

5 Low Low Low High Short High

6 Low Low Low High Long High

7 Low Low Medium Low Short Low

8 Low Low Medium Low Long Low

9 Low Low Medium Medium Short Medium

10 Low Low Medium Medium Long Low

11 Low Low Medium High Short High

12 Low Low Medium High Long High

13 Low Low High Low Short Low

14 Low Low High Low Long Low

15 Low Low High Medium Short Medium

. . . . . . . . .

151 High High Low High Short High

152 High High Low High Long High

153 High High Medium Low Short High

154 High High Medium Low Long Medium

155 High High Medium Medium Short High

156 High High Medium Medium Long High

157 High High Medium High Short High

158 High High Medium High Long High

159 High High High Low Short Low

160 High High High Low Long Low

161 High High High Medium Short High

162 High High High Medium Long High

3.3 Fuzzy Inference Mechanism

Fig. 6 shows the structure of the fuzzy inference mechanism based on type-2 fuzzysets and fuzzy logic [13], which includes five components: type-2 FML-based ontol-ogy, fuzzifier, inference, type-reducer, and defuzzifier. The proposed type-2 FML-based ontology stores the established knowledge base and rule base that are providedby domain experts. Karnik-Mendel (KM) algorithms [13] are used to compute thecentroids of the type-2 fuzzy set.

Page 193: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

A Type-2 FML-Based Meeting Scheduling Support System 181

Fig. 6 also indicates that the five fuzzy input variables are AP, MSP, CAP, MFD,and MTL and that the output fuzzy variable is MAP. Figs. 7(a)-7(f) show the type 2fuzzy sets of the fuzzy variables AP, MSP, CAP, MFD, MTL, and MAP, respectively.Table 1 lists the parameters of the type 2 fuzzy sets. Table 2 gives examples of fuzzyrules, which are constructed by the domain experts. The MFD is considered the mostimportant feature when domain experts design the fuzzy rules, and the following isAP, CAP, MTL, and MSP.

3.4 Sentence Extraction Mechanism

Sentence extraction mechanism is responsible for represent the extracted sentencesbased on the possibility of each person’s attending meeting. Table 3 shows theadopted sentence patterns, including semantic description sentence and semanticdecision sentence. Tables 4 and 5 shows the extracted semantic sentences for atten-dance Nos. 2, 4, 17, 21, 79, and 90.

Table 3 Sentence patterns

The meeting held for this attendee that Attendee priority is [FNAP : Low, Medium, High],

meeting subject preference is [FNMSP : Low, Medium, High],

conflicting activity priority is [FNCAP : Low, Medium, High],

meeting forcing degree is [FNMFD : Low, Medium, High], and

meeting time length is [FNMTL : Short, Long].

Semantic Decision Sentence

The decision supported system judges that the meeting attendance possibility

of the attendee for this meeting is [FNMAP : Low, Medium, High].(Possibility: [0, 1])

4 Experiments and Results

The data used to test the proposed approach were attendance records for students,which were retrieved from the type-2 FML-based meeting scheduling ontology, andthe type-2 FML-based personal ontology from the ontology application & softwareengineering (OASE) laboratory of the National University of Tainan, Taiwan. Theproposed approach is evaluated in terms of accuracy and precision. Table 6 showsfour possible outcomes of a single prediction [11]. In this experiment, each OASEmember first gives the meeting attendance possibility as the desired output, andthen 0.6 is selected as the threshold value determining whether this attendee willparticipate in the meeting or not. Note that the threshold value denoted the member-ship degree threshold for MAP. If the desired output equals or exceeds 0.6, then theproposed approach infers that the candidate can attend the meeting. However, if the

Page 194: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

182 C.-S. Lee et al.

Table 4 Results of attendances Nos. 2, 4 and 17

Semantic Description for Attendee No. 2

AP MSP CAP MFD MTL

3 5 3 4 3

The meeting held for this attendee that Attendee priority is Low,

meeting subject preference is Medium, conflicting activity priority is Medium,

meeting forcing degree is Low, and meeting time length is Short.

T1FS: The decision support system judges that the meeting attendance possibility

of the attendee for this meeting is Medium.(Possibility: 0.5)

T2FS: The decision supported system judges that the meeting attendance possibility

of the attendee for this meeting is Medium.(Possibility: 0.36)

The domain experts justifies that the Meeting Attendance Possibility is Medium.

Semantic Description for Attendee No. 4

AP MSP CAP MFD MTL

7 1 6 9 1

The meeting held for this attendee that Attendee priority is Medium,

meeting subject preference is Low, conflicting activity priority is High,

meeting forcing degree is Medium, and meeting time length is Short.

T1FS: The decision supported system judges that the meeting attendance possibility

of the attendee for this meeting is High.(Possibility: 0.82)

T2FS: The decision supported system judges that the meeting attendance possibility

of the attendee for this meeting is High.(Possibility: 0.88)

The domain experts justifies that the Meeting Attendance Possibility is High.

Semantic Description for Attendee No. 17

AP MSP CAP MFD MTL

0 3 3 0 3

The meeting held for this attendee that Attendee priority is Low,

meeting subject preference is Low, conflicting activity priority is Low,

meeting forcing degree is Low, and meeting time length is Long.

T1FS: The decision supported system judges that the meeting attendance possibility

of the attendee for this meeting is Low.(Possibility: 0.18)

T2FS: The decision supported system judges that the meeting attendance possibility

of the attendee for this meeting is Low.(Possibility: 0.05)

The domain experts justifies that the Meeting Attendance Possibility is Low.

desired output is less than 0.6, the proposed approach infers that the attendee cannotattend. After finishing the classification, based on various interval thresholds [0.05,0.95], the curves for accuracy, precision, and recall are acquired according to Eqs.

Page 195: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

A Type-2 FML-Based Meeting Scheduling Support System 183

Table 5 Results of attendances Nos. 21, 79, and 90

Semantic Description for Attendee No. 21

AP MSP CAP MFD MTL

4 8 2 9 0.05

The meeting held for this attendee that Attendee priority is Medium,

meeting subject preference is High, conflicting activity priority is High,

meeting forcing degree is Low, and meeting time length is Short.

T1FS: The decision supported system judges that the meeting attendance possibility

of the attendee for this meeting is High.(Possibility: 0.81)

T2FS: The decision supported system judges that the meeting attendance possibility

of the attendee for this meeting is High.(Possibility: 0.95)

The domain experts justifies that the Meeting Attendance Possibility is High.

Semantic Description for Attendee No. 79

AP MSP CAP MFD MTL

10 1 9 1 2

The meeting held for this attendee that Attendee priority is High,

meeting subject preference is Low, conflicting activity priority is High,

meeting forcing degree is Low, and meeting time length is Short.

T1FS: The decision supported system judges that the meeting attendance possibility

of the attendee for this meeting is Low.(Possibility: 0.17)

T2FS: The decision supported system judges that the meeting attendance possibility

of the attendee for this meeting is Low.(Possibility: 0.36)

The domain experts justifies that the Meeting Attendance Possibility is Medium.

Semantic Description for Attendee No. 90

AP MSP CAP MFD MTL

8 6 7 2 0.05

The meeting held for this attendee that Attendee priority is High,

meeting subject preference is Medium, conflicting activity priority is Medium,

meeting forcing degree is Low, and meeting time length is Short.

T1FS: The decision supported system judges that the meeting attendance possibility

of the attendee for this meeting is Medium.(Possibility: 0.5)

T2FS: The decision supported system judges that the meeting attendance possibility

of the attendee for this meeting is Medium.(Possibility: 0.55)

The domain experts justifies that the Meeting Attendance Possibility is High.

4, 5 and 6, respectively. Fig.8 shows the accuracy, precision, and recall curves for alladopted experimental data. This figure reveals that accuracy and precision exceed90% when the threshold ranges between 0.55 and 0.85.

Page 196: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

184 C.-S. Lee et al.

Accuracy =(T N +TP)

(T P+TN +FP+FN)× 100% (4)

Precision =TP

(TP+FP)× 100% (5)

Recall =TP

(T P+FN)× 100% (6)

Table 6 Classification of results

Actual resultsPrediction results

Yes No

Yes T P (true positive) FN (false negative)

No FP (false positive) T N (true negative)

Fig. 8 Curves of the accuracy, precision, and recall

5 Conclusions

The type-2 FML-based personal ontology, the type-2 meeting scheduling ontology,and the decision supported system proposed in this chapter facilitate the schedulingprocess of an organizational meeting. Experimental results indicate that the pro-posed approach is feasible and practical for meeting scheduling. In the future, wewill add additional experimental data to further evaluate the performance of theproposed approach and investigate the application of a genetic algorithm for auto-matically learning membership functions.

Acknowledgements. This work is supported by the National Science Council of Taiwanunder the grant NSC99-2911-I-024-004, NSC98-2221-E-024-009-MY3, and NSC99-2631-S-011-002. The authors would like to thank National University of Tainan in Taiwan andUniversity of Essex in UK for their supporting this research project.

Page 197: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

A Type-2 FML-Based Meeting Scheduling Support System 185

References

1. Acampora, G., Gaeta, M., Loia, V., Vasilakos, A.V.: Interoperable and adaptive fuzzyservices for ambient intelligence applications. ACM Transactions on Autonomous andAdaptive Systems 5(2), 1–26 (2010)

2. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive do-motic framework. IEEE Transactions on Industrial Informatics 1(2), 97–111 (2005)

3. Acampora, G., Loia, V.: Using FML and fuzzy technology in adaptive ambient intelli-gence environments. International Journal of Computational Intelligence Research 1(3),171–182 (2005)

4. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelli-gence. Information Sciences 178(3), 631–646 (2008)

5. Benhassine, A., Ho, T.B.: An agent-based approach to solve dynamic meeting schedul-ing problem with preferences. Engineering Applications of Artif. Intell. 20(6), 857–873(2007)

6. Buitelaar, P., Cimiano, P., Frank, A., Hartung, M., Racioppa, S.: Ontology-based infor-mation extraction and integration from heterogeneous data sources. International Journalof Human-Computer Studies 66(11), 759–788 (2008)

7. Chun, A., Wai, H., Wong, R.Y.M.: Optimizing agent-based meeting scheduling throughpreference estimation. Engineering Applications of Artificial Intelligence 16(7-8), 727–743 (2003)

8. Lee, C.S., Jiang, C.C., Hsieh, T.C.: A genetic agent using ontology model for meetingscheduling system. Information Sciences 176(9), 1131–1155 (2006)

9. Lee, C.S., Jian, Z.W., Huang, L.K.: A fuzzy ontology and its application to news sum-marization. IEEE Transactions on Systems, Man, and Cybernetics, Part B: Cybernet-ics 35(5), 859–880 (2005)

10. Lee, C.S., Pan, C.Y.: An intelligent fuzzy agent for meeting scheduling decision supportsystem. Fuzzy Sets and Systems 142(3), 467–488 (2004)

11. Lee, C.S., Wang, M.H.: Ontology-based intelligent healthcare agent and its applicationto respiratory waveform recognition. Expert Systems with Applications 33(3), 606–619(2007)

12. Lee, C.S., Wang, M.H., Hagras, H.: A type-2 fuzzy ontology and its application to per-sonal diabetic-diet recommendation. IEEE Transactions on Fuzzy Systems 18(2), 374–395 (2010)

13. Mendel, J.M.: Type-2 fuzzy sets and systems: an overview. IEEE Computational Intelli-gence Magazine 2(l), 20–29 (2007)

14. Mendel, J.M., John, R.I., Liu, F.: Interval Type-2 Fuzzy Logic Systems Made Simple.IEEE Transactions on Fuzzy Systems 14(6), 808–821 (2006)

15. Miller, S., John, R.: An interval type-2 fuzzy multiple echelon supply chain model.Knowledge-Based Systems 23(4), 363–368 (2010)

16. Orgun, B., Vu, J.: HL7 ontology and mobile agents for interoperability in heterogeneousmedical information systems. Computers in Biology and Medicine 36(7-8), 817–836(2006)

17. Sabar, M., Montreuil, B., Frayret, J.M.: A multi-agent-based approach for person-nel scheduling in assembly centers. Engineering Applications of Artificial Intelli-gence 22(7), 1080–1088 (2009)

18. Sanchez, F.G., Bejar, R.M., Contreras, L., Breis, J.T.F., Nieves, D.C.: An ontology-basedintelligent system for recruitment. Expert Systems with Applications 31(2), 248–263(2006)

Page 198: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

186 C.-S. Lee et al.

19. Sourouni, A.M., Kourlimpinis, G., Mouzakitis, S., Askounis, D.: Towards the govern-ment transformation: An ontology-based government knowledge repository. ComputerStandards & Interfaces 32(1-2), 44–43 (2009)

20. Yimin, L., Jing, H.: Type-2 fuzzy mathematical modeling and analysis of the dynami-cal behaviors of complex ecosystems. Simulation Modelling Practice and Theory 16(9),1379–1391 (2008)

21. Wainer, J., Ferreira Jr, P.R.: Constantino Scheduling meetings through multi-agent nego-tiations. Decision Support Systems 44(1), 285–297 (2007)

22. Zarandi, M.H.F., Rezaee, B., Turksen, I.B., Neshat, E.: A type-2 fuzzy rule-based expertsystem model for stock price analysis. Expert Systems with Applications 36(1), 139–154(2009)

23. Zhang, W., Yoshida, T., Tang, X.: Using ontology to improve precision of terminologyextraction from documents. Expert Systems with Applications 36(5), 9333–9339 (2009)

24. Zhou, H., Chen, F., Yang, H.: Developing Application Specific Ontology for ProgramComprehension by Combining Domain Ontology with Code Ontology. In: Proceedingof the 2008 Eighth International Conference on Quality Software (QSIC 2008), Oxford,United Kingdom, pp. 225–234 (2008)

Page 199: [Studies in Fuzziness and Soft Computing] On the Power of Fuzzy Markup Language Volume 296 ||

Author Index

Acampora, Giovanni 17, 33, 51, 113

Chang, Jee-Gong 113Chen, Yu-Jen 95Chen, Zhi-Wei 149Cheng, Hui-Hua 149

Di Stefano, Bruno N. 3

Hagras, Hani 113, 133, 149, 169Huang, Hsien-De 113Hung, Pi-Hsia 73

Kao, Hung-Yu 113Kuo, Hui-Ching 149Kuo, Su-E 149Kuo, Yi-Ling 73

Lee, Chang-Shing 73, 95, 113, 133, 149,169

Lin, Bort-Hung 73Liu, Che-Hung 133Loia, Vincenzo 33, 51, 113

Su, Ming-Kai 133, 169

Tseng, Yu-Yang 133

Vitiello, Autilia 33, 51

Wang, Hui-Min 73, 133Wang, Mei-Hui 73, 95, 113, 133, 149, 169Wang, Yuan-Liang 133Wu, Min-Hsiang 169

Yen, Shi-Jim 95