Вы находитесь на странице: 1из 198

Studies in Fuzziness and Soft Computing

Editor-in-Chief
Prof. Janusz Kacprzyk
Systems Research Institute
Polish Academy of Sciences
ul. Newelska 6
01-447 Warsaw
Poland
E-mail: kacprzyk@ibspan.waw.pl

For further volumes:


http://www.springer.com/series/2941

296

Giovanni Acampora, Vincenzo Loia,


Chang-Shing Lee, and Mei-Hui Wang (Eds.)

On the Power of
Fuzzy Markup Language

ABC

Editors
Dr. Giovanni Acampora
School of Industrial Engineering,
Information Systems
Eindhoven University of Technology
Eindhoven
The Netherlands

Prof. Chang-Shing Lee


Dept. of Computer Science and
Information Engineering
National University of Tainan
Tainan
Taiwan

Prof. Vincenzo Loia


Dept. of Computer Science
University of Salerno
Fisciano, Salerno
Italy

Dr. Mei-Hui Wang


Dept. of Computer Science and
Information Engineering
National University of Tainan
Tainan
Taiwan

ISSN 1434-9922
e-ISSN 1860-0808
ISBN 978-3-642-35487-8
e-ISBN 978-3-642-35488-5
DOI 10.1007/978-3-642-35488-5
Springer Heidelberg New York Dordrecht London
Library of Congress Control Number: 2012954396
c Springer-Verlag Berlin Heidelberg 2013

This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of
the material is concerned, specically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microlms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology
now known or hereafter developed. Exempted from this legal reservation are brief excerpts in connection
with reviews or scholarly analysis or material supplied specically for the purpose of being entered
and executed on a computer system, for exclusive use by the purchaser of the work. Duplication of
this publication or parts thereof is permitted only under the provisions of the Copyright Law of the
Publishers 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. Violations
are liable to prosecution under the respective Copyright Law.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication
does not imply, even in the absence of a specic statement, that such names are exempt from the relevant
protective 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 publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any
errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect
to the material contained herein.
Printed on acid-free paper
Springer is part of Springer Science+Business Media (www.springer.com)

I want one moment in time when Im more


than I thought I could be.
(Whitney Houston, 1963 - 2012)

Foreword

The concept, methodology, and practice of the XML standard have achieved a
unique position in the plethora of modern software tools supporting system conceptualization, analysis, and implementation with a unique role in securing high
interoperability between individual components of complex and highly interconnected architectures. The interoperability supported by XML gave rise to web services 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 design
and analysis of human-centric systems in which domain knowledge, available experimental evidence and produced outcomes are conveniently represented in the form
of fuzzy sets and fuzzy associations. As usual, in the design of fuzzy systems, we
strive for using tools that make an overall development process well-supported and
culminating in a highly efficient implementation. Fuzzy Markup Language (FML),
regarded as a generalized XML language has emerged as a bridge between a highend conceptualization and a detailed design of fuzzy systems by narrowing down
an acute gap between an abstract and unified view used to describe fuzzy systems
and their hardware-driven implementation. These conceptualization- realization difficulties could become even more critical in ubiquitous and pervasive scenarios
where different modules of a fuzzy system can be distributed, deployed, and realized through a collection of interacting and heterogeneous hardware devices.
Giovanni Acampora and Vincenzo Loia at the University of Salerno introduced
the concept of the FML and envisioned its advantages in the area of fuzzy set technology. Subsequently they vigorously pursued its intensive conceptualization, development and realizations. FML offers important functionalities by building upon
the mechanisms of an XML Schema (to define legal constructs) and an eXtensible Stylesheet Language Transformations (XSLT) (helping in the conversion of a
description of a fuzzy system into a specific programming language).
This research monograph edited by Giovanni Acampora , Vincenzo Loia, ChangShing Lee, and Mei Hui Wang delivers a comprehensive discussion on the FML and
offers an authoritative treatment of the promising applications in this area.

VIII

Foreword

There are a number of carefully structured, informative contributions elaborating


on the diverse facets of FML concepts and FML practice. The first three chapters
cover a conceptual framework of the FML and elaborate on the various facets of
interoperability and visual interfacing. Examples linked to the development and representation of fuzzy reasoning schemes (fuzzy controllers, in particular) are highly
convincing by offering an interesting illustration of well-known constructs of fuzzy
sets realized in the FML setting.
There is a wealth of diverse original applications including malware behavioral
analysis, game playing, and university assessment. A timely tendency of bringing
the concepts of type-2 fuzzy sets into practice is well reflected in the volume. Here
applications of type-2 FML-based fuzzy ontology for dietary assessment and a type2 FML-based meeting scheduling support system are discussed.
In all of them the role FML played in the design and realization phases is well
delineated. Likewise the user-friendliness is an interesting and quite visible feature
of the systems.
Definitely, the Editors have made a superb job by bringing timely and important
concepts of FML and fuzzy sets into the area of the methodology and practice of
modern system design. The organization of the material along with its broad coverage has offered a solid exposure of the key issues and the best design practices
in a convincing way. This will, undoubtedly, appeal to the broad spectrum of the
readership.
Overall, the edited volume is a very much welcome, authoritative and timely publication, which opens new frontiers in the design and implementation of intelligent
systems.
Witold Pedrycz
Department of Electrical & Computer Engineering
University of Alberta
Edmonton, Canada

Preface

Lotfi Zadeh has thought and defined the Fuzzy Logic as a mathematical formalism
useful for describing a deductive engine similar to human reasoning in its capabilities to manipulate knowledge and generate decisions in complex environments characterized by high uncertainty and vagueness. In fact, different from the conventional
Aristotelian inference process, fuzzy reasoning incorporates an alternative way of
thinking, which allows modeling of uncertain systems by using a higher level of abstraction arising from human knowledge, skills and expertise. However, in spite of
its original and pioneering aims, currently the fuzzy computation is predominantly
devoted to design and develop intelligent systems belonging to the area of industrial
controllers and decision making frameworks. This choice in mainly due to the fact
that, as stated by Lotfi Zadeh in his principle of incompatibility, fuzzy frameworks
are simpler to design, develop and maintain than their counterparts based on traditional engineering approaches such as the proportional plus integral plus derivative
(PID) methodology. Since its first application in the field of intelligent systems, by
E.H. Mamdani, fuzzy logic has been applied to numerous application scenarios both
in the area of pure engineering and social, economical and political sciences. Examples of this application are: robotic and industrial control, traffic light control, expert
systems, temperature control, antilock breaking systems, language processing, medical 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 system may be affected by some strong difficulties related to the implementation of
a given fuzzy system on different hardware architectures, each one characterized
by a proper set of electrical/electronic/programming constraints. These difficulties
could become more critical in ubiquitous and pervasive scenarios where the different components of a fuzzy system can be distributed and deployed to a collection
of interacting and heterogeneous hardware devices. Some specific language such as
the Fuzzy Control Language (FCL) tried to bridge this design gap but it has not been
able to provide a sufficient level of hardware interoperability due to its weakness in
representing information in an abstract way.

Preface

During 2003, when I started my Ph.D. course in Computer Science, XML technologies were experiencing a kind of rebirth due to their use in defining new protocols for distributed communication and data abstraction. This second life of XML
has led me to investigate the possibility of integrating these technologies for data
abstraction with the theory of fuzzy sets in order to create a software tool capable
of supporting scientists and engineers to design fuzzy systems and controllers in a
hardware 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 the
fuzzy systems design gaps by introducing an abstract and unified approach for describing fuzzy systems and their hardware specific implementation. Initially, I used
FML for designing and implementing distributed fuzzy systems aimed at managing
complex environments characterized by high pervasiveness and hardware heterogeneity. A typical example of this kind of applications are Ambient Intelligence
(AmI) frameworks. However, since then, FML is contributing to the development
and evolution of fuzzy-based intelligent decision systems belonging to different application fields such as healthcare, computer games, malware behavioral analysis
and so on.
The main purpose of this book is to introduce readers in the FML world by presenting the benefits provided by this language in the field of fuzzy systems design,
development and distribution, together with a collection of FML-based applications
that prove the huge applicability of the proposed technology. In particular, this book
is composed by two parts: the former discusses about the need to have a standard
language for depicting fuzzy frameworks and it introduces readers with FML fundamentals such as FML grammar, FML IDE and so on; the latter presents a collection
of FML applications aimed at validating the FML capabilities to adapt to different
application domains and scenarios.
I hope this book will support the studies and research activity of scientists and
engineers in the computational intelligence area, and I hope that it will stimulate
young and eager minds that they are taking their first steps into the wonderful world
of research.
I would like to thank to co-editors Vincenzo Loia, Chang-Shing Lee and MeiHui Wang for their precious support during this fascinating activity. I thank the
chapters authors for having improved the book quality with their research expertise
and skills. I wish to personally thank Prof. Witold Pedrycz for his valuable foreword
contribution. At last, but not least, I would like to thank my parents, Francesco and
Maria, for buying me, on June 2, 1984, a Commodore Vic 20 and allowing me to
begin my experience into the world of computers and artificial intelligence.
Eindhoven, The Netherlands

Giovanni Acampora
July 2012

Contents

Part I Fuzzy Markup Language Fundamentals


On the Need of a Standard Language for Designing Fuzzy Systems . . . . . . 3
Bruno N. Di Stefano
1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2
The Importance of the Documentation for the Design of
Interoperable Programmable Controllers . . . . . . . . . . . . . . . . . . . . . . 6
3
A First Attempt for a Fuzzy Language: IEC 61131-7 . . . . . . . . . . . . 7
4
Fuzzy Markup Language: A Novel Proposal for a Standard
Fuzzy Systems Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Fuzzy Markup Language: A XML Based Language for Enabling Full
Interoperability in Fuzzy Systems Design . . . . . . . . . . . . . . . . . . . . . . . . . . .
Giovanni Acampora
1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
Fuzzy Markup Language: The Grammar and Stylesheet
Translators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1
FML Syntax: XML Tags and Attributes . . . . . . . . . . . . . . .
2.2
Describing the FML Grammar through XML Schema . . .
2.3
FML Synthesis: XSLT Documents . . . . . . . . . . . . . . . . . . .
3
An Extension of FML: Type 2 FML . . . . . . . . . . . . . . . . . . . . . . . . . .
4
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Distributing Fuzzy Reasoning through Fuzzy Markup Language:
An Application to Ambient Intelligence . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Giovanni Acampora, Vincenzo Loia, Autilia Vitiello
1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
FML and Its Distributive Features . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
FML-Based Mobile Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17
17
19
19
24
27
27
29
30
33
33
35
38

XII

Contents

3.1
3.2

Migration in Multi-agent Systems . . . . . . . . . . . . . . . . . . . .


A Multi-agent Framework for Distributing FML
Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
Applying Multi-agent FML to Ambient Intelligence . . . . . . . . . . . .
4.1
Learning Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2
Control Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
Simulation and Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . .
6
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
An Enhanced Visual Environment for Designing, Testing and Developing
FML-Based Fuzzy Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Giovanni Acampora, Vincenzo Loia, Autilia Vitiello
1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
A Novel Vision of a Fuzzy Controller: FLC Labeled Tree . . . . . . . .
3
Visual FML Tool Functionalities . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1
Fuzzy System Description . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2
Systems Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3
Systems Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4
Systems Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

38
39
42
43
46
47
49
49
51
51
53
59
61
64
67
68
69
69

Part II Fuzzy Markup Language Applications


Apply Fuzzy Markup Language to ASAP Assessment System . . . . . . . . . .
Chang-Shing Lee, Mei-Hui Wang, Pi-Hsia Hung, Yi-Ling Kuo,
Hui-Min Wang, Bort-Hung Lin
1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
Item Fuzzy Ontology and Fuzzy Markup Language . . . . . . . . . . . . .
2.1
Item Fuzzy Ontology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2
Fuzzy Markup Language . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
CMMI-Based ASAP Assessment System . . . . . . . . . . . . . . . . . . . . .
3.1
Introduction to CMMI . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2
Introduction to ASAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3
Structure of CMMI-Based ASAP Assessment System . . .
3.4
Subsystem Function Descriptions . . . . . . . . . . . . . . . . . . . .
4
FML-Based Semantic Inference Mechanism . . . . . . . . . . . . . . . . . . .
4.1
Structure of FML-Based Semantic Inference
Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2
Natural Language Processing Mechanism . . . . . . . . . . . . .
4.3
Fuzzy Reasoning Mechanism . . . . . . . . . . . . . . . . . . . . . . .
4.4
Semantic Summary Mechanism . . . . . . . . . . . . . . . . . . . . .
5
Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

73

74
75
75
76
77
78
79
80
81
83
83
84
85
88
89
91
92

Contents

XIII

Apply Fuzzy Markup Language to Knowledge Representation for Game


of Computer Go . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Chang-Shing Lee, Mei-Hui Wang, Yu-Jen Chen, Shi-Jim Yen
1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
2
Knowledge Representation for Game of Computer Go . . . . . . . . . . 97
2.1
Game Record Ontology . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
2.2
Go Board Ontology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
3
FML-Based Decision Support Agent . . . . . . . . . . . . . . . . . . . . . . . . . 101
3.1
Structure of FML-Based Decision Support Agent . . . . . . . 101
3.2
Fuzzy Decision Support System . . . . . . . . . . . . . . . . . . . . . 101
3.3
Territory Partition Mechanism . . . . . . . . . . . . . . . . . . . . . . . 103
3.4
Fuzzy Inference Mechanism . . . . . . . . . . . . . . . . . . . . . . . . 103
3.5
Alarm Presentation Mechanism . . . . . . . . . . . . . . . . . . . . . . 105
4
Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
5
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Fuzzy Markup Language for Malware Behavioral Analysis . . . . . . . . . . . . 113
Hsien-De Huang, Giovanni Acampora, Vincenzo Loia, Chang-Shing Lee,
Hani Hagras, Mei-Hui Wang, Hung-Yu Kao, Jee-Gong Chang
1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
2
Basic Concepts: Improving TWMAN through FML and OWL . . . 115
2.1
Ontology Web Language (OWL) for Modeling
Malwares Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
2.2
Fuzzy Markup Language (FML) as Inference Engine
for Malwares Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
2.3
Taiwan Malware Analysis Net (TWMAN) . . . . . . . . . . . . . 118
3
An FML-Based Fuzzy Ontological Model for TWMAN . . . . . . . . . 119
3.1
Integrating OWL and FML for Analyzing Malware
Behaviors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
3.2
Fuzzy Inference Mechanism . . . . . . . . . . . . . . . . . . . . . . . . 122
4
Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
5
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Applying FML-Based Fuzzy Ontology to University Assessment . . . . . . . . 133
Mei-Hui Wang, Chang-Shing Lee, Hani Hagras, Ming-Kai Su, Yu-Yang
Tseng, Hui-Min Wang, Yuan-Liang Wang, Che-Hung Liu
1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
2
Structure of University Goal Ontology . . . . . . . . . . . . . . . . . . . . . . . . 135
3
FML-Based University Assessment System . . . . . . . . . . . . . . . . . . . 139
3.1
Fuzzy Markup Language . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
3.2
Knowledge Base of University Assessment System . . . . . 139
3.3
Rule Base of University Assessment System . . . . . . . . . . . 140
4
Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

XIV

Contents

5
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
A Type-2 FML-Based Fuzzy Ontology for Dietary Assessment . . . . . . . . . . 149
Mei-Hui Wang, Chang-Shing Lee, Zhi-Wei Chen, Hani Hagras, Su-E Kuo,
Hui-Ching Kuo, Hui-Hua Cheng
1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
2
Definition of Fuzzy Ontology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
2.1
Fuzzy Ontology [12] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
2.2
Type-2 Fuzzy Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
2.3
Type-2 Fuzzy Diet Ontology . . . . . . . . . . . . . . . . . . . . . . . . 156
3
Type-2 FML-Based Dietary Assessment System . . . . . . . . . . . . . . . 156
3.1
Structure of the Proposed System . . . . . . . . . . . . . . . . . . . . 157
3.2
Food Nutrition Facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
3.3
Type-2 Fuzzy Inference Mechanism . . . . . . . . . . . . . . . . . . 159
4
Experiments and Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
5
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
A Type-2 FML-Based Meeting Scheduling Support System . . . . . . . . . . . . 169
Chang-Shing Lee, Mei-Hui Wang, Ming-Kai Su, Min-Hsiang Wu,
Hani Hagras
1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
2
Type-2 FML-Based Personal Ontology . . . . . . . . . . . . . . . . . . . . . . . 171
2.1
Type-2 Fuzzy Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
2.2
Type-2 FML-Based Personal Ontology . . . . . . . . . . . . . . . 172
2.3
Type-2 FML-Based Meeting Scheduling Ontology . . . . . . 173
3
FML-Based Meeting Scheduling System . . . . . . . . . . . . . . . . . . . . . . 175
3.1
Type-2 FML-Based Meeting Scheduling System . . . . . . . 175
3.2
Knowledge Base for Type-2 FML-Based Meeting
Scheduling System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
3.3
Fuzzy Inference Mechanism . . . . . . . . . . . . . . . . . . . . . . . . 180
3.4
Sentence Extraction Mechanism . . . . . . . . . . . . . . . . . . . . . 181
4
Experiments and Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
5
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

List of Contributors

Giovanni Acampora
School of Industrial Engineering, Information Systems
Eindhoven University of Technology, P.O. Box 513, 5600 MB, Eindhoven
The Netherlands
e-mail: g.acampora@tue.nl
Jee-Gong Chang
National Center for High-Performance Computing, Taiwan
e-mail: changjg@nchc.org.tw
Yu-Jen Chen
Dept. of Computer Science and Information Engineering
National University of Tainan, Taiwan
e-mail: sincoew@gmail.com
Zhi-Wei Chen
Dept. of Computer Science and Information Engineering
National University of Tainan, Taiwan
e-mail: a301203034@gmail.com
Hui-Hua Cheng
Dept. of Nutritional Service
National Cheng Kung University Hospital, Taiwan
e-mail: n941272@mail.hosp.ncku.edu.tw
Bruno Di Stefano
Nuptek Systems Ltd, Canada
e-mail: bruno.distefano@nupteksystems.com
e-mail: bruno.distefano@gmail.com
Hani Hagras
The Computational Intelligence Centre
School of Computer Science and Electronic Engineering
University of Essex, UK
e-mail: hani@essex.ac.uk

XVI

Hsien-De Huang
National Center for High-Performance Computing, Taiwan
e-mail: TonTon@ieee.org
Pi-Hsia Hung
Graduate Institute of Measurement and Statistics National
University of Tainan, Taiwan
e-mail: hungps@mail.nutn.edu.tw
Hung-Yu Kao
Dept. of Computer Science and Information Engineering
National Cheng Kung University, Taiwan
e-mail: hykao@mail.ncku.edu.tw
Hui-Ching Kuo
Dept. of Nutritional Service
National Cheng Kung University Hospital, Taiwan
e-mail: susan@mail.ncku.edu.tw
Su-E Kuo
Dept. of Nutritional Service
National Cheng Kung University Hospital, Taiwan
e-mail: iris@mail.ncku.edu.tw
Yi-Ling Kuo
Dept. of Computer Science and Information Engineering
National University of Tainan, Taiwan
e-mail: egmilkcherry@gmail.com
Chang-Shing Lee
Dept. of Computer Science and Information Engineering
National University of Tainan, Taiwan
e-mail: leecs@mail.nutn.edu.tw
Bort-Hung Lin
Graduate Institute of Measurement and Statistics
National University of Tainan, Taiwan
e-mail: teac@nutn.edu.tw
Che-Hung Liu
Dept. of Business and Management
National University of Tainan, Taiwan
e-mail: chehung@gmail.com
Vincenzo Loia
Department of Computer Science
University of Salerno, 84084 Fisciano, Salerno, Italy
e-mail: loia@unisa.it

List of Contributors

List of Contributors

Ming-Kai Su
Dept. of Computer Science and Information Engineering
National University of Tainan, Taiwan
e-mail: devil74825@gmail.com
Yu-Yang Tseng
Dept. of Business and Management
National University of Tainan, Taiwan
e-mail: kofninja@gmail.com
Autilia Vitiello
Department of Computer Science
University of Salerno, 84084 Fisciano, Salerno, Italy
e-mail: avitiello@unisa.it
Mei-Hui Wang
Dept. of Computer Science and Information Engineering
National University of Tainan, Taiwan
e-mail: mh.alice.wang@gmail.com
Hui-Min Wang
Computer Center
National University of Tainan, Taiwan
e-mail: ming1966@gmail.com
Yuan-Liang Wang
Computer Center
National University of Tainan, Taiwan
e-mail: yuan@mail.nutn.edu.tw
Min-Hsiang Wu
Dept. of Computer Science and Information Engineering
National University of Tainan, Taiwan
e-mail: izumo19831006@gmail.com
Shi-Jim Yen
Dept. of Computer Science and Information Engineering
National Dong Hwa University, Taiwan
e-mail: sjyen@mail.ndhu.edu.tw

XVII

Acronyms

AIDE
AmI
ASAP
CKIP
CMMI
FIS
FLC
FML
FML2
FDSA
FOU
FTP
HEEACT
HTTP
ID
INRIA
IRC
IRT
IT2FS
JRE
KM
LMF
MCTS
MAE
MF
MSE
NCHC
NUTN
OASE
OS
OWL

Advanced Intrusion Detection Environment


Ambient Intelligence
After School Alternative Program
Chinese Knowledge Information Processing
Capability Maturity Model Integration
Fuzzy Inference System
Fuzzy Logic Controller
Fuzzy Markup Language
Type-2 fuzzy markup language
FML-based Decision Support Agent
Footprint Of Uncertainty
File Transfer Protocol
Higher Education Evaluation and Accreditation Council of Taiwan
HyperText Transfer Protocol
Identification Number
National Institute for Research in Computer Science and Control
Internet Relay Chat
Item Response Theory
Interval Type-2 Fuzzy Set
Java Runtime Environment
Karnik-Mendel
Lower Membership Function
Monte Carlo Tree Search
Mean Absolute Error
Membership Function
Mean square error
National Center for High Performance and Computing
National University of Tainan
Ontology Application & software Engineering
Operation System
Web Ontology Language

XX

PDCA
PID
PMC
QFD
SMTP
SWOT
T1FLS
T2FS
TCP/IP
TMAN
TP-CMC
TSK
UMF
XML
XSLT
XSD

Acronyms

Plan, Do, Check, and Act


Proportional-Integral-Derivative
Project Monitoring and Control
Quality Function Development
Simple Mail Transfer Protocol
Strength, Weakness, Opportunity, and Threat
Type-1 Fuzzy Logic System
Type-2 fuzzy set
Transmission Control Protocol/Internet Protocol
Taiwan Malware Analysis Net
Two-Phase Concept Map Construction
Takagi-Sugeno-Kang
upper membership function
eXtensible Markup Language
eXtensible Stylesheet Language Transformations
XML Schema Document

Part I

Fuzzy Markup Language Fundamentals

On the Need of a Standard Language


for Designing Fuzzy Systems
Bruno N. Di Stefano

Abstract. Fuzzy logic has been extensively used in industrial environments for its
capability to describe the behavior of uncertain and imprecise systems by means of
a simple linguistic approach. However, in spite of its huge applicability, fuzzy logic
lacks of a unified and standardized tool for coding fuzzy rules on heterogeneous
hardware. This chapter describes how the need of a universal description language
arose in the fuzzy logic community by introducing some past attempts to standard
fuzzy language, such as the IEC 61131-7 Fuzzy Control Language. Starting from
this discussion, a comparison between the old proposal and the Fuzzy Markup Language (FML) is performed in order to validate the application of FML as a future
standard tool for the development of industrial fuzzy controllers and intelligent decision making systems.

1 Introduction
Fuzzy Logic [2123] is a form of continuous multi-valued logic allowing computing
with words and modeling complex systems characterized by imprecise and vague
behaviors by means of a linguistic approach. Thanks to its capability in describing
complex relationships among systems variables, fuzzy logic has been successfully
applied to different industrial scenarios [8] yielding performance better than conventional engineering methods based on differential equations (e.g. proportional plus
integral plus derivative - PID). This benefit arises from the fact that the fuzzy computation is based on simple membership functions (see Fig. 1) and operators as tnorms and t-conorms which also provide simple hardware implementations. These
implementations can be obtained by opportunely programming fuzzy-based arithmetic logic unit or storing fuzzy control surfaces (see Fig. 2 ) by using lookup tables.
Bruno N. Di Stefano
Nuptek Systems Ltd, Canada
e-mail: bruno.distefano@nupteksystems.com,
bruno.distefano@gmail.com
G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 315.
c Springer-Verlag Berlin Heidelberg 2013
DOI: 10.1007/978-3-642-35488-5_1


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 two
ways:
by translating the application domain experts experience into a computer algorithm 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 improve the results that can be obtained with one method only. This is not the only
way of applying fuzzy logic, but it is an efficient way which allows developing a
system close to the thought process of the designers and to the intellectual image of
the system held by the educated users of the system, such as plant engineers, control
engineers, etc. To name just a few famous examples [37] [920], industrial applications of fuzzy logic include water treatment plants, braking systems for subway

On the Need of a Standard Language for Designing Fuzzy Systems

Fig. 2 A Fuzzy Surface

cars, photo & video camera focus electronic circuitry, vehicle control systems, and
control in chemical and biological processes. Just to name one company in the field
of industrial controls, Omron Corporation has 350 patents in this field. Fuzzy logic
has become a multibillion-dollar industry. Nevertheless, some industrial and process
engineers trained in traditional control theory, calculus, and related disciplines, often have shown hesitation in adopting fuzzy logic, because of their impression that
it does not provide well-defined and standard guidelines for designing, developing
and maintaining control systems. In order to bridge this gap, over the years many
software tools have been designed to facilitate and improve the fuzzy-based development process, e.g. fuzzyTECH1, the Fuzzy Logic Toolbox for MATLAB2 , Fuzzy
Logic Inferencing Toolkit (FLINT)3, XFuzzy4, Fuzzy Inference Development Environment (FIDE)5 , etc. Between 1990 and 1992 there was a proliferation of such
tools, well beyond the small number of example s given. Every tool was optimized
for 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 software tools soon discovered the necessity of a universal development language, able
to cover all phases of the fuzzy logic development cycle. Moreover, a small number
of 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.com
http://www.mathworks.com/products/fuzzy-logic/index.html
3 http://www.lpa.co.uk/fln.htm
4 http://www2.imse-cnm.csic.es/Xfuzzy/
Xfuzzy 3.0/Xfuzzy3.0 en.pdf
5 http://www.zaptron.com/imageproc/fide.htm
6 http://www.wikipatents.com/as/s assignee/
American+NeuraLogix+Inc
2

B.N. Di Stefano

Often, it was advantageous to develop part of the solution as high-speed hardware


module and some other part as software. However, one problem arose:
how to document something that could be implemented in both hardware and software
without 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 language
for describing fuzzy systems in abstract way have been done. For instance, the standard IEC 61131-7 define the grammar of the Fuzzy Control Language (FCL), a highlevel and specific purpose language aimed at modeling fuzzy systems in hardware
independent way. However, this first proposal suffers from some shortcomings that
limit its applicability in different industrial fields. This chapter is devoted to present
FCL and its shortcomings and, successively, it introduces the Fuzzy Markup Language (FML) as an innovative XML-based approach for modeling fuzzy systems in
high level way and bridging FCL gaps.
This chapter is organized as follows: Section 2 is aimed at presenting the collection of documentations necessary for describing a programmable industrial controllers in a formal and well-defined way; section 3 is devoted to recall the standard
IEC61131 whose main aim is to define the FCL grammar; section 4 will show how
FML attempts to solve FCL drawbacks and it will introduce the rest of the book.

2 The Importance of the Documentation for the Design of


Interoperable Programmable Controllers
The quality of design and maintenance steps of a generic industrial product strongly
depends upon the product documentation, e.g. written specifications, schematic diagrams, mechanical assembly drawings, etc. If the documentation is correct and
detailed, it is possible to transfer manufacturing of a product from one company
to another just by transferring a complete and correct set of the applicable documentation. This documentation is essential also in the case in which the product is
supposed 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 allow
a seamless technology transfer. Things are a bit more complex whenever substantial parts of the product are implemented in software. Different industrial standards
define the required documentation for products belonging to different technological
and industrial domains. For complex systems there are families of standards encompassing 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 standard
documents:

Part 1: General information


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

On the Need of a Standard Language for Designing Fuzzy Systems

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 power
the programmable controller. The nature of fuzzy logic is such that, without good
and standard documentation is impossible to understand how the control algorithm
works. Part 7, Fuzzy control programming, has the explicit object, stated in the document,to offer the manufacturers and the users a well-defined common understanding of the basic means to integrate fuzzy control applications in the Programmable
Controller languages according to IEC 61131-3, as well as the possibility to exchange portable fuzzy control programs among different programming systems.
The first goal, i.e., the one relating to the programming languages, is probably less
relevant today, than the standard committee thought. In fact IEC 61131-3 defines
two graphical and two textual PLC (i.e. Programmable Logic Controller) programming 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 different
programming systems., has become very relevant to practitioners and vendors of
software for fuzzy systems, not only in the area of fuzzy control, but in the more
general area of fuzzy logics applications. As most systems are designed using software with proprietary graphical user interfaces, a method is needed to document
what each algorithm does. Next section is devoted to formally introduce FCL language and it drawbacks; successively, FML will be presented as a candidate standard
language 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 into
account the fuzzy description of the product behavior. In particular, Part 7 of IEC
61131 defines the FCL (fuzzy control language), as a domain-specific programming language. In reality, using the term programming language speaking for the
FCL is a misnomer because it is a specification language. Adopting the FCL
as defined in IEC 61131-7 implies that all parties involved add to their software

B.N. Di Stefano

functions to read and correctly parse FCL and to store the results of their work in a
form compatible with FCL. Each party may implement their software in a different
way and using different programming language. Conformance with the standard for
systems using FCL consists of the following three levels:
Basic Level including the definitions of the function block and the data types of
IEC 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 that
one wants to achieve. Going beyond the Basic Level often allows marketing proprietary technologies, but may limit the number and type of modules with which
ones software can be interfaced.
As an example of system described using the FCL, we show the FCL code published at page 105 of 61131-7 IEC:2000, see listing 1. A detailed description of the
FCL can be found in the IEC 61131-7 standard.
All FCL programs are contained in a Function Block and delimited by the pair
FUNCTION BLOCK and END FUNCTION BLOCK. There may be more than
one 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
function block name
{fb io var declarations}
{other var declarations}
function block body
END FUNCTION BLOCK

Within a Function Bloc input and output variables are declared respectively by
means of the VAR INPUT Input parameter declaration and of the VAR OUTPUT
Output parameter declaratio. Both statements VAR INPUT and VAR OUTPUT
are terminated by an END VAR statement each. Each variable name: defines a
data 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 n
variable name : data type ;
....
END VAR

And as follows for output variables:


VAR OUTPUT O u t p u t p a r a m e t e r d e c l a r a t i o n
variable name : data type ;
...
END VAR

On the Need of a Standard Language for Designing Fuzzy Systems

FUNCTION BLOCK c o n t a i n e r c r a n e
VAR INPUT
d i s t a n c e : REAL;
a n g l e : REAL;
END VAR
VAR OUTPUT
power : REAL;
END VAR
FUZZIFY d i s t a n c e
TERM 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 e
TERM 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 power
TERM 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 No1
AND: MIN ;
ACCU: MAX;
RULE 1 : IF d i s t a n c e
RULE 2 : IF d i s t a n c e
RULE 3 : IF d i s t a n c e
RULE 4 : IF d i s t a n c e
RULE 5 : IF d i s t a n c e
RULE 6 : IF d i s t a n c e
END RULEBLOCK

IS
IS
IS
IS
IS
IS

f a r AND a n g l e IS z e r o THEN power IS pos medium ;


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 ;
f a r AND a n g l e IS n e g b i g THEN power IS pos medium ;
medium AND a n g l e IS n e g s m a l l THEN power IS neg medium ;
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 ;
z e r o AND a n g l e IS z e r o THEN power IS z e r o ;

END FUNCTION BLOCK

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

In the example of listing 1 this part consists of:


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

VAR OUTPUT
power : REAL;
END VAR

10

B.N. Di Stefano

Similarly, the keywords FUZZIFY & END FUZZIFY and DEFUZZIFY &
END DEFUZZIFY delimit respectively the definition of the variable to be fuzzified
and defuzzified. The defuzzification method to be used is defined with the keyword
METHOD. The only standard defuzzification methods guaranteed to be accepted by
all implementations are: Centre of Gravity (CoG), Centre of Gravity for Singleton (CoGS), Centre of Area (CoA), Left Most Maximum (LM) , Right Most
Maximum (RM). Designers wishing to employ different defuzzification method
must make sure that their chosen method can be FCL accepted. In listing 1, this part
corresponds to:
FUZZIFY a n g l e
TERM 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 power
TERM 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 knowledge 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 allows for partitioning of the ruleblock, making it easier to understand how the rules
are defined. Fuzzy operators are used inside the rule block, as follows:
RULEBLOCK r u l e b l o c k n a m e
operator definition ;
[ activation method ; ]
accumulation method ;
rules ;
END RULEBLOCK

The fuzzy operators are used inside the rule block, as follows
oper ator defini tion ::= operator : algorithm

To fulfill de Morgans Law, the algorithms for operators AND and OR are used
pair-wise; for example MAX shall be used for OR if MIN is used for AND (see
AND: 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 ] ;

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 variable. The purpose of the weighting factor is to reduce the membership degree by
multiplication of the result in the expression with the weighting factor.
In the example of listing 1 the ruleblock consists of:
RULEBLOCK No1
AND: MIN ;
ACCU: MAX;
RULE 1 : IF d i s t a n c e
RULE 2 : IF d i s t a n c e
RULE 3 : IF d i s t a n c e
RULE 4 : IF d i s t a n c e
RULE 5 : IF d i s t a n c e
RULE 6 : IF d i s t a n c e
END RULEBLOCK

IS
IS
IS
IS
IS
IS

f a r AND a n g l e IS z e r o THEN power IS pos medium ;


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 ;
f a r AND a n g l e IS n e g b i g THEN power IS pos medium ;
medium AND a n g l e IS n e g s m a l l THEN power IS neg medium ;
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 ;
z e r o AND a n g l e IS z e r o THEN power IS z e r o ;

Even though FCL enabled systems designers to program their fuzzy artifacts in
a direct way, without having some knowledge about conventional general purpose
programming languages, it mainly lacks in two different aspects:
the purely textual nature of FCL does not enable to implement FCL programs on
different hardware architectures without additional efforts;
FCL is based on a centralized approach and, as a consequence, its programs
cannot be delivered in distributed computing scenarios.
As will be shown in the next section and chapters, FML is aimed at solving FCL
issues by fully exploiting XML technologies both for achieving a full hardware
interoperability and distributing fuzzy computation in modern ubiquitous computing
applications.

4 Fuzzy Markup Language: A Novel Proposal for a Standard


Fuzzy Systems Language
FML [1] [2] is a markup language for fuzzy systems description, introduced by Giovanni Acampora during his Ph.D. course at University of Salerno, Italy. Different
from FCL, FML exploits XML technologies for obtaining a fully hardware interoperability and ubiquitous computing features. Mike Watts stated on his popular
Computational Intelligence Blog7 :
Giovanni Acampora describes the Fuzzy Markup Language (FML) in a series of articles. FML is a XML-based method for describing fuzzy logic systems [...] The major
advantage of using XML to describe a fuzzy system is interoperability. All that is
needed 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 and
SECoS rule extraction algorithms that exist) which could then be read directly into
7

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

12

B.N. Di Stefano
a fuzzy inference engine or uploaded into a fuzzy controller. Also, with technologies
like XSLT, it is possible to compile the FML into the programming language of your
choice, ready for embedding into whatever application you please [...] I would much
rather have used something like FML for my work.

Thanks to these important features, FML improves the FCLs description capabilities, too limited for allowing practitioners to exchange information about fuzzy
algorithms, and consequently solves the following FCL pitfalls:
FCL is static because it contains information about the data but not about the
functions needed to process the data;
An FCL description of an algorithm may result in different implementations of
the 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). This
novel structural vision of a fuzzy system made particularly simple to define a tags
based grammar capable of hierarchically depicting different fuzzy components. Besides to solve aforementioned FCL drawbacks, the hierarchical nature of the labeled
tree representation used by FML allows systems designers to define their fuzzy
controllers by using XML technologies and, consequently, strongly improve the
interoperability of the designed systems; moreover, since XML is used for distributing information in complex distributed environments, FML description of a fuzzy
system enable the distribution of fuzzy computation in ubiquitous environments as
could be required from the current trends of computing; finally, because labeled tree
are characterized by a well-defined geometrical shape, fuzzy systems designers can
visually implement FML controllers and, consequently, reduce the design time of a
generic 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 level
abstraction of a fuzzy control system may be instantiated into different hardware
platforms. This chapter introduces the FML grammar and shows how FML can be
used in interoperable hardware scenarios by means of XSLT approaches. Chapter 2
also introduces a preliminary vision of FML for describing Type 2 Fuzzy Systems.
Chapter 3 shows that the XML based nature of FML makes possible to
embed fuzzy reasoning in computing scenarios characterized by high levels of
pervasiveness and ubiquity. Through this additional feature, FML technology
may efficiently distribute pieces of the global control flow on different devices populating a pervasive environment. In Chapter 3 FML features are exploited to implement an agent-based framework designed for providing proactive and distributed
services in an Ambient Intelligent (AmI) scenario. In particular, FML is combined

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 Cheap


IF THEN Tip is Average

IF THEN Tip is Generous

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 smart
environment and generating an appropriate collection of services satisfying users
preferences. This chapter shows by means of a case study that the exploitation of
FML distributed features simultaneously allows achieving the relevant advantage of
reducing the fuzzy computation effort and providing the most suitable collection of
distributed services fulfilling a prefixed objective.
Chapter 4 shows how FML benefits arise from the exploitation of an alternative representation of a fuzzy system based on labeled trees, data structure derived
from XML-based document representation. Moreover, this new graphical fuzzy system representation can be exploited to implement an enhanced visual environment
which allows designers to easily model a fuzzy system through visual steps. This
chapter is devoted, firstly, to present the new graphical representation of a fuzzy system based on labeled trees, and, secondly, to describe the implemented framework,
called Visual FML Tool, capable of exploiting labeled tree benefits by achieving a
twofold purpose: the simplification of the fuzzy system design through simple visual steps and a hardware-independent fuzzy system modeling thanks to the direct
mapping of the fuzzy system labeled tree in a FML program.
Four chapters follow with actual examples of application of the FML to real life
applications:
an FML-based semantic inference mechanism for an After School Alternative
Program (ASAP) in Taiwan;
an FML based fuzzy ontology and its application to university assessment for
National University of Tainan (NUTN), Taiwan;
a food ontology and type-2 fuzzy dietary ontology are further applied to the dietary assessment. Additionally, with the technologies of the type-2 fuzzy sets and

14

B.N. Di Stefano

fuzzy inference approach based on FML, the dietary healthy level is obtained to
give 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 and
the potential application scenarios where FML could be successfully applied.

5 Conclusion
FML will represent an important innovation in the field of computational intelligence thanks to its capabilities of providing fuzzy systems to deal with collections
of interoperable and heterogeneous hardware. By means of this novel design and
development paradigm, FML will allow fuzzy scientists and engineers to express
their idea and to exchange fuzzy systems between their software in a simple and
fast way. This new way of working will help to consolidate the exploitation of fuzzy
logic in industrial and academic scenarios and simplify the work of people involved
in the analysis, design and development of systems based on fuzzy approaches.

References
1. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive domotic framework. IEEE Transactions on Industrial Informatics 2, 97111 (2005)
2. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelligence. Information Sciences 178(3), 631646 (2008)
3. Bernard, J.A.: Use of rule-based system for process control. IEEE Control Systems Magazine 8, 313 (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 activated sludge process. In: Proc. 2nd IFSA Congress, Tokyo, Japan, pp. 282285 (1987)
6. Kinoshita, M., Fukuzaki, T., Satoh, T., Miyake, M.: An automatic operation method for
control rods in BWR plants. In: Proc. Specialists Meeting on In-Core Instrumentation
and Reactor Core Assessment, Cadarache, France (1988)
7. Lee, C.C.: Fuzzy Logic in Control Systems: Fuzzy Logic Controller - Part I. IEEE Transactions on Systems, Man and Cybernetics 20, 404418 (1990)
8. Mamdani, E.H., Assilian, S.: An experiment in linguistic synthesis with a fuzzy logic
controller. Int. Journal of Man-Machine Studies 7, 113 (1973)
9. Togai, M., Chiu, S.: A fuzzy accelerator and a programming environment for real-time
fuzzy control. In: Proc. 2nd IFSA Congress, Tokyo, Japan, pp. 147151 (1987)
10. Togai, M., Watanabe, H.: Expert system on a chip: An engine for real-time approximate
reasoning. IEEE Expert Systems Magazine 1, 5562 (1986)
11. Watanabe, H., Dettloff, W.: Reconfigurable fuzzy logic processor: A full custom digital
VLSI. In: Int. Workshop on Fuzzy System Applications, Iizuka, Japan, pp. 4950 (1988)

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 System
Symp., Japan, pp. 122130 (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 operations - 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. Workshop
on Fuzzy System Applications, Iizuka, Japan, pp. 5152 (August 1988)
16. Yagishita, O., Itoh, O., Sugeno, M.: Application of fuzzy reasoning to the water purification process. In: Sugeno, M. (ed.) Industrial Applications of Fuzzy Control, pp. 1940.
North-Holland, Amsterdam (1985)
17. Yamakawa, T., Miki, T.: The current mode fuzzy logic integrated circuits fabricated by
the standard CMOS process. IEEE Transactions on Computer C-35, 161167 (1986)
18. Yamakawa, T., Sasaki, K.: Fuzzy memory device. In: Proc. 2nd IFSA Congress, Tokyo,
Japan, pp. 551555 (1987)
19. Yasunobu, S., Miyamoto, S.: Automatic train operation by predictive fuzzy control. In:
Sugeno, M. (ed.) Industrial Applications of Fuzzy Control, pp. 118. North- Holland,
Amsterdam (1985)
20. Yasunobu, S., Hasegawa, T.: Evaluation of an automatic container crane operation system
based on predictive fuzzy control. Control Theory and Advanced Technology 2, 419432
(1986)
21. Zadeh, L.A.: Fuzzy sets. Information and Control 8, 338353 (1965)
22. Zadeh, L.A.: Fuzzy algorithm. Information and Control 12, 94102 (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)

Fuzzy Markup Language: A XML Based


Language for Enabling Full Interoperability in
Fuzzy Systems Design
Giovanni Acampora

Abstract. Historically, the theory of fuzzy logic has been strongly used for
enabling designers of industrial controllers and intelligent decision making frameworks to model complex systems by expressing their expertise through simple linguistic rules. Nevertheless, the design activity of a fuzzy system may be affected
by strong difficulties related to the implementation of a same system on different
hardware architectures, each one characterized by a proper set of electrical/electronic/programming constraints. These difficulties could become very critical when
a fuzzy system needs to be deployed in distributed environments populated by a collection of interacting and heterogeneous hardware devices. Fuzzy Markup Language
(FML) is a XML-based language whose main aim is to bridge the aforementioned
implementation gaps by introducing an abstract and unified approach for designing
fuzzy systems in hardware independent way. In details, FML is a novel specificpurpose computer language that defines a detailed structure of fuzzy control independent from its legacy representation and improve systems designers capabilities
by providing them with a collection of facilities speeding up the whole development process of a centralized or distributed fuzzy system. This chapter is devoted
to introduce FML details, an application sample, and it will provided some initial
aspects about FML-II, a FML grammar extension aimed at modeling Type-II fuzzy
systems.

1 Introduction
Since its birth, in the middle of the 1970s, fuzzy control [8] has been successfully
applied to different application scenarios [7]. This successful history is mainly due
to the superiority provided by fuzzy logic theory [27] [28] [29] respect to conventional proportional-integral-derivative controller (PID) in terms of simplicity and
Giovanni Acampora
School of Industrial Engineering, Information Systems, Eindhoven University of Technology,
P.O. Box 513, 5600 MB, Eindhoven, The Netherlands
e-mail: g.acampora@tue.nl
G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 1731.
c Springer-Verlag Berlin Heidelberg 2013
DOI: 10.1007/978-3-642-35488-5_2


18

G. Acampora

efficiency. Indeed, while traditional control systems are based on mathematical models in which the control system is described using one or more differential equations that define the system response to its inputs, fuzzy control exploits a collection
of so called linguistic rules capable of directly capturing and modeling the human
expertise and skills related to a given application domain. Moreover, because the
fuzzy inference approaches are based on simple arithmetic operators (precisely tnorm and t-conorm), fuzzy controllers can be efficiently implemented on low cost
hardware such as 4-bit or 8-bit processors. Besides the benefits related to the simplicity and efficiency, fuzzy systems have obtained obtained a major role in engineering systems and consumer products thanks to their capability to act as valid tool
for supporting knowledge discovery activities. In consequence of provided benefits
fuzzy sets theory have supported the development of complex applications mainly
belonging to the field of industrial controllers and intelligent decision making systems such as, for instance, water quality control [5, 19], automatic train operation
systems [17, 22, 24], automatic container crane operation systems [4, 25], elevator
control [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 fuzzy
control in the context of complex ill-defined processes that can be controlled by a
skilled human operator without the knowledge of their underlying dynamics.
Nevertheless, in spite of these evident benefits, the real design of fuzzy systems
is strongly depends upon hardware architectures which will implement the running
version of designed controllers. Indeed, even though fuzzy systems can be developed by using hardware solutions characterized by low costs and low complexity,
their real implementation is strongly depends upon the electrical, electronic and
programming constraints related to the particular hardware platform. This drawback
may result in dire design consequence when fuzzy control approach is used for modeling the behavior of pervasive or ubiquitous frameworks, i.e. distributed computing
environments composed by collections of interacting and heterogeneous hardware
devices. Fuzzy Markup Language (FML) [1, 2] is a XML-based language whose
main aim is to bridge the aforementioned implementation gaps by introducing an
abstract and unified approach for designing fuzzy systems in hardware independent
way. In details, FML is a novel specific-purpose computer language that defines a
detailed structure of fuzzy control independent from its legacy representation and
improve systems designers capabilities by providing them with a collection of facilities speeding up the whole development process of a centralized or distributed
fuzzy system. In the next sections it will be show how the different components
of a generic fuzzy system can be modeled by means of appropriate XML tags and
attributes. This mapping represents a fundamental step for defining the FML grammar, i.e. the collection of XML rules that a system designer should be compliant in
order to define well-formed FML-based fuzzy controllers. Once the FML grammar
is defined, it will be introduced the concept of translator stylesheets that can be considered as compilers capable of translating FML code to a runnable program coded
by using conventional computer programming language.

FML for Enabling Full Interoperability in Fuzzy Systems Design

19

2 Fuzzy Markup Language: The Grammar and Stylesheet


Translators
Fuzzy Markup Language (FML) is an emerging XML-based markup language
whose main aim is the design and implementation of fuzzy controllers (FLC). In
particular, it is used to model two well-known kind of fuzzy controllers: Mamdani
and Takagi-Sugeno-Kang (TSK). FML programs are coded through a collection of
correlated semantic tags capable of modeling the different components of a classical
fuzzy controllers by exploiting abstraction benefits offered by XML tools. Different
from other similar approaches used to describe fuzzy controllers such as Fuzzy Control Language1 (FCL) or MATLAB Fuzzy Inference System (FIS) developed by the
Mathworks2, FML allows fuzzy designers to simply code their ideas on heterogeneous hardware without having understanding about details related to the different
platforms. This approach enabling fuzzy systems designers to achieve the so-called
property named design transparency. It means that, thanks to FML, it is possible to
implement the same FLC on different hardware architectures with a minimal effort,
without additional design and implementation steps. In short, thanks to FML it is
possible to model a fuzzy controller in human-readable and hardware independent
way. 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 systems 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 use
them for writing complex FML programs. Finally, it will be provided some details
about the development of XSLT transformations that will allow FML programs to
be run on particular hardware architectures.

2.1 FML Syntax: XML Tags and Attributes


This section is devoted to formally introduce the different components that define
the syntax and semantic of our fuzzy-oriented language. In order to achieve this
result it is useful to analyze a fuzzy controller by a structural point of view highlighting the different controllers parts that, successively, will be modeled through
opportune FML tags. Precisely, the high-level structure of fuzzy controller is shown
in Fig.1 and, the main components of a fuzzy controller are:
fuzzy knowledge base;
fuzzy rule base;
1
2

http://www.fuzzytech.com/binaries/ieccd1.pdf
http://www.mathworks.com/

20

G. Acampora

Knowlegde Base

Rule Base

Real Valued
Inputs

Real Valued
Outputs
Fuzzifier

Input Fuzzy Sets

Defuzzifier

Fuzzy
Inference Engine

Output Fuzzy Sets

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 human experts. The Fuzzy Rule Base represents the set of relations between fuzzy
variable defined in the controller system. The Inference Engine is the fuzzy controller component able to extract new knowledge from fuzzy knowledge base and
fuzzy rule base. Moreover, the controlled system works with real numbers, whereas
the fuzzy controller system works with fuzzy concepts. The two subsystems, the
fuzzification subsystem and the defuzzification subsystem, are necessary to bridge
controlled systems with controller systems. The former permits to transform the real
numbers used by controlled systems into a fuzzy set used by fuzzy controller. The
latter transforms the fuzzy set generated by fuzzy controller into real numbers usable
by controlled system. The nature of consequent part of fuzzy rules permits to define
two kind of fuzzy controller: the Mamdani controller and the Takagi-Sugeno-Kang
(TSK) controller. The Mamdani controller uses a fuzzy set to model the consequent
part of rule, whereas the TSK controller uses the linear function of input variable to
describe the rule consequent part. FML permits to model both fuzzy controllers.
FML uses an alternative representation of fuzzy controller in order to derive an
XML-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 the
father-child relation represents a nested relation between related tags. Starting from
Fig. 2 it is simple to individuate the collection of XML tags capable of modeling a
fuzzy controller.
Hereafter, the description of FML tags is provided. For sake of simplicity, and
to better introduce the operating concepts, the discussion is focused on a Mamdani
fuzzy controller useful to model Tipper Inference System described in Mathwork
MatlabTM Fuzzy Logic Toolbox Tutorial. The described system is used to regulate
the tipping in, for example, a restaurant. It has got two variables in input (food and

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 Cheap


IF THEN Tip is Average

IF THEN Tip is Generous

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-Kang
system to show how FML manages this kind of controller.
In details, the controller node can be modeled by means of a tag named <FUZZYCONTROLLER>. Such tag represents the root tag of FML program, that is, the
opening tag of each FML program.
The tag <FUZZYCONTROLLER> which has two attributes: name and ip. The
name attribute permits to specify the name of fuzzy controller and ip is used to
define the location of controller in a computer network. The fuzzy knowledge base
is defined by means of the tag <KNOWLEDGEBASE> which maintains the set
of fuzzy concepts used to model the fuzzy rule base. In order to define the fuzzy
concept related controlled system, <KNOWLEDGEBASE> tag uses a set of nested
tags:
<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 linguistic term describing the fuzzy concept; the set of tags defining the shapes of fuzzy
sets 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 of
fuzzy 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 fuzzy
concept, i.e, the set of real values related to fuzzy concept; the position of fuzzy

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 a
method that permits the combination of results of a variable of each rule in a final
result; defuzzifier attribute defines the method used to execute the conversion from
a fuzzy set, obtained after aggregation process, into a numerical value to give it in
output to system; defaultValue attribute defines a real value used only when no rule
has fired for the variable at issue.
<FUZZYTERM> uses two attributes: name used to identify the linguistic value
associate with fuzzy concept and complement, a boolean attribute that defines, if it
is true, it is necessary to consider the complement of membership function defined
by 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 corresponding fuzzy set. The number of these attributes depends on the chosen fuzzy set
shape. For instance, the <TRIANGULARSHAPE> tag uses three parameters. A
special 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 modeling is performed via a set of <POINT> tags that lists the extreme points of
geometric 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 in
defining our fuzzy control, the knowledge base, and in particular the quality of food
can be modeled through the FML code in listing 1.
The fuzzy right subtree is used to define the rule base set. Indeed, it is possible
to define more rule bases to describe the different behaviors of system. The root
of this rule base is modeled by <RULEBASE> tag which defines a fuzzy rule set.
The <RULEBASE> tag uses five attributes: name, type, activationMethod, andMethod and orMethod. Obviously, the name attribute uniquely identifies the rule
base. The type attribute permits to specify the kind of fuzzy controller (Mamdani or
TSK) respect to the rule base at issue. The activationMethod attribute defines the
method used to implication process; the andMethod and orMethod attribute define,

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= fo o d 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 = i n p u t >
<FuzzyTerm name= d e l i c i u s c o m p l e m e n t = 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= r a n c i d c o m p l e m e n t = 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>
</ F u z z y V a r i a b l e >
........
<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 = o utput >
<FuzzyTerm name= a v e r a g e c o m p l e m e n t = 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 c o m p l e m e n t = 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= g e n e r o u s e c o m p l e m e n t = 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>
</ F u z z y V a r i a b l e >
<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 single
rule 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; 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 <ANTECEDENT>
and <CONSEQUENT> tags. <CLAUSE> tag is used to model the fuzzy clauses
in antecedent and consequent part. This tag use the attribute modifier to describe a
modification to term used in the clause. To complete the definition of fuzzy clause
the 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 antecedent
part is formed by two clauses: (food is rancid) and (service is poor). The first antecedent clause uses food as variable and rancid as fuzzy term, whereas, the second
antecedent clause uses service as a variable, poor as fuzzy term and very as modifier; 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 different output variable tip. The <TSKVARIABLE> tag is used to define an output
variable that can be used in a rule of a Tsk system. This tag has the same attributes
of a mamdani output variable except for the domainleft and domainright attribute

24

G. Acampora

because a variable of this kind (called tsk-variable) hasnt a universe of discourse.


The nested <TSKTERM> tag represents a linear function and so it is completely
different from <FUZZYTERM>. The <TSKVALUE> tag is used to define the coefficients of linear function. The following crunch of fml code shows the definition
of output variable tip in a Tsk system.
<R u l e B a s e name= R ul e ba s e 1 a c t i v a t i o n M e t h o d =MIN andMethod =MIN
o r Me t h o d=MAX t y p e =mamdani >
<R u l e name= r e g 1 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 >
<A n t e c e d e n t>
<C l a u s e>
<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>
</ C l a u s e>
<C l a u s e m o d i f i e r = v e r y >
<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>
</ C l a u s e>
</ A n t e c e d e n t>
<C o n s e q u e n t>
<C l a u s e>
<V a r i a b l e >t i p </ V a r i a b l e >
<Term>c h e a p </Term>
</ C l a u s e>
</ C o n s e q u e n t>
</ Rule>
........
</ R u l e B a s e>

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

The FML definition of rule base component in a Tsk system doesnt change a
lot. The only different thing is that the <CLAUSE> tag doesnt have the modifier
attribute. 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 how
fml language define a rule base with this rule.
FML has been designed to be simply embedded into distributed artificial intelligence environment and, for this reason, some tags use an additional, not fuzzy
logic oriented, attribute exploited to move the different components of a controller
on different computational hosts in order to achieve a massive parallelization during
fuzzy inference. The additional attribute is named ip and it is used by the following 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 used
to create fuzzy expressions. However, in order to realize a well-formed XML-based

FML for Enabling Full Interoperability in Fuzzy Systems Design

25

<?xml v e r s i o n = 1 . 0 e n c o d i n g =UTF8?>
<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>
...
<T SK V a ri a b l e 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 = o utput >
<TSKTerm name= a v e r a g e 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= g e n e r o u s e o r d e r = 1>
<TSKValue >0.6</TSKValue>
<TSKValue >1.3</TSKValue>
<TSKValue >1.0</TSKValue>
</TSKTerm>
</ T SK V a ri a b l e>
<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

<R u l e B a s e name= R ul e ba s e 1 a c t i v a t i o n M e t h o d =MIN andMethod =MIN o r Me t h o d=MAX


t y p e = t s k >
<R u l e name= r e g 1 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 >
<A n t e c e d e n t>
<C l a u s e>
<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>
</ C l a u s e>
<C l a u s e>
<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>
</ C l a u s e>
</ A n t e c e d e n t>
<C o n s e q u e n t>
<C l a u s e>
<V a r i a b l e >t i p </ V a r i a b l e >
<Term>c h e a p </Term>
</ C l a u s e>
</ C o n s e q u e n t>
</ Rule>
....
</ R u l e B a s e>

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

language, an FML context-free grammar is necessary and described in the following. The FML context-free grammar is modeled by XML file in the form of a XML
Schema Document (XSD) which expresses the set of rules to which a document
must conform in order to be considered a valid FML document.
Based on the previous definition, the portion of the FML XSD regarding the
knowledge base definition is given (see listing 2.2).

26

G. Acampora

<x s : schema xmlns : x s = h t t p : / / www. w3 . org / 2 0 0 1 / XMLSchema>


........
<x s : complexType name= KnowledgeBaseType >
<x s : s e q u e n c e>
<x s : c h o i c e m i n O c c u r s= 0 maxOccurs= unbounded >
<x s : e l e m e n t name= F uz z y V a r i a bl e t y p e = F uz z y V a r i a bl e T y pe/>
<x s : e l e m e n t name= TSKVariable t y p e = TSKVariableType />
</ x s : c h o i c e >
</ x s : s e q u e n c e>
</ x s : complexType>
<x s : complexType name= F uz z y V a r i a bl e T y pe>
<x s : s e q u e n c e>
<x s : e l e m e n t name= FuzzyTerm t y p e = FuzzyTermType maxOccurs= unbounded />
</ x s : s e q u e n c e>
<x s : a t t r i b u t e name=name t y p e = x s : s t r i n g u s e = r e q u i r e d />
<x s : 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>
<x s : s i m p l e T y p e>
<x s : r e s t r i c t i o n b a s e = x s : s t r i n g >
<x s : p a t t e r n v a l u e =MM|COG|COA|WA| Custom />
</ x s : r e s t r i c t i o n >
</ x s : s i m p l e T y p e>
</ x s : a t t r i b u t e >
<x s : a t t r i b u t e name= a c c umul a ti o n d e f a u l t =MAX>
<x s : s i m p l e T y p e>
<x s : r e s t r i c t i o n b a s e = x s : s t r i n g >
<x s : p a t t e r n v a l u e =MAX|SUM/>
</ x s : r e s t r i c t i o n >
</ x s : s i m p l e T y p e>
</ x s : a t t r i b u t e >
<x s : a t t r i b u t e name= s c a l e t y p e = x s : s t r i n g />
<x s : a t t r i b u t e name= d o m a i n l e f t t y p e = x s : f l o a t u s e = r e q u i r e d />
<x s : a t t r i b u t e name= do ma i n r i g h t t y p e = x s : f l o a t u s e = r e q u i r e d />
<x s : 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 = x s : f l o a t d e f a u l t = 0 />
<x s : a t t r i b u t e name= t y p e d e f a u l t = i n p u t >
<x s : s i m p l e T y p e>
<x s : r e s t r i c t i o n b a s e = x s : s t r i n g >
<x s : p a t t e r n v a l u e = i n p u t | output />
</ x s : r e s t r i c t i o n >
</ x s : s i m p l e T y p e>
</ x s : a t t r i b u t e >
</ x s : complexType>
<x s : complexType name= FuzzyTermType>
<x s : c h o i c e >
<x s : e l e m e n t name= R ightL i ne ar Shape t y p e =TwoParamType/>
<x s : e l e m e n t name= L e ftL ine a r Shape t y p e =TwoParamType />
<x s : e l e m e n t name= PIShape t y p e =TwoParamType />
<x s : e l e m e n t name= T r i angular Shape t y p e = ThreeParamType />
<x s : e l e m e n t name= GaussianShape t y p e =TwoParamType/>
<x s : e l e m e n t name= R ightGaus s i anShape t y p e =TwoParamType/>
<x s : e l e m e n t name= L e ftGaus s i anShape t y p e =TwoParamType/>
<x s : e l e m e n t name= TrapezoidShape t y p e = FourParamType/>
<x s : e l e m e n t name= S i n g l e t o n S h a p e t y p e =OneParamType/>
<x s : e l e m e n t name= R e c tangular Shape t y p e =TwoParamType/>
<x s : e l e m e n t name= ZShape t y p e =TwoParamType/>
<x s : e l e m e n t name= SShape t y p e =TwoParamType/>
<x s : e l e m e n t name= UserShape t y p e = UserShapeType />
</ x s : c h o i c e >
..........
</ x s : schema>

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

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, the
so-called eXtensible Stylesheet Language Translator (XSLT) is provided to change
this static view to a computable version. In particular, the XSLT technology is used
convert a fuzzy controller description into a general-purpose computer language to
be computed on several hardware platforms. In our experiments, a XSLT converting
FML program in runnable Java code has been implemented. In this way, thanks
to the transparency capabilities provided by Java virtual machines, it is possible to
obtain a fuzzy controller modeled in high level way by means of FML and runnable
on a plethora of hardware architectures through Java technologies. However, XSLT
can be also used for converting FML programs in legacy languages related to a
particular hardware or in other general purpose languages. 4 shows an example of
application of XSLT devoted to translate FML programs to Java code runnable in a
multi-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 a
novel 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 of
rules can be uncertain (words mean different things to different people).
2. Consequents may have a histogram of values associated with them, especially
when 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.

28

G. Acampora

Type-2 fuzzy systems are able to represent such uncertainties because their membership functions are themselves fuzzy.
Hereafter, it will be introduced an extension of the FML grammar allowing system 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 FMLbased system is represented through the tag <FuzzyController> characterized by
two attributes: name and ip. The name attribute permits to specify the name of the
fuzzy controller under design and ip is used to define the location of controller
in a computer network. Nested into tag <FuzzyController>, there are two tags,
<KnowledgeBase> and <RuleBase>, which model, respectively, the knowledge
base and the rule base of a fuzzy controller. Different from original FML grammar, in order to define the set of type-2 fuzzy concepts contained in the knowledge 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 permits 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-1
fuzzy set;
7. defuzzifier which represents the method used to transform this type-1 fuzzy set
in a crisp output for the system;
8. defaultValue which defines a real value used only when no rule has fired for the
variable at issue.
At the same way, in order to define terms of type-2 fuzzy concept, it needs
to use a tag named <Type2FuzzyTerm> nested in <Type2FuzzyVariable> tag.
<Type2FuzzyTerm> tag uses two attributes: name used to identify the linguistic value associated with fuzzy concept and complement, i.e., a Boolean attribute
that defines, if it is true, it is necessary to consider the complement of a membership function defined by given parameters. Some nested tags (listed in 1) in
<Type2FuzzyTerm> are provided by Type-2 FML to describe the membership
function of a term of type-2 fuzzy concept. In turn, every shaping tag uses two
nested tags, <UMF> and <LMF>, to define respectively the UMF and the LMF of
the type-2 fuzzy set. <LMF> and <UMF> tag uses a set of attributes, which defines parameters of corresponding type-1 fuzzy set. The number of these attributes
depends on the chosen fuzzy set shape. A special tag that can furthermore be used
to define a fuzzy shape is <Type2UserShape>. This tag is used to build a type-2
fuzzy 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>

FML for Enabling Full Interoperability in Fuzzy Systems Design

29

Table 1 Tags Defining the Type-2 Membership Function


Tag name
<Type2TriangularShape>
<Type2PIShape>
<Type2LeftGaussianShape>
<Type2ZShapeE>

<Type2RightLinearShape> <Type2LeftLinearShape>
<Type2GaussianShape>
<Type2RightGaussianShape>
<Type2TrapezoidShape> <Type2SShape>
<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, activationMethod, andMethod and orMethod. Obviously, the name attribute uniquely
identifies the rule base. The type attribute permits to specify the kind of fuzzy
controller (Mamdani or TSK) respect to the rule base at issue. The activationMethod attribute defines the method used to implication process; the andMethod
and orMethod attribute define, respectively, the and and or algorithm to use by default. In order to define the single rule the <Rule> tag is used. The attributes used
by 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 <Antecedent> and <Consequent> tags. <Clause> tag is used to model the fuzzy clauses
in antecedent and consequent part. This tag use the attribute modifier to describe a
modification to term used in the clause. To complete the definition of fuzzy clause
the nested <Variable> and <Term> tag have to be used.

4 Conclusions
This chapter presented the language details related to FML, a new XML-based language for modeling fuzzy system in abstract and hardware independent way introduced by Giovanni Acampora in 2004 in the context of an ambient intelligence
project. The choice to model fuzzy systems by using XML technologies allows systems designer to solve a strong difficulties related to the implementation of a same
fuzzy system on different hardware architectures and avoid to start a novel and expensive software engineering process. In this paper, the syntax grammar related to
FML has been defined by using the XML Schema, whereas, XSLT has been chosen
has a main technology for converting FML programs in runnable code. In order to
prove the FML scalability and the related power of representation, an introduction

30

G. Acampora

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

References
1. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive domotic framework. IEEE Transactions on Industrial Informatics 2, 97111 (2005)
2. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelligence. Information Sciences 178(3), 631646 (2008)
3. Bernard, J.A.: Use of rule-based system for process control. IEEE Control Systems Magazine 8, 313 (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 activated sludge process. In: Proc. 2nd IFSA Congress, Tokyo, Japan, pp. 282285 (1987)
6. Kinoshita, M., Fukuzaki, T., Satoh, T., Miyake, M.: An automatic operation method for
control rods in BWR plants. In: Proc. Specialists Meeting on In-Core Instrumentation
and Reactor Core Assessment, Cadarache, France (1988)
7. Lee, C.C.: Fuzzy Logic in Control Systems: Fuzzy Logic Controller - Part I. IEEE Transactions on Systems, Man and Cybernetics 20, 404418 (1990)
8. Mamdani, E.H., Assilian, S.: An experiment in linguistic synthesis with a fuzzy logic
controller. International Journal of Man-Machine Studies 7, 113 (1973)
9. Mendel, J.M.: Uncertainty, fuzzy logic, and signal processing. Signal Processing Journal 80, 913933 (2000)
10. Mendel, J.M.: Uncertain Rule-Based Fuzzy Logic Systems: Introduction and New
Directions. Prentice-Hall, Upper Saddle River (2001)
11. Mendel, J.M., Bob John, R.I.: Type-2 Fuzzy Sets Made Simple. IEEE Transactions on
Fuzzy Systems 10, 117127 (2002)
12. Togai, M., Chiu, S.: A fuzzy accelerator and a programming environment for real-time
fuzzy control. In: Proc. 2nd IFSA Congress, Tokyo, Japan, pp. 147151 (1987)
13. Togai, M., Watanabe, H.: Expert system on a chip: An engine for real-time approximate
reasoning. IEEE Expert Systems Magazine 1, 5562 (1986)
14. Watanabe, H., Dettloff, W.: Reconfigurable fuzzy logic processor: A full custom digital
VLSI. In: Int. Workshop on Fuzzy System Applications, Iizuka, Japan, pp. 4950 (1988)
15. Yamakawa, T.: High speed fuzzy controller hardware system. In: Proc. 2nd Fuzzy System
Symposium, Japan, pp. 122130 (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 operations - 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. Workshop
on Fuzzy System Applications, Iizuka, Japan, pp. 5152 (August 1988)
19. Yagishita, O., Itoh, O., Sugeno, M.: Application of fuzzy reasoning to the water purification process. In: Sugeno, M. (ed.) Industrial Applications of Fuzzy Control, pp. 1940.
North-Holland, Amsterdam (1985)

FML for Enabling Full Interoperability in Fuzzy Systems Design

31

20. Yamakawa, T., Miki, T.: The current mode fuzzy logic integrated circuits fabricated by
the standard CMOS process. IEEE Transactions on Computer C-35, 161167 (1986)
21. Yamakawa, T., Sasaki, K.: Fuzzy memory device. In: Proc. 2nd IFSA Congress, Tokyo,
Japan, pp. 551555 (1987)
22. Yasunobu, S., Miyamoto, S.: Automatic train operation by predictive fuzzy control. In:
Sugeno, M. (ed.) Industrial Applications of Fuzzy Control, pp. 118. North- Holland,
Amsterdam (1985)
23. Yasunobu, S., Miyamoto, S., Ihara, H.: Fuzzy control for automatic train operation system. 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 system
based on predictive fuzzy control. Control Theory and Advanced Technology 2, 419432
(1986)
25. Yasunobu, S., Hasegawa, T.: Predictive fuzzy control and its application for automatic
container 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 crane
operation systems based on predictive fuzzy control. In: Proc. 2nd IFSA Congress,
Tokyo, Japan, pp. 835838 (1987)
27. Zadeh, L.A.: Fuzzy sets. Information and Control 8, 338353 (1965)
28. Zadeh, L.A.: Fuzzy algorithm. Information and Control 12, 94102 (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)

Distributing Fuzzy Reasoning through


Fuzzy Markup Language:
An Application to Ambient Intelligence
Giovanni Acampora, Vincenzo Loia, and Autilia Vitiello

Abstract. Fuzzy Markup Language (FML) is a specific-purpose computer language


which is emerging as a standard tool for modeling Fuzzy Logic Controllers (FLCs)
in a human-readable and hardware-independent way. By means of these features
FML allows FLCs designers to define their systems independently from their legacy
representations and provides them with a collection of facilities speeding up the
whole development process of a fuzzy system. However, besides the hardware independence feature, the XML nature of FML makes possible to embed fuzzy reasoning
in computing scenarios characterized by high levels of pervasiveness and ubiquity.
Through this additional feature, FML technology may efficiently distribute pieces
of the global control flow on different devices populating a pervasive environment.
In this chapter, FML features are exploited to implement an agent-based framework
designed for providing proactive and distributed services in an Ambient Intelligent
(AmI) scenario. In particular, FML is combined with a distributed learning strategy
for capturing habits of users that live a smart environment and generating an appropriate collection of services satisfying users preferences. As will be shown by a case
study, the exploitation of FML distributed features simultaneously allows to achieve
the relevant advantage of reducing the fuzzy computation effort and providing the
most 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 Acampora
School of Industrial Engineering, Information Systems, Eindhoven University of Technology,
P.O. Box 513, 5600 MB, Eindhoven, The Netherlands
e-mail: g.acampora@tue.nl
Vincenzo Loia Autilia Vitiello
Department of Computer Science, University of Salerno, 84084 Fisciano, Salerno, Italy
e-mail: loia,avitiello@unisa.it
G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 3350.
c Springer-Verlag Berlin Heidelberg 2013
DOI: 10.1007/978-3-642-35488-5_3


34

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

its use of imprecise information to generate decision. Different from conventional


Aristotelian logic, which requires an extensive understanding of a system, accurate
equations, and precise numeric values, fuzzy logic incorporates an alternative way
of thinking, which allows modeling complex systems by using a higher level of abstraction arising from human knowledge, skills and expertise. However, in spite of
its original aim, today fuzzy logic is mainly used for designing industrial controllers
and intelligent decision making systems because, as stated by Zadehs law of incompatibility, fuzzy frameworks are simpler to design, develop and maintain than
control or intelligent systems based on proportional plus integral plus derivative
(PID) approaches.
Since its birth, Fuzzy Markup Language (FML) [1] [2] contributed to the development and evolution of fuzzy-based intelligent decision systems belonging to
different application fields such as health care, computer games, malware behavioral analysis and so on. The success of this specific-purpose computer language
is mainly due to its capability to model and represent fuzzy reasoning in abstract
way without necessarily taking into account details such as the knowledge about a
specific general-purpose programming language or a given hardware architecture.
The benefits provided by FML are mainly due to the exploitation of XML technologies enabling to code FML programs through a collection of correlated semantic
tags 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 for
combining these tags in legal building blocks;
eXtensible Stylesheet Language Transformations (XSLT) in order to convert a
fuzzy controller coded in FML into a program coded in a specific programming
language and runnable on a give hardware plarform.
However, besides the well-known abstraction features, XML has emerged as a tool
set for creating new frameworks for computer networking. For instance, the collection of technologies used for implementing the web services communication scheme
is mainly based on a XML coding; SOAP and WSDL are two typical samples of
these technologies. Even FML can benefit from these additional XML features and,
in particular, it can exploit these characteristics for distributing fuzzy reasoning on
complex computer networks and minimizing the computational effort related to the
application of fuzzy operators to a plethora of variables composing a pervasive environment. This FML property is particularly advantageous when fuzzy inference engines are used for modeling decisions making systems where the whole knowledge
has 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 used
for enabling the distribution of fuzzy reasoning by using a multi-agent approach.
In particular, FML features are exploited to implement an agent-based framework
designed for providing proactive and distributed services in an Ambient Intelligent
(AmI) scenario. FML is combined with a distributed learning strategy for capturing habits of users that live a smart environment and generating an appropriate

Distributing Fuzzy Reasoning through Fuzzy Markup Language

35

collection of services satisfying users preferences. As will be shown by a case


study, the exploitation of FML distributed features simultaneously allows to achieve
the relevant advantage of reducing the fuzzy computation effort and providing the
most 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 enabling
designers of industrial controllers and intelligent decision making frameworks to
model complex systems by expressing their skills and expertise through simple linguistic rules. Nevertheless, the design activity of a fuzzy system has always been
affected by strong difficulties related to the implementation of a same system on
different hardware architectures, each one characterized by a proper set of electrical/electronic/programming constraints. These difficulties could become very critical when a fuzzy system needs to be deployed in distributed environments populated
by a collection of interacting and heterogeneous hardware devices. Fuzzy Markup
Language (FML) is an XML-based language whose main aim is to bridge the aforementioned implementation gaps by introducing an abstract and unified approach for
designing fuzzy systems in hardware independent way.
FML allows fuzzy systems to be coded through a collection of correlated semantic 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. In
other words, the FML tags used to build a fuzzy controller represent the set of lexemes used to create fuzzy expressions. In order to design a well-formed XML-based
language, an FML context-free grammar is defined by means of a XML Schema
which defines name, type and attributes characterized each XML element. However, 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 provided to change this static view to a computable version. Indeed, XSLTs modules
are able to convert the FML-based fuzzy controller in a general purpose computer
language 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 considered
FML-based system is useful to regulate a lighting system. Indeed, it takes as inputs
the external luminosity level together with the time of day concept and as output
the corresponding internal luminosity. In Fig. 2, it is worth noting that each node
in fuzzy controller tree represents a tag, and the father-child relation represents a
nested relation between related tags.
Some examples of tags are: the FML tag <FuzzyController> used to open any
FML 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 is
characterized by different attributes. For example, the tag <Rulebase> has five

36

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

Knowlegde Base

Rule Base

Real Valued
Inputs

Real Valued
Outputs
Fuzzifier

Defuzzifier

Fuzzy
Inference Engine

Input Fuzzy Sets

Output Fuzzy Sets

Fig. 1 Generic fuzzy controller

Controller

Knowledge
Base

Rule
Base

Luminosity

Time of
Day

Dimmer

IF THEN
Dimmer is High

Fuzzy
Term

Fuzzy
Term

Fuzzy
Term

Antecedent
and
Consequent

IF THEN
Dimmer is Low

IF THEN
Dimmer is Medium

Antecedent
and
Consequent

Antecedent
and
Consequent

Fig. 2 Fuzzy controller tree

attributes: name which uniquely identifies the rule base; type which permits to specify the kind of fuzzy controller (Mamdani or TSK); activationMethod which defines
the 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 provided by XML to distribute the fuzzy reasoning on a computer network in order
to minimize the computational effort required to implement the fuzzy inference on
huge collections of data. In order to achieve this goal, each FML tag can use an attribute named ip which assumes as values network addresses related to a particular
internet-working protocol suite such as, for instance, TCP/IP. This attribute serves to
bind each control independent component mapped by the FML tag such as knowledge base, rule base, and so on, on a on specific host and, consequently, to spatially

Distributing Fuzzy Reasoning through Fuzzy Markup Language

37

distribute a fuzzy system. This additional feature of FML is useful to achieve different benefits, such as:
parallelize the fuzzy inference engine reducing inference time and minimizing
knowledge base and rule base occupancy;
manage distributed knowledge environments, i.e., environments in which the
global knowledge is shared on many points of interested environment, as happens in home automation and intelligent ambient;
exploit mobile agents as a natural and efficient technology to share data distribution and dispatch running code on a network. The last concept is widely deepened
in the rest of the chapter.
The default value of the ip attribute of <FuzzyController> tag is localhost. The internet address value of fuzzy controller is distributed toward the bottom in the parse
tree related to fuzzy program. From this point of view, the Internet address of other
independent components (knowledge base and rule base), if not defined, is overlapped by network address from <FuzzyController> tag. This distributive concept
is also extended to the nodes of the parse tree related to the rule base and knowledge
base: each member of the controller is spread in a scalable and distributed way.
Comparing Figs. 2 and 3, the strong difference between a centralized controller
and a distributed one is clear. In Fig. 2, all components of centralized controller
192.168.0.4

192.168.0.5
Controller

192.168.0.6
Knowledge
Base

Luminosity

Fuzzy
Term

Time of
Day

Dimmer

Fuzzy
Term

Fuzzy
Term

Rule
Base

IF THEN
Dimmer is High

Antecedent
and
Consequent

192.168.0.7

IF THEN
Dimmer is Medium

Antecedent
and
Consequent

192.168.0.7

Fig. 3 Distributed fuzzy controller tree

IF THEN
Dimmer is Low

Antecedent
and
Consequent

38

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

are connected by straight lines indicating that all components (knowledge base, rule
base 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 computational
nodes. In particular, Fig. 3 shows a distributed fuzzy controller with Luminosity and
TimeOfDay concepts hosted on 192.168.0.4, Dimmer hosted on 192.168.0.8 and the
rule base shared on 192.168.0.5, 192.168.0.6, 192.168.0.7. This allows to distribute
fuzzy rule base in a uniform way and, thus, to parallelize the evaluation of fuzzy
rules by minimizing inference effort.

3 FML-Based Mobile Agents


This section introduces a multi-agent framework aimed at exploiting the aforementioned FML distributive features in order to move fuzzy computation in a pervasive
environment 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 and
distributed computation. A common model is the client-server model, in which
servers provide services for clients. In the remote procedure call or RPC model [5],
clients invoke (possibly remote) services by performing what looks like a standard
local procedure call. Other models include group communication [4], publishersubscriber, filters [3], and distributed shared memory [7]. However, during recent
years there has emerged a new computing paradigm in which software entities called
agents move around in heterogeneous networks as part of a distributed computation.
This paradigm offers several possible advantages due to the mobility of agents. The
first is the potential for a reduction in communication traffic. This is achieved by migrating 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, it
may 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 processed in real time despite high network latency or low bandwidth. In this case, the
agent is moved across the low bandwidth/high latency network once, and proceeds
to process data locally. This idea has lately been popularized by HotJava in World
Wide Web environments. Because agent migration is inherently asynchronous, the
agent paradigm is also well suited for mobile computing. In this environment agents
may be off-loaded to servers during a short connection time. It then proceeds to do
some 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

Distributing Fuzzy Reasoning through Fuzzy Markup Language

39

mobile clients, and have the potential to preserve scarce network bandwidth. In this
scenario, it will be introduced an efficient mobile agent approach for distributing
FML programs in pervasive environments and, consequently, minimizing the computational efforts for computing fuzzy inference. In particular, an application to Ambient 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 controller
devices necessary to address Ambient Intelligence frameworks. The real advantage
obtained from the agent distribution is the possibility to distribute the fuzzy rule base
related a generic controller on different hosts composing an ubiquitous environment
and successively apply a parallel inference fuzzy engine on the network.
From this point of view, our approach will simplify the development of complex
systems characterized by a huge number of variables. Indeed, let us suppose to design a fuzzy systems for modeling a framework with N inputs, where each input i
is described by Mi fuzzy sets. A different rule may be written for every intersection
of set descriptions that describes the N inputs. This exhaustive method yields a rule
set composed by RS rules:
N

RS = Mi

(1)

i=1

For real-size application, it is usual to produce very large and complex rule bases that
require a great amount of processor time to be evaluated. Indeed, for fuzzy set theory, the inference process is accomplished by manipulating membership functions,
often demanding a large computational overhead. This prevents many applications
from being implemented in real time without special and custom hardware. Parallel computing approaches could support fuzzy inference process to be computed in
more efficient way than conventional and centralized methods. In particular, multiagent systems and FML, thanks to their capability to implement mobile and hardware independent code, represent a valid integration of technologies for distributing
fuzzy computation in ubiquitous environments.
In order to integrate the mobile agents and FML technology in distributed frameworks, four typologies of agents are necessary: Creator Agents, Stationary Fuzzy
Agents, Inference Agents, and Registry Agents. A Creator agent is responsible to
convert a FML program describing a fuzzy system to a Java code by using the XSLT
transformation and to distribute the different components of the obtained fuzzy object on a computer network in order to yield good performances from the computational point of view. The Creator agent performs the fuzzy resources distribution
by a strong interaction with Stationary Fuzzy agents. Indeed, the main aim of Stationary Fuzzy agents is hosting the collection of Java fuzzy objects like fuzzy variables and fuzzy rules generated by Creator Agents (the location of fuzzy objects is
obtained by ip attribute of FML tags) and enabling a distributed fuzzy inference.

40

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

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

ri


in f erence(rule ji )

j=1

where rule ji is the jth rule hosted on ith Stationary Agent; ri is the number of fuzzy
rule hosted on ith stationary agent; inference() is a function implementing a collection of fuzzy operators (Mamdani or TSK) useful for firing the jth rule; Ci is a fuzzy
operator (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 Inference Agent sequentially migrates on Stationary Agents it gather the fuzzy value
computed in each node in order to accomplish the global inference. In detail, when
the inference agent migrate on the kth stationary agent, it computes the fuzzy value
Fk as follows:
Fk = Ck Fk1
where Ck is the fuzzy value computed by the kth stationary agent and is a fuzzy
operator (Mamdani or TSK) useful for aggregating the first k fuzzy values computed
by the first k stationary agents. The value CNA will represent the global fuzzy inferred
value and, as a consequence, the output of the system.
The Registry agent acts as a kind of yellow pages enabling the inference agent to
find the addresses of Stationary Fuzzy agents. The addresses directory managed by
the Registry Agent is populated by the Creator Agent during the FML translation
process.
Hereafter, it will be provided some details about the implementation of aforementioned agents by using a well-known Java based agent library: Jade. Successively, it
will be shown how FML and agents can simultaneously be used for designing and
implementing an ambient intelligence framework capable of providing people with
a 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 framework, it is necessary to work with a programming platform able to manipulate the
multiagent system concept. TiLab Jade [6] is a Java-based platform used in our realization. Each computer on the network needs to run a Jade Container, the agent runtime environment. In order to define the software agents Jade provides the Agent
class that represents the super class of any distributed fuzzy control framework
agent. The job executed by each agent is defined using the Behavior class. The
creation of a JADE agent is as simple as define a class extending the jade.core.Agent

Distributing Fuzzy Reasoning through Fuzzy Markup Language

41

class and implementing the setup() method. The setup() method is intended to
include agent initializations. Each agent is identified by an agent identifier represented as an instance of the jade.core.AID class. A behavior represents a task
that an agent can carry out and is implemented as an object of a class that extends
jade.core.behaviors.Behavior. In order to make an agent to execute the task (implemented by a behavior object) it is enough to add the behavior to the agent by
means of the addBehavior() method of the Agent class. Behaviors can be added
at any time: when an agent starts (in the setup() method) or from within other behaviors. Each class extending Behavior must implement the action() method, that
actually defines the operations to be performed when the behavior is in execution
and the done() method (returns a boolean value), that specifies whether or not a behavior is completed and has to be removed from the pool of active behaviors. Agent
communication is implemented by asynchronous message exchange. In order to realize the multi-agent fuzzy system, it is necessary to define the behavior associated
to agents defined in previous section. Table 1 shows the identifiers used to name the
agents in our implementation.
Table 1 JADE Agent Name
Agent
Creator Agent
Stationary Agent
Registry Agent
Inference Agent

Name
creatorAgent
stationaryAgentIP where IP is the host address
registryAgent
inferenceAgent

The Creator Agent uses a single behavior, creatorBehavior, necessary to instantiate 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 defined
in FML code. This method is called by the method action() of creatorBehavior. The
behavior associated to a stationaryAgent receives this message, builds a new fuzzy
concept (variable or rule) and registers it on registryAgent using tha FIPA ACL messages. The registryAgent behavior accepts incoming messages from stationaryAgent
and, using a hash table, registers the fuzzy information together with host data.
Then the inferenceAgent, shown in Fig. 5, using FIPA ACL messages, requires
information about stationary agents that manipulate the distributed fuzzy rule base
in order to apply the parallel migration process in automatic way.
The inference process is applied overlapping the afterMove() method of Jade
Agent class. This method, using a double input vector, applies the classic operator
of fuzzy inference on any stationaryAgent collecting the deduced values using the
defuzzification operator in incremental way (an application for each migration).
In the next section, it will be shown how the proposed Jade agents will interact
in order to create an adaptive and proactive AmI scenario.

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 candidate
to become the next wave of computing (see Fig. 6). Indeed, this novel computing approach is aimed to extend ubiquitous vision by incorporating intrinsic intelligence in
pervasive systems. This idea enables the study, design and development of embodiments for smart environments that not only react to human events through sensing,
interpretation and service provision, but also learn and adapt their operation and
services to the users over time. These embodiments employ contextual information
when available, and offer unobtrusive and intuitive interfaces to their users. Through
a user-oriented employment of communication links, systems based on this novel
paradigm can also offer ambient communication and media delivery options among
users allowing for seamless multi-party interactions and novel social networking
applications.
In this section, an adaptive ambient intelligence application, based on multi-agent
FML, is introduced. In particular, the proposed framework extends the multi-agent
FML system by using a collection of additional agents capable of understanding
users preferences and generating a collation of FML rules satisfying users needs
and requirements. These rules will be distributed in the pervasive environment by
means of the above approach in order to completely exploit the computational power
provided by ubiquitous devices composing the ambient intelligence space. In detail,

Pervasiveness

Distributing Fuzzy Reasoning through Fuzzy Markup Language

Interfaces

43

Computer
Network

Processor

Storage

Mobile
Energy
2010 Intelligence
pervades Environments
2000-2010
Computer Systems
become Ubiquitous
1980-90
Mobile Computer
is born
1960
Computer is born

1970
Computers
Communicate

Time
(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 automatic
generation of FML rules. In order to achieve this aim, each device is manipulated
by 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 and
context agent. The acquisition agents represent a smart access point to the corresponding domestic device (thermostat, light switch, light lamp, etc.). The context
agent works as a supervisor: it receives information on users habits from the acquisition agents and adapts the overall fuzzy rule base taking into account the new user
actions. The interaction between acquisition agents and context agent is based on
two different strategies:

44

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

synchronized messages exchange;


behavioral learning queue operations.
Synchronized messages allow communication agents to coordinate the operations
resolving the eventual conflict problems. Behavioral learning queue is used as simple abstract data type necessary to serialize the asynchronous activities. In more
detail, the agents exploit four kinds of message sending.
1.
2.
3.
4.

Users action message (asynchronous).


Context updating messages (synchronous).
Context updating output messages (synchronous).
Update FML rulebase (synchronous).

When an user executes an operation on a home device, the corresponding acquisition


agent sends an asynchronous users action message, reporting the new status of the
device to the related context agent. The context agent adds this message into its behavioral learning queue. When this request is extracted from the queue, the context
agent broadcasts synchronous context updating messages to the other context agent
and remains in a waiting status. At the reception of context updating messages, the
acquisition agents reply by sending a context updating message containing as the
updating done on the involved device. The context agent uses the asynchronous
users action message together with context updating output messages to generate
a new fuzzy rule, converts this rule into FML, and finally updates the overall fuzzy
rule base. In particular, the context agent uses the fuzzy concepts together with fuzzy
operator as maximum of value fuzzification in order to translate the numerical information received from acquisition agent into linguistic value necessary to compose
the fuzzy rule.
In the descriptive example illustrated in Fig. 7, the user switches on a lamp by
using the light switch. The corresponding acquisition agent sends a message (label
1) to the context agent informing it about the new users action. Now, it is necessary
to acquire an extended knowledge about the status of the other devices in order to
obtain the context related to the users action. This task is performed by the context
agent that contacts the acquisition agents of the other devices (message with label
2) and remains in a waiting status. The contacted acquisition agent reads the status
of its device and sends this information to the context agent.
Once all the reply messages (messages with label 3) are obtained, the context
agent is able to compose the new context arising from the last users action. The
fuzzification of the users action and the environment status permits to obtain a single fuzzy rule coding this state. An example of fuzzy rule generation is given in
Fig. 8. In this example, the user sets the indoor temperature value at 20C , the thermostat acquisition agents sends a messages reporting the new temperature value to
its context agent. The other acquisition agents send the actual status of the related
devices (temperature and luminosity sensors) to the context agent. At this point,
the context agent synthesizes the numerical information received from acquisition

Distributing Fuzzy Reasoning through Fuzzy Markup Language

45

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

User Context
Light Switch
Acquisition Agent

FML
Rule Base

4
Context Agent

Environmental Context

2
Indoor Temperature
Acquisition Agent

2
3

2
3

2
3

Outdoor Temperature
Acquisition Agent

Indoor Luminosity
Acquisition Agent

Outdoor Luminosity
Acquisition Agent

Presence Sensor Acquisition Agent

Adaptive Context

Message Types
1. User's Action Message
2. Context Update Message
3. Context Update Message Return Value
4. Update FML Rule Base

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 (message
with label 4).

46

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

Smart Environment

Medium

Medium

Low

High

Low

High

0.85
0.80
0.46
0.30

0.24
0

12

15

Low (9 ) = 0.85
M edium (9 ) = 0.24
High (9 ) = 0.0

18 22
0
Temperature (C)
Low (20 ) = 0.0
M edium (20 ) = 0.30
High (20 ) = 0.48

25

40

50

60 75
Luminosity (Lux)

Low (43Lux) = 0.0


M edium (43Lux) = 0.8
High (43Lux) = 0.0

Temperature si High
InternalTemp is Low

InternalLum is Medium

Fuzzification

IF (InternalTemp is Low) AND (internalLum is Medium)


THENSmart
(Temperature
is High)
Environment
Smart Environment

Fig. 8 Rule generation example

Fig. 9 gives a view of the overall architecture considering the new layer Learning 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 execution
and mobile processing), as discussed in the previous sections.

Distributing Fuzzy Reasoning through Fuzzy Markup Language

47

Smart Environment

Learning
Acquisition Agent

Acquisition Agent

Acquisition Agent

FML
Rule Base

Context Agent

Creator Agent

Control
Stationary
Fuzzy Agent

Stationary
Fuzzy Agent

Stationary
Fuzzy Agent

Regitry Agent

Agent Migration

Agent Migration

Inference Agent

Fuzzy Output

Crisp Output

Defuzzification
System

Fuzzy Input
Fuzzification
System

Crisp Input

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 parametric
function, called totalTime, having as its domain the set of fuzzy rules usable in
domotic 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

48

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

localTime(x)
+ overhead(k)
(2)
k
where x represents the fuzzy rule base cardinality, k is the number of the simulation
hosts, localTime is a function representing the mean time of inference application
operator on host i with i = 1, 2, . . . , k, and overhead(k) is a function representing the
overhead due to communication between k systems. Our experiment uses a set of
three stationary agents (k = 3).
Fig. 10 shows the time improvement obtained comparing the distributed agentbased approach versus the centralized one [Fig. 10(a)-(b)]. By analyzing Fig. 11, it
is evident that with a number of rules less than 20, the overhead due to the distribution makes the distributed system ineffective to the centralized one [see details
in Fig. 11(a)-(b)]. This threshold does not represent a limitation, since real-size domotic environments are rich of devices. In particular, the experiment shows that with
a number of rules graeater than 20 the overhead value becomes a costant value (indipendently from k), so that the asymptotic totalTime value depends mainly from
totalTime(x)
.
k
totalTime(x, k) =

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

Ambient Intelligence environments incorporate many sensors and actuators into


the reactive control scheme, so that, the number of the fuzzy rules is so high that
totalTime(x)
overhead(k) value becomes an infinitesimal costant value with respect to
k
so, it is possible to rewrite the totalTime formula for this kind of application as
follows:
totalTime(x, k) =

localTime(x)
+c
k

(3)

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

Distributing Fuzzy Reasoning through Fuzzy Markup Language

49

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

limk0 localTime(x)
+ c = +
k
localTime(x)
+c = 0
limk+
k

(4)

which proves the performance improvement.

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

References
1. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive domotic framework. IEEE Transactions on Industrial Informatics 2, 97111 (2005)
2. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelligence. Information Sciences 178(3), 631646 (2008)

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. Commununications of the ACM 36, 3653 (1993)
5. Birrell, A.D., Nelson, B.J.: Implementing remote procedure calls. ACM Transactions on
Computer Systems 2, 3959 (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 distributed shared memory efficiently. In: Casavant, T.L., Singhal, M. (eds.) Piscataway,
Readings in Distributed Computing Systems, pp. 387408. 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 (December
2003), http://www.w3.org/TR/2003/WD-xsl11-20031217/
10. Zadeh, L.: Fuzzy sets. Information and Control 8, 338353 (1965)
11. Zadeh, L.: Fuzzy logic and its application to approximate reasoning. In: Proc. IFIP
Congr. on Information Processing 1974, vol. 3, pp. 591594 (1974)

An Enhanced Visual Environment


for Designing, Testing and Developing
FML-Based Fuzzy Systems
Giovanni Acampora, Vincenzo Loia, and Autilia Vitiello

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

1 Introduction
Fuzzy logic was introduced by Zadeh as a way to generate decisions using
imprecise information and approximate reasoning [18]. It has been successfully
Giovanni Acampora
School of Industrial Engineering, Information Systems, Eindhoven University of Technology,
P.O. Box 513, 5600 MB, Eindhoven, The Netherlands
e-mail: g.acampora@tue.nl
Vincenzo Loia Autilia Vitiello
Department of Computer Science, University of Salerno, 84084 Fisciano, Salerno, Italy
e-mail: {loia,avitiello}@unisa.it
G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 5170.
c Springer-Verlag Berlin Heidelberg 2013
DOI: 10.1007/978-3-642-35488-5_4


52

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

exploited in a lot of applications such as pattern recognition, intelligent internet


query, knowledge engineering, decision support, and, especially, control
theory [9]. Indeed, Fuzzy Logic Controllers (FLCs) represent one of the most successful methodologies which exploits fuzzy logic to model complex systems characterized by ambiguity and vagueness. In details, FLCs designers define systems
behavior by expressing their knowledge and experience through so-called linguistic rule bases, rather than by means of mathematical models. This fuzzy modeling allows to reduce complexity of system design and, especially, it shows its
relevant suitability, when the mathematical model is too difficult to formulate or, if
formulated, it is too complicated to evaluate in real time. The success of FLCs is
witnessed by the enormous variety of developed applications which aims at modeling 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 water 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 depends upon hardware architecture which implements the running version of designed systems. The negative impacts of this drawback further grow when fuzzy
control approaches are used for modeling the behavior of ubiquitous frameworks in
distributed computing environments composed by collections of interacting and heterogeneous hardware devices. In order to overcome this drawback, an XML-based
language, named Fuzzy Markup Language (FML) [1] [2], has been introduced. By
exploiting XML benefits, FML allows designers to define a detailed structure of a
FLC independent from its legacy representation by providing them with a set of facilities speeding up the whole development process of a centralized or distributed
fuzzy system.
More in detail, FML benefits derive from the exploitation of an alternative representation of a FLC based on labeled trees [15], data structures defined by means
of the well-known graph theory and derived by the XML-based document representation. As shown in the Sect. 2, it is possible to define a FLC through a labeled
tree structure composed of two sets, FLC and EFLC , which represent, respectively,
the collection of labels modelling the main components of a FLC and the collection
of father-child relationships existing among them. In particular, FML fundamentals 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 grammar
syntax of FML. The representation of a FLC through a labeled tree structure not
only leads to an independent-hardware description of a FLC, but also it allows
its graphical modeling. This further benefit provided by this new FLC representation can be used to implement a framework which allows designers to easily model
a FLC.
The aim of this work is to present an enhanced visual environment, named Visual FML tool, capable of exploiting labeled tree benefits by achieving a twofold
purpose: the simplification of the FLC design through simple visual steps and a

An Enhanced Visual Environment for FML-Based Fuzzy Systems

53

hardware-independent FLC modeling thanks to the direct mapping of the FLC labeled tree in a FML program. In particular, the visual environment allows designers
to define a FLC without knowing the syntax and semantics of FML. Apart from
simplifying FLC development design, Visual FML Tool reduces design process time
thanks to the exploitation of the concept of variable type. In detail, a type represents
the structure of a variable in terms of its membership functions. The introduction
of this concept allows to separate the information about the fuzzy concept such as
name, unit scale and so on, from its structure. Therefore, if the fuzzy system is
characterized by more variables with the same structure, designers can simply use
the type already defined for the first variable with that structure, by obtaining, as
a consequence, a decrease of design time. Visual FML Tools functionalities cover
all different steps of the fuzzy system design process. In particular, the functionalities made available from tool are the fuzzy system design, the fuzzy inference
execution, the tuning of fuzzy membership functions and the generation of a highlevel language description. These functionalities are described in a better way in the
Sect. 3. In the future, the idea is to enrich the functionalities of Visual FML Tool
by allowing designers to model also type 2 FML-based FLCs in a simple and a
hardware-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 FCLs
modeling. The tool simplifies the FCL design by exploiting a graphical representation of a FCL based on labeled trees. For this reason, in this section, a detailed
description 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 formally: 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 of
unordered distinct vertices called edges, and a a total function a : E E . Then
G = (V, l, E, a) is a labeled graph. A labeled tree is a connected, acyclic labeled
graph. Labeled tree labels may be constants, node variables (corresponding to any
node value), or path variables (corresponding to any path). Because the labeled trees
are data models derived by the XML-based document representation, constants corresponds 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 attributes
of a given element cannot have the same label. Element nodes can have zero or more
child nodes that can be elements, attributes, or text nodes. Usually, the labels related
to element nodes, attribute nodes and text nodes are denoted, respectively, with ni ,
ai and ti . Then, in the case of XML document modeling:

54

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

V = i {ni }

i {ai }

i {ti }

E = 0/

(1)
(2)

In order to represent an FLC through labeled tree structures, it is necessary to individuate the different components of a FLC, to map them on appropriate values
for the labels ni , ai and ti and, at the same time, to establish the opportune fatherchild relationships among different tree nodes. From a static point of view, a FLC
is 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 to
represent this two components as labeled tree to obtain a FLC labeled tree.
Starting from knowledge base, each fuzzy variable is defined, mainly, by means
of a name, a universe of discourse and a collection of fuzzy terms where, each
fuzzy term can be represented through a pair (Fuzzy Set, Linguistic Expression). For
example, let consider the fuzzy variable named temp modelling the fuzzy concept
temperature. 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 temp
can be so defined:

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 concept
temperature:
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 is
shown in Fig. 2.
A more concise version of set VTemp and ETemp could be obtained by considering
subtrees representing the terms of the fuzzy concept. Considering a fuzzy concept
made up by m terms, it is possible to define the sets VTemp and ETemp as follows:

VTemp = m
i=1 Vtermi VAFC {nV }

(3)

56

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

and
ETemp = m
i=1 Etermi EAFC

(4)

where Vtermi is 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-child
relationships belonging to the labeled subtree of the ith fuzzy term; EAFC is the set
of father-child relationships which connect the fuzzy concept with its attributes and
their text. Considering again the fuzzy concept temperature, the following sets can
be 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 is
possible to model it through a labeled tree whose labels are:

KB = i VFCi {nKB }

(5)

with the following father-child relationships:


EKB = i EFCi

i {(nKB , nFCi1 )}

(6)

where VFCi and EFCi are, respectively, the label collection and the father-child relationships modeling ith fuzzy concept and nKB is a dummy root label joining together
the different fuzzy concepts subtrees.
At the same way, focusing on the second main component of a FLC, the fuzzy
rule base, it is possible to build the labeled tree modeling the fuzzy rule base, as
made for the knowledge base, defining the sets RB and ERB . A rule base is composed by a set of fuzzy rules. Therefore, the first step to build a labeled tree modeling a fuzzy rule base is to build a labeled tree modeling each rule. By considering a
Mamdani fuzzy controller, a fuzzy rule is formed by a fuzzy antecedent and a consequent part and, recursively, the antecedents and consequents can be characterized
by a sequence of fuzzy clauses, where, each fuzzy clause, is represented by means
of a pair (FuzzyVariable, FuzzyTerm) and a modifier. For example, let consider the
first rule of a fuzzy rule base as follows:
IF temp is high and humidity is high then room is very hot (1.0)

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 is
high and humidity is medium, where, respectively, temp and humidity are the FuzzyVariables and high and high are the FuzzyTerms, and by the consequent part room
is very hot, where room is the FuzzyVariable, hot is the FuzzyTerm and very is a
modifier. The two clauses composing the antecedent part are connected through the
operator and which typically is implemented by the min operation. The value 1.0
enclosed into parentheses represents the weight of the rule.
Starting from rule definition, it is possible to identify the following labels (the
subscript R1 stands for 1th rule):
nR11 = Rule
nR12 = Antecedent
nR13 = nR1 = nR110 = Clause
6

nR14 = nR17 = nR111 = FuzzyVariable


nR15 = nR18 = nR112 = FuzzyTerm
nR19 = Consequent
aR11 = name

58

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

aR12 = connector
aR13 = operator
aR14 = weight
aR1 = modi f ier
5

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 fatherchild 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 , nR1 ), ..., (nR14 ,tR1 ), ..., (nR1 , nR1 ), ...}
6

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


ERB = i ERi

i {(nRB , nRi1 )} ERA

(7)
(8)

where VRi and ERi are, respectively, the label collection and the father-child relationships modeling ith fuzzy rule, nRB is a dummy root label joining together
the different fuzzy rules subtrees, VRA represents the set of labels related to attributes of the rule base and their texts and ERA represents the set of father-child

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 and
between attributes and their texts.
At the end, a fuzzy controller can be modeled by means of a labeled tree defined
by 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 possible 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 FML
Tool, exploiting labeled tree-based FCL representation to simplify FML-based
FCLs design. In detail, by exploiting labeled tree benefits, Visual FML Tool (see
Fig. 5) achieves a twofold aim: the simplification of the FLC design through simple
visual steps and a hardware-independent FLC modeling thanks to the direct mapping of the FLC labeled tree in a FML program. Visual FML Tool functionalities
cover all different steps of the fuzzy system design process, from their initial description to the final implementation. Two of its interesting features are that it allows

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 more


complex systems at the same time. The environment is completely programmed in
Java, 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 knowledge base and rule base of the corresponding labeled tree. In particular, tool
allows to define the linguistic variables composing the knowledge base and to organize rules in different rule bases, where each one describes a particular system
behavior;
Verification: the tool allows to monitor the system behavior showing outputs corresponding to different inserted inputs and also it allows to represent graphically
the system behavior showing the control surface;
Tuning: the tool allows to apply algorithms based on neural network and not
only to execute a learning stage and specifically to modify membership functions
using a training data file (under development);
Synthesis: the tool allows to generate high-level language descriptions. At the
moment, 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.

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 systems, 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 corresponding labeled tree. In detail, the main steps in the description of a FLC labeled
tree are creating knowledge base composed by a set of linguistic variables and rule
base expressing the relationships existing among the system variables. The tool allows these steps by means of, respectively, the Variable Editor window shown in
Fig. 6 and the Rulebase Editor window shown in Fig. 10.
A new variable needs the introduction of its name, its scale and its sign (input/output). The defuzzification method, the accumulation one and the default value
are necessary only for output variables and, for this reason, the corresponding text
field are disabled for an input variable. Once a variable has been created it can be
modified in all attributes except for its sign. Each variable must have a so-called type
representing its structure in terms of membership functions. It is possible to create
a type beginning from the Variable Editor window clicking the button with label
New Type or before creating the variable clicking on item New Type from menu Edit
System.
However, the type to associate to a variable can be also selected by the list of
the existing types. This feature of Visual FML tool allows designers to speed their
modeling. In fact, if two variables are characterized by the same structure in terms
of membership functions, the design does not need to define them twice, and as a
consequence, the design process time is reduced. The tool manages two kinds of

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 variable
of a Mamdani system, or to an input variable of a Takagi-Sugeno-Kang system and
the second one, named tsk-type, that can be associated only to an output variable of
a Takagi-Sugeno-Kang system. However, for sake of simplicity, hereafter, only the
creation of a type is shown.
In detail, the first step to create a new type is to insert through the Type Creation
window (shown in Fig. 7 ) its identifier, universe of discourse (domain left and domain right), an initial number of terms and an initial kind of membership function
to choice among the predefined functions: triangular, trapezoidal, rectangular, singleton, gaussian and linear partitions. Besides, Visual FML tool provides a further
kind of membership function represented by the User shape option, which admits to
defining a custom function inserting all points of membership function. Once a type
has been created, it can be edited using the Type Editor window shown in Fig. 8.

Fig. 7 Type Creation window

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 universe
of discourse. Besides it admits to adding, editing and removing the membership
functions(terms) of the edited type. The window shows a graphical representation of
the membership functions, where the selected membership function is represented in
a different color (red). The bottom of the window presents a command bar with the
usual buttons to save or reject the last changes, and to refresh modifications before
saving them. Besides, the Export chart button allows to save the graphical representation as a file with extension .jpeg. It is worth considering that the modifications
on the definition of the universe of discourse can affect the membership functions
already defined. Hence, a validation of the membership function parameters is done
before saving the modifications, and if a membership function definition becomes
invalid 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 and
edited with double click on the terms list which enables the Term Editor window
shown in Fig. 9. In details, the window allows to introduce the name of term, the
kind of membership function, and the parameter values. The right side of the window shows a graphical representation of membership function. The bottom of the
window shows a command bar with four options: Set, to close the window saving
the changes, Refresh, to repaint the graphical representation, Export chart, to save
the graphical representation as a jpeg file, and Cancel, to close the window without
saving the modifications.
The next step in the definition of a fuzzy system is to describe the rule bases
expressing the relationships among the system variables. Initially, by means of the
New 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 are
introduced. Then, the rule base is edited through the window Rulebase Editor (see
Fig. 10). The window is divided into four zones: at the top there are the fields to
introduce the name of the rule base and the activation method; the central zone is
dedicated to showing the contents of the rules included in the rule base; under rules

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 of
the window contains the command bar with the usual buttons to save or reject the
modifications.

3.2 Systems Verification


The verification step in the fuzzy system design process consists in studying the
behavior of the fuzzy system under development. The aim of this step is the detection of probable deviations on the expected behavior and the identification of the
sources of these deviations. Visual FML Tool covers the verification stage with two
functionalities. The first one is Run (see Fig. 11) that shows results of fuzzy inference process. The second one is Surface 3D Plot (see Fig. 12) that implements a
three-dimensional graphical representation of the system behavior.
In detail, Fig. 11 shows the window Rulebase viewer where each row of plots
depicts a rule and each column a variable. Each plot has a name that represents the
terms of variables that build the rule. A blank plot corresponds to the absence of
that variable in that rule. The rule names are displayed on the left of each row. The
real number under rule name represents the weight of rule. By clicking on a rule
name, it is possible to view the rule on the bottom, whereas, the tooltip informs
about connector method of rule. The last plot in the column of plots associated with
an output variable shows the aggregate weighted decision for the given inference
system. This decision will depend on the input values for the system. The initial
input 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 for
input 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 that
results from inference process. Next to output variable name the defuzzification
method is depicted, whereas, the tooltip informs also about accumulation method.

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 a
graphical 3-dimensional representation which illustrates the behavior of the fuzzy
system. In details, the shown surface plot represents one of the output variables of
the system as a function of only two input variables belonging to the system. Therefore, if the system contains more than two input variables, values for the not selected
ones have to be specified by the user. The window is divided into two parts: the left
one is dedicated to configuring the graphical representation, while the right part of
the window is occupied by the surface plot. In order to determine the representation
resolution 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 details
of the system behavior could be ignored. On the other hand, a high value could
make difficult the understanding and the computation of the represented surface.

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 one
is 100. In addition, Visual FML Tool allows to save the produced graphical representation in order to compare it with a new surface obtained by setting a different
configuration. However, the comparison is possible only between surfaces created
using the same input and output variables.

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 of
a human expert expressed linguistically through the IF-THEN rules. However, problems can arise because the way to implement the translation is not unique and/or
the knowledge is not always available or possible to realize. Therefore, many researchers are working on applying automatic tuning techniques to fuzzy systems.
If the tuning affects only the membership functions composing the antecedent and
consequent 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 called
a self-organizing fuzzy system. The tuning techniques existing in literature can be
classified into the following categories: (a) meta-level heuristic rules, which tunes
the system by taking into account the knowledge of an expert; (b) supervised and
non-supervised algorithms taken from the neural network domain, which require a
set of numerical training data; (c) reinforcement learning, which is applied when
the only feedback about the system performance is a reward/punishment signal; and
(d) genetic algorithms, which try to improve the system performance according to a
set of objectives included within adequate fitness function. Typically, if input/output
training data are available, supervised learning algorithms give the best results for
tuning task. Starting from this consideration, Visual FML Tool exploits supervised
learning algorithms to implement the functionality Tuning. The Fig. 13 shows the
window Supervised Learning which is used to configure and to execute the learning
process.
The window is divided into two parts: at the top the area is dedicated to insert
data to configure the learning process, whereas at the bottom the area is used to
execute it. The first stage for setting the configuration is to import a training file
which contains the input/output data showing the desired behavior. The successive
stages are to select the learning algorithm and the error function (which measures
the deviation of the fuzzy system behavior from the desired input/output data). Visual FML Tool makes available the following algorithms: BackPropagation [13] e
Conjugate Gradient [10] belonging to gradient descent algorithms. However, the
gradient of the error function cannot always be calculated because it can be too
costly or not defined. In these conditions, optimization algorithms without derivatives are more suitable. With regard to this category of algorithms, the tool offers
Powells method [3]. This kind of algorithms are much slower than the previous
ones. The last category of considered algorithms are the statistical ones. In particular, 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 =

yi j yi j 2
1 1
(
) with i = 1, . . . , N; j = 1, . . . , M.
N M i, j
rj

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 |
) with i = 1, . . . , N; j = 1, . . . , M.
rj

where N is the number of data patterns, M is the number of output variables in the
system, yi j is the jth output generated by system for the ith pattern, yi j is the correct
output 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 tuning
process before (preprocessing) or after (postprocessing) it. One of the simplifications consists in identifying and removing those rules that are never fired sufficiently
by any of the training input/output patterns. The last configuration stage is to select
the termination condition which determines the end of the learning process. The termination criterion can be the number of iterations, the maximum error goal, or the
maximum absolute or relative deviation (considering either the training or the test
error).

3.4 Systems Synthesis


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

An Enhanced Visual Environment for FML-Based Fuzzy Systems

69

enables to translate an FML representation of a FLC into two different kinds of implementation models: software representations and hardware representations. The
software synthesis generates a system representation in a high level programming
language. The hardware synthesis generates a microelectronic circuit that implements the inference process described by the fuzzy system. Currently, Visual FML
Tool provides only software synthesis and only for Java language. The synthesis is
implemented thanks to Extensible Stylesheet Language Transformations (XSLTs)
modules. Indeed, XSLT is able to convert the FML fuzzy controller in a general
purpose computer language using an XSL file containing the translation description. Therefore, Visual FML Tool executes synthesis in Java language thanks to a
defined XSL file.

4 Conclusions
This chapter presented a new enhanced visual environment, named Visual FML
Tool, capable of supporting designers into modeling of FML-based FLCs in an easy
way. Indeed, Visual FML Tool successes to simplify the FLC design process by
exploiting a graphical representation of FLCs based on a labeled tree structure. In
this way, designers achieve the aim of defining FLCs independent from legacy representation through visual steps without knowing syntax and semantics of FML. In
detail, Visual FML Tool functionalities cover all stages which involves FLCs design
process from their initial description to the final implementation. However, as future
work, the idea is to extend Visual FML Tool in order to allow also the modeling of
type-2 FML based FLCs.

References
1. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive domotic framework. IEEE Transactions on Industrial Informatics 2, 97111 (2005)
2. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelligence. Information Sciences 178(3), 631646 (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 NeuroFuzzy Controller in the Washing Machine Control System. In: Second International Conference on Intelligent Computation Technology and Automation, ICICTA 2009, vol. 2,
pp. 818821 (2009)
5. Itoh, O., Gotoh, K., Nakayama, T., Takamizawa, S.: Application of fuzzy control to activated sludge process. In: Proc. 2nd IFSA Congress, Tokyo, Japan, pp. 282285 (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, Saddle
River (1997)
7. Jian-Hua, D., Yan, G.: The development of fuzzy washing machine controller. Emblem
Processor 4, 3639 (1994)

70

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

8. Kinoshita, M., Fukuzaki, T., Satoh, T., Miyake, M.: An automatic operation method for
control rods in BWR plants. In: Proc. Specialists Meeting on In-Core Instrumentation
and Reactor Core Assessment, Cadarache, France (1988)
9. Klir, G.J., Yuan, B.: Fuzzy sets and fuzzy logic: theory and applications. Pearson Publications (1995)
10. Mller, M.F.: A Scaled Conjugate Gradient Algorithm for Fast Supervised Learning.
Neural Networks 6, 525533 (1993)
11. Nasution, H.: Development of Fuzzy Logic Control for Vehicle Air Conditioning System. TELKOMNIKA Indonesian Journal of Electrical Engineering 6(2), 7382 (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 backpropagation. Nature 323, 533536 (1986)
14. Sugawara, S., Suzuki, T.: Application of fuzzy control to air conditioning environment.
J. Therm. Biol. 18(5-6), 465472 (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), 12361240 (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 system. 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, 89100
(1989)

Part II

Fuzzy Markup Language Applications

Apply Fuzzy Markup Language to ASAP


Assessment 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 for


an After School Alternative Program (ASAP) in Taiwan. The Capability Maturity
Model Integration (CMMI)-based assessment system for Taiwans ASAP is constructed by National University of Tainan (NUTN) from 2007 to 2011. The basic process of the assessment systems is as follows. First, domain experts provide
item descriptions to construct the item fuzzy ontology repository. Second, a T-score
scale item map is constructed for each item bank by applying the calibration procedures for the 3-parameter Item Response Theory (IRT) model. Third, student responses stored in the response data repository are processed, analyzed, and then
summarized to obtain the semantic descriptions of student performance level. The
item-map representation then summarizes the performance of each student. Next,
the results are stored in the diagnosis report repository so that users such as the
involved students, teachers, officers, or the ASAP administrator can retrieve the reports through the provided ASAP web platform. Simulation results indicate that
the proposed approach is feasible for large-scale implementation of automatically
generated diagnostic reports for the CMMI-based ASAP assessment system.

Chang-Shing Lee Mei-Hui Wang Yi-Ling Kuo


Dept. of Computer Science and Information Engineering,
National University of Tainan, Taiwan
e-mail: leecs@mail.nutn.edu.tw,
{mh.alice.wang,egmilkcherry}@gmail.com
Pi-Hsia Hung Bort-Hung Lin
Graduate Institute of Measurement and Statistics, National University of Tainan, Taiwan
e-mail: hungps@mail.nutn.edu.tw, teac@nutn.edu.tw
Hui-Min Wang
Computer Center, National University of Tainan, Taiwan
e-mail: ming1966@gmail.com
G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 7393.
c Springer-Verlag Berlin Heidelberg 2013
DOI: 10.1007/978-3-642-35488-5_5


74

C.-S. Lee et al.

1 Introduction
A computerized assessment system can help teachers to assess student performance not only by providing a teaching aid for disadvantaged students in afterschool programs, but also by helping teachers and officials track student learning. Importantly, the disadvantaged students can access the same educational resources provided to mainstream students. To develop such a computerized assessment system in Taiwan, the principles of Capability Maturity Model Integration (CMMI) should be applied to construct an After School Alternative Program
(ASAP) system [19]. Recently, CMMI has been extensively adopted in many research fields. For instance, Staples and Niazi [15] investigated the reasons given
for adopting CMM-based SPI. Sun and Liu [17] applied Quality Function Development (QFD) in a business-oriented software improvement process based on
CMMI. Yoo et al. [22] developed a unified CMMI implementation model for
ISO-certified organizations. Stevens [16] applied CMMI to automated test equipment development. Wangenheim et al. [20] compared popular open source tools
for web-based project management in terms of their support for CMMI development. Integrating CMMI technology with ontology is another important research issue. A system that combines ontology and CMMI technology is needed
to make decisions about organizational activities. Similarly, many considerable
researches on ontology have been proposed. For example, Lee and Wang [8]
proposed an ontology-based computational intelligent multi-agent for CMMI assessment. An ontology-based intelligent decision support agent for CMMI project
monitoring and control was also proposed [9]. However, the inability of classical ontology to accommodate imprecise and vague knowledge in some realworld applications has increased interest in fuzzy ontology [5]. Several researchers
have explored the use of fuzzy ontologies. For example, Lee et al. [10] proposed
a fuzzy ontology for news summarization. Knappe et al. [7] proposed a fuzzy
ontology-based query enrichment. Quan et al. [15] proposed automatic fuzzy ontology generation for semantic web. Computerized assessment systems focus on
enabling teachers to use online tests in order to assess student performance efficiently. By reviewing student responses and testing results stored in the assessment system, teachers can enhance student learning interest by teaching them at
the appropriate performance levels. Some researchers have also applied ontology to
e-learning systems and adaptive learning environments. For example, Pike and Gahegan [12] developed a proof-of-concept system that used this knowledge model to
support learners and researchers in the geosciences domain. Sanchez et al. [16] presented an ontology-based framework for seamlessly integrating intelligent agents
and semantic web services. Tseng et al. [18] proposed a Two-Phase Concept Map
Construction (TP-CMC) approach for automatically constructing the concept maps
based on the historical testing records of learners. Shih et al. [14] proposed an
ontology-based approach for organizing and retrieving learning content in widely

Apply Fuzzy Markup Language to ASAP Assessment System

75

distributed repositories. Yeh et al. [21] designed two optimized self-explanation


prompts for dynamic multi-representational learning environments. In this chapter,
a CMMI-based assessment system for ASAP in Taiwan is introduced. However, the
main research topic of this chapter is focused on Fuzzy Markup Language (FML)based semantic inference mechanism. A simulation of the CMMI-based ASAP assessment system in this study indicates that the proposed approach is feasible for
large-scale diagnoses of student performance, which are provided to teachers in
semantic sentences. The rest of the chapter is organized as follows. Sect. 2 describes the item fuzzy ontology and fuzzy markup language. Sect. 3 then introduces
the CMMI-based ASAP assessment system. Next, Sect. 4 introduces the FMLbased semantic inference mechanism. Sect. 5 summarizes the simulation results.
Conclusions are finally drawn in Sect. 6, along with recommendations for future
research.

2 Item Fuzzy Ontology and Fuzzy Markup Language


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

2.1 Item Fuzzy Ontology


Schools must administer numerous tests each year, and each examination always has
its own item repository. Here, an example of a mathematics test is used to describe
a flowchart for the Taiwan ASAP test. Mathematics experts first select mathematics items from each unit of the student textbooks. For each item, the experts then
define the concepts that teachers expect students to understand after learning. Each
item 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 be
mathematically transformed into other standardized scores. Here, a T score is transformed according to the values of the average and standard deviation of all students
attending the conventional test administration. Each student receives a T score after
completing the test so that teachers can determine if the score is within the average
range. Teachers can also compare the test performance of the student with that of
other students. The mathematic item repository is then established. Third, domain
experts assemble the provided items from the item repository into a test paper and
store it in the form repository. Finally, based on the student response to the test paper, teachers can quickly obtain summaries of student performance for each concept
by using the approach proposed in this chapter.

76

C.-S. Lee et al.

One item also contains multiple concepts that students are expected to understand after completing the course. Expressing the strength of an item relative to
various concepts is difficult when using conventional ontology. To obtain such an
item set, a fuzzy ontology is used to describe the items for the elementary school
students. Fig. 1 gives an example of item fuzzy ontology for mathematics. The domain name is Item for Elementary School. Categories in the category layer include
Mathematics, English, Chinese, and Science. The event layer contains several events
that describe each test, such as 1st Mathematics Test for 6th Grade and 1st Mathematics Test for 1st Grade. The concept layer contains concepts that teachers expect
students to understand after completing the mathematics course. Each concept in
the concept layer has several attributes, such as ID, b value, T score, Test Time, Test
Date, Test Place, Examinee, Performance Level, and Item Type. The instance in the
instance layer represents an instance of the concept in the concept layer. That is, an
instance denotes a single item, each of which has its own ID, b value, T score, Test
Time, Test Date, Test Place, Examinee, Performance Level, and Item Type. Performance Level may be Below Basic, Basic, Proficient, or Advanced. Item Type may
be Number and Operation, Measurement, Algebra, Statistics and Probability, or
Geometry.
The instances in the instance layer also have the relationships with the concepts
in the concept layer. For example, the Percentage Computation instance is related
to the Circle and Graph concepts. Therefore, a Percentage Computation item can
simultaneously test whether students understand both the Circle concept and the
Graph concept. The membership degrees of the Percentage Computation concept
to the 1st Mathematics Test for 6th Grade, 1st Mathematics Test for 1st Grade, 2nd
Mathematics Test for 1st Grade, and 1st Mathematics Test for 4th Grade events are
1, 0, 0, and 0.9, respectively.

2.2 Fuzzy Markup Language


The proposed fuzzy inference model is combined with FML to describe the knowledge base and rule base of the CMMI-based ASAP assessment system. The FML
is a fuzzy-based markup language that can manage fuzzy concepts, fuzzy rules, and
a fuzzy inference engine [1] [4] [3] [4]. The FML also has three layers: eXtensible
Markup Language (XML), a document-type definition, and extensible stylesheet
language transformations. The main components of the fuzzy controller are the
fuzzy knowledge base, fuzzy rule base, inference engine, fuzzification subsystem,
and defuzzification subsystem. Listing 1 shows the knowledge base and rule base
of the proposed approach, where (1) POS (Part-of-Speech) denotes the path tree between two nodes located on the tagging tree, (2) TW (Term Word) denotes the value
of 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 the
term relation strength for any term pair [9] [10] [8].

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 descriptions
of the CMMI-based ASAP assessment system are introduced in the following three
subsections [19].

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 r a p e z o i d S h a p e param1= 0 param2 = 0 param3= 1 param4 =2 />
</FuzzyTerm>
<FuzzyTerm name=Medium>
<T r a p e z o i d S h a p e param1= 1 param2 = 2 . 5 param3= 3 . 5 param4 = 5 />
</FuzzyTerm>
<FuzzyTerm name=Low>
<T r a p e z o i d S h a p e param1= 4 param2 = 5 param3= 6 param4 =6 />
</FuzzyTerm>
</ F u z z y V a r i a b l e >
. . .
</KnowledgeBase>
<R u l e B a s e 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 o r Me t h o d=MAX i p = l o c a l h o s t >
<R u l e 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 >
<A n t e c e d e n t>
<C l a u s e>
<V a r i a b l e >POS</ V a r i a b l e >
<Term>Low</Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >TW</ V a r i a b l e >
<Term>Low</Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >SD</ V a r i a b l e >
<Term>Low</Term>
</ C l a u s e>
</ A n t e c e d e n t>
<C o n s e q u e n t>
<C l a u s e>
<V a r i a b l e >TRS</ V a r i a b l e >
<Term>VeryLow </Term>
</ C l a u s e>
</ C o n s e q u e n t>
</ Rule>
. . .
</ R u l e B a s e>
</ 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 of
products and services related to the product throughout its life cycle from conception
through delivery and maintenance.
By integrating these bodies of knowledge, which are essential for product development, CMMI provides a comprehensive solution for developing and maintaining

Apply Fuzzy Markup Language to ASAP Assessment System

79

Table 1 Purpose of process areas


No

Process Area

Purpose

REQM

Manage the requirements of the projects products and product requirements components and to identify inconsistencies between those and the projects plans and work products.

PP

PMC

Provide an understanding of the projects progress so that appropriate corrective actions can be taken when the projects performance deviates significantly from the plan.

MA

Develop and sustain a measurement capability that is used to


support management information needs.

SAM

Manage the acquisition of products from suppliers for which


there exists a formal agreement.

PPQA

Provide staff and management with objective insight into processes and associated work products.

Establish and maintain plans that define project activities.

products and services. The maturity level 2 process areas of CMMI are Requirement Management (REQM), Project Planning (PP), Project Monitoring and Control (PMC), Supplier Agreement Management (SAM), Measurement and Analysis
(MA), Process and Product Quality Assurance (PPQA), and Configuration Management (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 disadvantaged elementary and junior high school students in Taiwan. The program
provides disadvantaged students with after-school assistance and guidance in subjects such as Chinese, Mathematics, English, and Science. Since 2006, the National
University of Tainan (NUTN) has cooperated with the Ministry of Education in
establishing and developing the ASAP web platform, including the CMMI-based
ASAP assessment system in Taiwan.
The three parts of ASAP are group studies, group website, and group assessment. The main purpose of group studies is to hold experience-sharing conferences
to share experiences with newly involved persons. The group website is responsible for establishing a website that allows involved schools to upload and download
documents via the provided ASAP web platform, which provides valuable student
learning performance data. The function of group assessment is to provide a computerized system that teachers can use to assess student learning progress and to
provide feedback for the group studies. The ASAP web platform and assessment

80

C.-S. Lee et al.

Table 2 Methods that are consistent with CMMI


No

Process Area

Purpose

REQM

Visit the domain experts to write down the requirement documents.

PP

PMC

Take the appropriate corrective action when the schedule significantly deviates from the plan.

MA

Use the collected data to make measurement and analysis.

PPQA

Objective team members evaluate if the developed web platform


meets the requirements.

CM

Manage all generated document and the developed web platform


version.

Write the project execution plan.

system are developed according to CMMI requirements. Table 2 shows that the
ASAP 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 system is implemented in the following steps:
1. Several domain experts provide item descriptions to construct the item repository
and item fuzzy ontology repository.
2. Domain experts select and confirm the items from the item repository via the
item editor subsystem.
3. Domain experts assemble the selected and confirmed items into a test paper via
the automated test assembly subsystem. The assembled test paper is stored into
the form repository.
4. Students respond to the assembled test paper via the test subsystem. The student
responses are stored into the response data repository.
5. Based on the item repository, response data repository, item fuzzy ontology repository, and Chinese dictionary, the FML-based semantic inference mechanism performs natural language processing, fuzzy reasoning, and semantic summaries to
construct semantic sentences that teachers can review to assess student performance for specific course concepts. The output results are stored in the diagnosis
report repository.
6. All users, including the involved students, teachers, officers, or ASAP administrator, depend on different authorities to review the diagnostic reports via the
provided diagnosis report subsystem, learning progress report subsystem, and
ASAP web platform.

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, the
function of each subsystem is as follows.
Item editor subsystem: To provide item experts, item professors, or teachers to
edit and review the items.
Automated test assembly subsystem: To provide item experts, item professors, or
teachers to assemble, validate, edit, and confirm the test paper.
Conventional test administration subsystem: To help teachers to manage the examinee list and schedule the test date. This subsystem also provides fixed-length
items for the online test. Fig. 3 shows the calibration procedures for the 3parameter Item Response Theory (IRT) model. After domain experts finish editing items and assembling the test paper, a pilot test is performed. Based on the
pilot test results, the domain experts modify the items and re-assemble the test
paper. A norm test is then performed, and item parameters are sent back to the
automated test assembly subsystem for calibration. Meanwhile, the test results
are sent to the diagnostic report subsystem for further assessment and diagnosis.
Adaptive test subsystem: The advantage of the adaptive test is its automatic selection of test items based on previous responses to online test items. Therefore, the

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, including
the examinee list management, test date schedule, online adaptive test, maximum
information selection mechanism, and diagnosis report arrangement. The functions are (1) to enable teachers to manage the examinee list and to schedule the
test date, (2) to provide students with the online adaptive test, (3) to select items
from the item bank repository according to student online testing responses, and
to (4) enable ASAP administrators to obtain student diagnostic reports from the
response data repository.
FML-based semantic inference mechanism: To describe student performance in
specific tested concepts by integrating the summarized sentences with the T-score
scale item map.
Diagnosis report subsystem: To generate diagnostic reports for students, teachers, municipal education department officials and Taiwan Ministry of Education
officials.
Learning progress report subsystem: To provide learning progress reports to students, teachers, and officials from the education department of the relevant city
government and from the Taiwan Ministry of Education.

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

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 mechanism, and its mechanisms for natural language processing, fuzzy reasoning, and
semantic summary.

4.1 Structure of FML-Based Semantic Inference Mechanism


Fig. 5 shows the structure of the FML-based semantic inference mechanism, which
includes a T-score transformation mechanism, an item-map establishing mechanism,
an item-map customizing mechanism, a natural language mechanism, a fuzzy reasoning mechanism, and a semantic summary mechanism. First, the Chinese dictionary, item repository, and item fuzzy ontology repository are generated by domain
experts.
The fuzzy ontology repository contains test-related knowledge for Mathematics, Chinese, English, and Science. The student responses to the test paper are then
retrieved from the response data repository. Based on the Chinese dictionary and
the pre-defined item fuzzy ontology, the FML-based semantic inference mechanism starts the natural language processing, reasons term relation strength via the
fuzzy reasoning mechanism, and, finally, summarizes the student responses via the

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 the


course. Notably, each item retrieved from the item repository has a b value to denote
its difficulty level. The T-score transformation mechanism transforms b values into T
scores. The item-mapping mechanism then uses the transformed T score to construct
a T-score scale item map. That is, the b value and T score for each item is calculated
by mathematical transformation. The domain experts use the T scores for all items
to construct an item map. After testing, each student also receives an individual
T score. Students are expected to correctly answer items that have T scores lower
than their personal T scores. The item-map customizing mechanism customizes the
established T-score scale item map with the semantic sentences generated to describe the performance of each student and then stores the customized results in the
diagnosis report repository. Finally, users such as the involved students, teachers,
officers, and ASAP administrators can access the ASAP web platform to review the
performance assessment.

4.2 Natural Language Processing Mechanism


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

Apply Fuzzy Markup Language to ASAP Assessment System

85

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

4.3 Fuzzy Reasoning Mechanism


The fuzzy variables defined for the fuzzy reasoning mechanism include the three
input fuzzy variables Part of Speech (POS) similarity, Term Word (TW) similarity,
and Semantic Distance (SD) similarity and the output fuzzy variable Term Relation
Strength (TRS). The linguistic terms for fuzzy variable POS, TW, and SD are Low,
Medium, and High. However, five linguistic terms are defined for fuzzy variable
TRS, 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 a
noun and a verb, respectively. Each term has its own part of speech. The shorter
the 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 identical Chinese words two terms have, the more similar two terms are. (2) The larger
the number of identical and continuous Chinese words in the pair, the greater the
similarity of the pair. (3) If a term has the same beginning or ending Chinese
word, the similarity of the term pair is high. For example, term pair No. 1 is (Tri, Prism
), and term pair No. 2 is (Common Divisor
angle
, Recognize
). Term pair No. 1 has the same beginning word

Fig. 6 Tagging tree

86

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

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

C.-S. Lee et al.

Apply Fuzzy Markup Language to ASAP Assessment System


Table 3 Adopted fuzzy rules where
VL stands for VeryLow, L for Low, M
for Medium, H for High and VH for
VeryHigh

87

Rule
Fuzzy Variable
No POS TW SD TRS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

L
L
L
L
L
L
L
L
L
M
M
M
M
M
M
M
M
M
H
H
H
H
H
H
H
H
H

L
L
L
M
M
M
H
H
H
L
L
L
M
M
M
H
H
H
L
L
L
M
M
M
H
H
H

L
M
H
L
M
H
L
M
H
L
M
H
L
M
H
L
M
H
L
M
H
L
M
H
L
M
H

VL
L
L
L
L
M
L
M
H
L
L
M
L
M
L
M
H
H
L
M
H
M
H
H
H
H
VH

and two identical Chinese words, so the similarity of term pair No. 1 is higher
than that of term pair No. 2.
SD: The greater the similarity between two terms, the shorter the distance between the terms in the pre-constructed question fuzzy ontology.

88

C.-S. Lee et al.

TRS: Term relation strength. TRS is the term relation strength of the term pair
inferred from the values for POS, TW, and SD. The higher the term relation
strength, the more similar the term pair.
The FML editor, developed by the Ontology Application & Software Engineering (OASE) Laboratory, National University of Tainan (NUTN), Taiwan, was used
to implement the fuzzy inference mechanism based on the pre-defined FML document. 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 inference
mechanism. Table 3 lists the adopted fuzzy rules.

4.4 Semantic Summary Mechanism


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

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

Apply Fuzzy Markup Language to ASAP Assessment System

89

5 Simulation Results
The proposed CMMI-based assessment system for ASAP in Taiwan was developed
by implementing Hypertext Preprocessor (PHP) language and MySQL data-base.
The system provided online conventional test administration and adaptive testing
with the involved students. Fig. 10 shows a screenshot of the diagnostic report
subsystem for the Chinese and Mathematics tests taken by the elementary school
students.
The screenshot of the diagnostic report for Jessica in Fig. 11 indicates that her
T score was 56, and her percentile rank (PR) was 74. This data helped teachers to
assess her performance in three ways: if Jessica (1) correctly answered the items
with 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 below
52 indicated that the difficulty level was appropriate for Jessica, and (3) incorrectly
answered the items with T scores below 52 indicated that Jessica did not learn the
key 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 not
provide summaries of key points like those provided by domain experts, which
teachers need for quick and efficient assessment of student performance after taking a specific course. Nevertheless, the semantic results obtained for the proposed
FML-based semantic inference mechanism not only provides teachers with an indication of student understanding of each course concept in natural language, it also

Fig. 10 Screenshot of the diagnosis report subsystem

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. 12
lists the test responses given by Jessica. Fig. 13 lists the semantic descriptions for
her performance in Mathematics, which indicate that she understood the concepts
of 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 can
quickly and easily identify which concepts Jessica understands and which concepts
need further reinforcement.

Apply Fuzzy Markup Language to ASAP Assessment System

91

Fig. 12 Jessicas responses to the test paper

Fig. 13 Semantic descriptions for Jessicas performance level of Mathematics

Fig. 14 Jessicas performance level for Mathematic

6 Conclusion
The CMMI-based assessment system developed in this work is used to enhance
learning interest and performance in disadvantaged elementary school and junior
high school students in Taiwan. Simulation results indicate that the proposed approach is feasible for using the ASAP assessment system to automatically generate
diagnostic reports for students in the form of semantic sentences.

92

C.-S. Lee et al.

Acknowledgements. The authors would like to thank the financially support sponsored by
the 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, and
NSC99-2631-S-011-002). The authors also would like to thank the financial support from
HAMASTAR TECHNOLOGY CO., LTD. of Taiwan, and all of the people to involve this
research project.

References
1. Acampora, G., Gaeta, M., Loia, V., Vasilakos, A.V.: Interoperable and adaptive fuzzy
services for ambient intelligence applications. ACM Transactions on Autonomous and
Adaptive Systems 5(2), 126 (2010)
2. Acampora, G., Loia, V.: Using FML and fuzzy technology in adaptive ambient intelligence environments. International Journal of Computational Intelligence Research 1(2),
171182 (2005)
3. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive domotic framework. IEEE Transactions on Industrial Informatics 2, 97111 (2005)
4. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelligence. Information Sciences 178(3), 631646 (2008)
5. Calegari, S., Farina, F.: Fuzzy ontologies and scale-free networks analysis. International
Journal of Computer Science and Applications 4(2), 125144 (2007)
6. Chrissis, M.B., Konrad, M., Shrum, S.: CMMI: Guidelines for process integration and
product improvement. Addison-Wesley, New York (2005)
7. Knappe, R., Bulskov, H., Andreasen, T.: Perspectives on ontology-based querying. International Journal of Intelligent Systems 22(7), 739761 (2007)
8. Lee, C.S., Wang, M.H.: Ontology-based computational intelligent multi-agent and its
application to CMMI assessment. Applied Intelligence 30(3), 203219 (2009)
9. Lee, C.S., Wang, M.H., Chen, J.J.: Ontology-based intelligent decision support agent for
CMMI project monitoring and control. International Journal of Approximate Reasoning 48(1), 6276 (2008)
10. Lee, C.S., Jian, Z.W., Huang, L.K.: A fuzzy ontology and its application to news summarization. IEEE Transactions on Systems, Man and Cybernetics Part B 35(5), 859880
(2005)
11. Quan, T.T., Hui, S.C., Fong, A.C.M., Cao, T.H.: Automatic fuzzy ontology generation for
semantic web. IEEE Transaction on Knowledge and Data Engineering 18(6), 842856
(2006)
12. Pike, W., Gahegan, M.: Beyond ontologies: Toward situated representations of scientific
knowledge. International Journal of Human-Computer Studies 65(7), 659673 (2007)
13. Sanchez, F.G., Garca, R.V., Bejar, R.M., Breis, J.T.F.: An ontology, intelligent agentbased framework for the provision of semantic web services. Expert Systems with Applications 36(2), 31673187 (2009)
14. Shih, W.C., Yang, C.T., Tseng, S.S.: Ontology-based content organization and retrieval
for SCORM-compliant teaching materials in data grids. Future Generation Computer
Systems 25(6), 687694 (2009)
15. Stapes, M., Niazi, M.: System review of organizational motivations for adopting CMMbased SPI. Information and Software Technology 50(7-8), 605620 (2008)
16. Stevens, S.T.: Applying CMMI and strategy to ATE development. IEEE Instrumentation
& Measurement Magazine 10(4), 3843 (2007)

Apply Fuzzy Markup Language to ASAP Assessment System

93

17. Sun, Y., Liu, X.: Business-oriented software process improvement based on CMMI using
QFD. Information and Software Technology 52(1), 7991 (2010)
18. Tseng, S.S., Sue, P.C., Su, J.M., Weng, J.F., Tsai, W.N.: A new approach for constructing
the concept map. Computers & Education 49(3), 691707 (2007)
19. Wang, M.H., Yan, Z.R., Lee, C.S., Hung, P.H., Kuo, Y.L., Wang, H.M., Lin, B.H.: Apply fuzzy ontology to CMMI-based ASAP assessment system. In: 2010 IEEE World
Congress 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 software
in alignment with CMMI-DEV. IEEE Software 26(2), 5967 (2009)
21. Yeh, Y.F., Chen, M.C., Hung, P.H., Hwang, G.J.: Optimal self-explanation prompt design in dynamic multi-representational learning environments. Computers and Education 54(1), 10891100 (2010)
22. Yoo, C., Yoon, J., Lee, B., Lee, C., Lee, J., Hyun, S., Wu, C.: A unified model for the
implementation of both ISO 9001:2000 and CMMI by ISO-certified organizations. The
Journal of Systems and Software 79(7), 954961 (2006)

Apply Fuzzy Markup Language to Knowledge


Representation 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, several Taiwanese Go players were invited to play against some famous computer Go
programs from 2008 to 2011. Those competitions revealed that the ontology model
for Go game might resolve problems happened in the competitions. Therefore, this
chapter presents a model of knowledge representation including game of Go record
ontology and Go board ontology based on fuzzy markup language (FML). An FMLbased fuzzy system is also introduced to provide the regional alarm level for a Go
beginner or a computer Go program in order to place the stone at the much more
appropriate position. Experimental results indicate that the proposed approach is
feasible for computer Go application. Hopefully, advances in the intelligent agent
and the FML-based ontology model can provide a significant amount of knowledge
to make a progress in computer Go program and achieve as much as computer chess
or Chinese chess in the future.

1 Introduction
As Go remains a challenge for computer science research [14], Monte Carlo methods are highly promising for such applications, especially for small versions of the
game such as 9 9 games [13]. Werf et al. [19] devised a search-based approach
for playing Go on small boards. Bouzy and Cazenave [5] presented an AI-oriented
survey of computer Go. Martin Muller won despite 29 handicap stones against the
Chang-Shing Lee Mei-Hui Wang Yu-Jen Chen Shi-Jim Yen
Dept. of Computer Science and Information Engineering,
National University of Tainan, Taiwan
e-mail: leecs@mail.nutn.edu.tw, sjyen@mail.ndhu.edu.tw
{mh.alice.wang,sincoew}@gmail.com
G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 95112.
c Springer-Verlag Berlin Heidelberg 2013
DOI: 10.1007/978-3-642-35488-5_6


96

C.-S. Lee et al.

computer Go program Many Faces of Go [15]. The computer Go program MoGo


achieved unprecedented impressive results in 19 19 game by winning with a handicap of six and seven stones against a 2P and a 9P Go player, respectively, in Taiwan
Open 2009 [14]. The computer Go program Fuego won a 9 9 game as White
against the 9P Go player in August 2009 [20]. The latest world record involved the
computer Go program MoGoTW winning a 9 9 game as Black against the 9P Go
player in October 2009 (http://mogotw.nutn.edu.tw/), which is extremely more difficult for the computer Go program to win a top professional Go player as Black than
as White. Additionally, from the games results at the competition of IEEE WCCI
2010, 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 the
professional level [15].
Knowledge refers to relevant and actionable information that is based on an individuals experience [7]. Although all knowledge workers share certain characteristic activities, annotated data is obtained within a framework or ontology [18]. As
a highly effective means of sharing knowledge and representing information and
its semantics [16], ontology is a conceptualization of a real world domain in a human understandable, machine-readable format that consists of entities, attributes,
relationships, and axioms [17]. Moreover, ontology mediation allows us to combine knowledge from the ontologies [18]. For instance, in addition to proposing a
fuzzy ontology scheme for summarizing news [9], Lee et al. [17] also developed an
ontology-based intelligent decision support agent for project monitoring and control
(PMC) process area of the capability maturity model integration (CMMI). Reformat
and Ly [16] devised an ontology-based approach to provide a rich environment for
expressing different information types, including perceptions.
Monte Carlo Tree Search (MCTS)-based computer Go is an important milestone
for computer Go development. Minimax and alpha-beta searches are the conventional approaches adopted in computer games. However, in Go, even after pruning by patterns or rules, these approaches are clearly outperformed by MCTS [14].
Brugmann [6] developed an original evaluation function based on Monte Carlo exploration. However, a recent and considerable improvement is the incremental construction 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 human players can still easily win against computers in 19 19 games. Researchers,
however, have devised new performing algorithms and computers are also catching
up rapidly [16]. According to game results of the Taiwan Open 2009 [14], the ability
of computers to continuously improve at this rate would result in humans losing this
advantage over machines in less than a decade. The game results further demonstrate that the ability of a computer to acquire additional knowledge and strategies
from professional Go players based on the constructed ontology would enable the
computer Go to approach the level of a professional Go player quite rapidly.
This chapter presents an FML-based inference system for computer Go knowledge representation and applications. In [16], it focused on the computational

Apply FML to Knowledge Representation for Game of Computer Go

97

intelligence of MoGo that was revealed based on Taiwans computer Go tournaments. The competition report on the Human vs. Computer Go Competition, held
at the 2009 IEEE International Conference on Fuzzy Systems (FUZZ-IEEE 2009)
was introduced in [20]. In [14], an ontology model for computer Go knowledge
representation was proposed to apply to the computer Go record management. From
the experimental results, it is known that with the proposed computer Go knowledge
management scheme, the computer Go is expected to become much more intelligent
in the near future. Experimental results also indicate that the proposed approach can
increase the winning rate if a Go beginner or a computer Go program refers to the
guidelines to play the game.
The rest of this chapter is organized as follows. Sect. 2 briefly describes the
knowledge representation model for game of computer Go, including the game
record ontology and game board ontology. Sect. 3 then introduces an FML-based
decision 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 computer
Go, 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 ontology
model for computer Go knowledge management, as shown in Fig. 1 [14] [13].
The domain name of this ontology is Game Record Ontology. The categories
in the category layer include Amateur and Professional. Several concepts are
located in the concept layer. For instance, concepts 1D, 2D, and 6D represent
the 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 dan
on the scale for a professional Go player: 1 dan, 2 dan, and 9 dan, respectively. The
built game record ontology stores all moves of each game played by the Go players against the computer Go programs. For instance, assume that there are n1 Go
players with 1D (K1 1D , . . . , and Kn1 1D ). Each Go player with 1D may play total
n1 games stored in the game record ontology. Therefore, according to Fig. 1, each
game of each Go player can be modeled by the built game record ontology. For
instance, the games that the first Go player with 1D (K1 1D ) once played are represented as G1 K1 1D , . . . , and Gq1 K1 1D . For the game G1 K1 1D , the records of game
are represented as moves 1, 2, . . . , r1, that is M1 G1 K1 1D , . . . , and Mr1 G1 K1 1D ; its
result is denoted as RG1 K1 1D [14].

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 addition to the number of black and white stones on the game board, the position
that 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

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 proposed method, a Go beginner or a computer Go program might lose the game by
much fewer points than not referring to the provided regional alarm level. Based
on the above discussions, the Go board is partitioned into several groups and each
group is composed of nine adjacent intersections. Moreover, two adjacent groups
are shared with a common edge with three adjacent intersections to strengthen how
two groups are related. Such a Go board partition helps the computer to learn the

100

C.-S. Lee et al.

matched patterns in the game of Go, enabling it to easily stimulate the playing strategies of humans.
The size of the Go board has different sizes, such as 9 9, 13 13, . . . , and
19 19. For instance, the 9 9 game board has 9 horizontal lines and 9 vertical
lines, 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, a
situation in which a human plays at A1 implies that a stone is placed at the intersection of the first horizontal line and the first vertical line. Although the Go player
can place the stone on an empty intersection, the different stone-placed positions
influence the game outcome differently. According to the Go board partition [13], a
Go board ontology is constructed, as shown in Fig. 2. The domain layer represents
the domain name Go Board Ontology. The category layer is designed based on
the general Go board size, including 9 9, 13 13, . . . , and 19 19.
The concept layer contains concepts whose names are represented by the stoneplaced position on the Go board. For instance, concept D6 represents a concept
located at the intersection of the vertical line D and the horizontal line 6 on
the game board. The nine adjacent concepts are combined to form a group. Each
group has a regional alarm level for a Go beginner or a computer Go program as a
game-playing reference. However, the regional alarm level of one group is acquired
by referring to the surrounding eight groups. That is, the surrounding eight groups
influence the regional alarm level of the center group. The needed information that
implements 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, a
regional alarm level of one group is obtained.

Fig. 3 Structure of FML-based decision support agent [13]

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 structure of the FDSA is described and then the further details about the fuzzy decision
support 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), including a SGF (Smart Game Format) filtering mechanism, a fuzzy decision support
system, a Go game record repository, and an FML-based ontology repository.
The fuzzy decision support system consists of three mechanisms, i.e. territory
partition, fuzzy inference, and alarm presentation. The FDSA functions as follows:
(1) Domain experts define the Go game record ontology and the Go board ontology
based 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 is
gradually generated move by move; (3) Based on the constructed FML-base ontology and the generated game record, the fuzzy decision support system infers the
real-time regional alarm level of the game for supporting a Go beginner or a computer Go program to decide where to place a stone on an appropriate position during
the game; (4) The inferred regional alarm levels are also stored into the Go game
record repository; (5) The SGF filtering mechanism eliminates unnecessary messages from the generated game record; in addition, the filtered SGF files are stored
into the Go game record repository; and (6) The domain experts evaluate the results
of the proposed approach.

3.2 Fuzzy Decision Support System


Fuzzy Markup Language (FML) is a fuzzy-oriented mark-up language that can manage fuzzy concepts, fuzzy rules, and fuzzy inference engine directly [1] [4] [3] [4].
Additionally, the FML is essentially composed of three layers, including eXtensible Markup Language (XML), document type definition, and extensible stylesheet
language transformations. Based on the FML, an FML editor, developed by the
LASA Laboratory, University of Salerno, Italy, is used to construct the important
knowledge base and rule base of the FDSA. The knowledge base describes the
fuzzy concepts of the FDSA, including fuzzy variables, fuzzy terms, and membership functions of fuzzy sets. On the other hand, the rule base describes the fuzzy
rule set, including the antecedent and consequence rule part. Listing 1 lists part of
FML view of the FDSA, which is divided into knowledge base and the rule base. It
indicates that there are one output fuzzy variable Region Alarm Level (RAL), 25
fuzzy rules, and three input fuzzy variables, including black stone number (BN),
white stone number (WN), and surrounding coefficient (SC). Each fuzzy variable has

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 e n c o d i n g =UTF8 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=GOGame>
<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 = i n p u t >
<FuzzyTerm c o m p l e m e n t = 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 c o m p l e m e n t = 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 c o m p l e m e n t = 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>
</ F u z z y V a r i a b l e >
.....
<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 = 1 0 0 . 0
s c a l e = t y p e = o utput >
<FuzzyTerm c o m p l e m e n t = f a l s e name= V e r y Sa fe >
<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 c o m p l e m e n t = f a l s e name= S a f e >
<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 c o m p l e m e n t = f a l s e name= B a l a n c e d >
<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 c o m p l e m e n t = 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= 1 0 0 . 0 />
</FuzzyTerm>
<FuzzyTerm c o m p l e m e n t = 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= 1 0 0 . 0 param3= 1 0 0 . 0 />
</FuzzyTerm>
</ F u z z y V a r i a b l e >
</ KnowledgeBase>
<R u l e B a s e name= RuleBase1 a c t i v a t i o n M e t h o d =MIN andMethod =MIN
o r Me t h o d=MAX t y p e =mamdani >
<R u l e 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 >
<A n t e c e d e n t>
<C l a u s e>
<V a r i a b l e >BN</ V a r i a b l e ><Term>Low</Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >WN</ V a r i a b l e ><Term>Low</Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >SC</ V a r i a b l e ><Term>Low</Term>
</ C l a u s e>
</ A n t e c e d e n t>
<C o n s e q u e n t>
<C l a u s e>
<V a r i a b l e >RAL</ V a r i a b l e ><Term>V e ry Sa fe </Term>
</ C l a u s e>
</ C o n s e q u e n t>
</ Rule>
.......
</ R u l e B a s e>
</ F u z z y C o n t r o l l e r >

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 Go
board is partitioned into several groups to enable a computer to more easily stimulate the playing strategy of humans. For instance, according to Fig. 4, each dashedline frame has nine groups, with each group having nine adjacent triangular-marked
intersections. Based on the patterns organized by stones placed on the forty-nine
triangular-marked intersections, the circle-marked position of Fig. 4 displays the
regional 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, which
is characterized by high uncertainty based on the behavior of a Go player. A human playing the Go game initially observes the entire Go board and then identifies
the optimal strategy from all available strategies to gain the most points or lose the
fewest points within a given time limit. Additionally, exactly how many stones are
on the Go board does not need to be known; instead, the entire situation on the
Go board only needs to be evaluated roughly. That is, the Go player must maintain a
balance between attack and defense. According to Fig. 4, the Go board is partitioned
into several groups, with each group containing 9 adjacent intersections. The fuzzy
inference mechanism based on FML comprises three fuzzy input variables and one

104

C.-S. Lee et al.

fuzzy output variable stored in the knowledge base of FML. Fuzzy variables Black
No (BN) and White No (WN) represent the counted black stones and white stones
within one group, respectively. Both fuzzy variables BN and WN have three linguistic terms, i.e. Low, Medium, and High, to denote the distribution of the number of
stones 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 have
caused. A higher SC of group 9 implies a higher risk for a Go player or a computer
Go program. The output fuzzy variable is Regional Alarm Level (RAL), implying
that the alarm level within the territory surrounded by one group. The regional alarm
level can be very safe, safe, balanced, dangerous, and very dangerous situations for
a Go player or a computer Go program. The fuzzy inference rules are stored in the
rule 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 the


regional alarm level to place the stones on the intersections that are represented by
the balanced state. This advice is because the balanced state typically shows where
the black stones and white stones contact with each other. Additionally, to assist
beginning players of Go, pre-processing information for computer Go programs
can reduce the time-consuming Monte Carlo Tree Search to increase the efficiency
of 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 and
the adopted 27 fuzzy rules, respectively. This chapter adopts the MIN operator as
the fuzzy conjunction operator. The MAX operation is performed to integrate the
triggered rules, while the center of the area method is adopted as a defuzzification
method.

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
BN Medium
BN High

[0, 0, 2]
[1, 4.5, 8.1]
[5.4, 9, 9]

White No (WN)

WN Low
WN Medium
WN High

[0, 0, 2]
[1, 4.5, 8.1]
[5.4, 9, 9]

Surrounding Coefficient (SC)

SC Low
SC Medium
SC High

[0, 0, 3.2]
[0.8, 4.0, 7.2]
[4.8, 8, 8]

Regional Alarm Level (RAL)

RAL VerySafe
RAL Safe
RAL Blanced
RAL Dangerous
RAL VeryDangerous

[0, 0, 25]
[0, 25, 50]
[25, 50, 75]
[50, 75, 100]
[75, 100, 100]

3.5 Alarm Presentation Mechanism


Alarm presentation mechanism is responsible for presenting the inferred results
graphically to a Go beginner or a computer Go program. With the assistance of
alarm presentation, a Go beginner or a computer Go program can easily and quickly
realize the overall game board situation, whether the opponent-occupied territory
has a dangerous level, or whether he/she needs to give up some stones to capture
safer territory. For instance, if the counted black stones are small, the counted white
stones are high, and the surrounding coefficient is high, then the regional alarm
level is very dangerous. This chapter adopts five regional alarm levels, including
very safe, safe, balanced, dangerous, and very dangerous. An icon represents each
regional alarm level. The more white area this icon has, the higher risk a Go beginner or a computer Go program becomes. On the contrary, the more black area this
icon 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 example
of the Go game record at move 27. Table 4 lists the outcomes of the fuzzy inference
mechanism when Fig. 6 is used as an example. According to this table, the regional
alarm level of group 9 in Fig. 6 is 0.71, and the semantic meaning of 0.71 is Balanced. 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, indicating that although the bottom left corner is very safe, the right side of the Go board
is dangerous to lose the game for a Go beginner or a computer Go computer.

106

C.-S. Lee et al.

Table 2 Adopted 27 fuzzy rules in the rule base of FML


Rule
No.

BN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

Low
Low
Low
Low
Low
Low
Low
Low
Low
Medium
Medium
Medium
Medium
Medium
Medium
Medium
Medium
Medium
High
High
High
High
High
High
High
High
High

Fuzzy Variable
WN
SC
Low
Low
Low
Medium
Medium
Medium
High
High
High
Low
Low
Low
Medium
Medium
Medium
High
High
High
Low
Low
Low
Medium
Medium
Medium
High
High
High

Low
Medium
High
Low
Medium
High
Low
Medium
High
Low
Medium
High
Low
Medium
High
Low
Medium
High
Low
Medium
High
Low
Medium
High
Low
Medium
High

RAL
VerySafe
Safe
Balanced
Balanced
Dangerous
VeryDangerous
Dangerous
Dangerous
VeryDangerous
VerySafe
Safe
Balanced
Balanced
Balanced
Dangerous
Balanced
Dangerous
VeryDangerous
VerySafe
Safe
Balanced
Safe
Balanced
Dangerous
Safe
Balanced
VeryDangerous

4 Experimental Results
This chapter has constructed an experimental platform at National University of
Tainan (Taiwan), INRIA (France), and National Dong Hwa University (Taiwan) to
evaluate the performance of the proposed approach. In the first experiment, a 5D Go
player (Cheng-Wen Dong, 70-year-old) as White was invited to compete against 9K
Go player (Yu-Jen Chen, 23-year-old) as Black in 19 19 game with four handicap
stones.

Apply FML to Knowledge Representation for Game of Computer Go

107

Table 3 Icons for the regional alarm level


No

Icon

Semantic Meaning

Very Safe

Safe

Balanced

Dangerous

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-provided
alarm representation. Fig. 8 reveals the following: (1) Fig. 8(a) indicates that the
area surrounded by the dashed-line frame is Blacks territory. White cannot be alive
within this territory. According to Fig. 8(b), FDSA is feasible for stimulating similar
human-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 exactly
what the contacts between Black and White are. Hence, the adjacent intersections
around the Balanced icon could be an indicator of Black placing the stone on the
game board during the game; (3) A situation in which the territory is marked VeryDangerous icons implies that this situation is very unfavorable for Black. According 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 corner and bottom-right corner of the game board. Based on the above discussions, we
can infer that the provided regional alarm levels coincide with the humans approach
to evaluate the current situation of the game board.

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
3
4
5
6
7
8
9

2
2
1
3
3
3
0
2
3

0
3
4
1
0
4
3
2
4

4
4
4
4
4
4
4
4
5

0.25
0.5
0.75
0.25
0.25
0.5
0.75
0.5
0.71

The default surrounding coefficient for groups 1 to 8 is 4.


Based on the region alarm level value of groups 1 to 8, the surrounding coefficient value of
the 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 successfully
guide Go beginners to make them lose the game by significantly fewer points
when their opponents is stronger than them. Four Go players play with MoGo
(MoGo release3) running on a Windows PC with 4 cores. Meanwhile, another beginning Go player competes against MoGo (v4.86) running on a super computer
with 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 refers
to Go Player. This table reveals the variance in lost points under the conditions of
with and without the guidelines of the FDSA, where the lost points are reduced if

Apply FML to Knowledge Representation for Game of Computer Go

(a)

109

(b)

Fig. 8 (a) Game record (b) Regional alarm levels

the Go beginning players refer to the regional alarm level provided by the FDSA
to play the games. Figs. 9(a)-(b) display the game record and generated regional
alarm level of game 20 at move 32, respectively. Fig. 9(b) indicates that the topright corner and bottom side are very dangerous for Go player 5, which matches
with 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

110

C.-S. Lee et al.

Table 5 Game results of Go players vs. MoGo


Result FDSA
No
Yes

Time Per Side

Game No

White

Black

MoGo
MoGo
MoGo
MoGo
GP1
GP1
GP1
GP1
MoGo
MoGo
MoGo
MoGo
MoGo
MoGo
MoGo
MoGo
MoGo
MoGo

GP1
GP1
GP1
GP1
MoGo
MoGo
MoGo
MoGo
GP2
GP2
GP2
GP2
GP2
GP2
GP3
GP3
GP4
GP4

W+88.5

5min

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

MoGo
MoGo
GP5
GP5

GP5
GP5
MoGo
MoGo

W+18.5

10min

W+10.5
W+88.5
W+56.5
B+72.5
B+72.5
B+72.5
B+52.5
W+88.5
W+17.5
W+39.5
W+87.5
W+87.5
W+6.5
W+63.5
W+60.5
W+44.5
W+20.5
W+12.5
B+23.5
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 descriptions:
1.
2.
3.
4.

The RAL does increase as the SC increases;


The RAL does increase as the WN increases;
If BN is low, WN is low, and SC is low, then RAL is very safe;
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 proposed
FDSA meets the human-playing thoughts. Hence, the proposed approach is feasible
to apply to the computer Go application which gives a great help to the Go beginners
during playing game.

Apply FML to Knowledge Representation for Game of Computer Go

(a)

111

(b)

Fig. 10 Surface view for FDSA (a) Inputs (X-SC and Y-WN)/output (RAL), (b) Inputs (X-SC
and Y-BN)/output (RAL)

5 Conclusions
This chapter presents a novel FML-based inference approach for computer Go applications. Experimental results indicate that the winning rate can be increased if the
proper membership functions are identified. Additionally, some regional alarm levels provide a valuable reference for either a Go beginner or a computer Go program
when playing the game. However, the proposed approach still has certain limitations so that future research should (1) combine the proposed method with MCTS
method to reduce expensive searching cost by searching for the optimal move within
the dangerous region, (2) add machine learning methods such as a genetic algorithm
or neural network to increase the winning rate, (3) enhance more closely examining
human-playing strategies of the constructed ontology for use as reference for giving
up stones, (4) add the weights to the territory of the Go board to strengthen the relationship among groups, and (5) display the regional alarm levels in the semantic
expressions of humans.
Acknowledgements. The authors would like to thank the National Science Council of Taiwan for financially supporting this research (NSC99-2911-I-024-004, NCS99-2923-E-024003-MY3, and NSC98-2221-E-024-009-MY3). Additionally, the authors also would like to
thank 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 Hsu
for their help with this chapter.

References
1. Acampora, G., Gaeta, M., Loia, V., Vasilakos, A.V.: Interoperable and adaptive fuzzy
services for ambient intelligence applications. ACM Transactions on Autonomous and
Adaptive Systems 5(2), 126 (2010)

112

C.-S. Lee et al.

2. Acampora, G., Loia, V.: Using FML and fuzzy technology in adaptive ambient intelligence environments. International Journal of Computational Intelligence Research 1(2),
171182 (2005)
3. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive domotic framework. IEEE Transactions on Industrial Informatics 2, 97111 (2005)
4. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelligence. Information Sciences 178(3), 631646 (2008)
5. Bouzy, B., Cazenave, T.: Computer Go: an AI-oriented survey. Artificial Intelligence
Journal 132(1), 39103 (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 and
technical support organizations. IEEE Transactions on Information Technology in
Biomedicine 9(2), 162168 (2005)
8. Lee, C.S., Jian, Z.W., Huang, L.K.: A fuzzy ontology and its application to news summarization. IEEE Transactions on Systems, Man, and cybernetics, Part B: Cybernetics 35(5), 859880 (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 Taiwans
computer Go tournaments. IEEE Transactions on Computational Intelligence and AI in
Games 1(1), 7389 (2009)
10. Lee, C.S., Wang, M.H., Chen, J.J.: Ontology-based intelligent decision support agent for
CMMI project monitoring and control. International Journal of Approximate Reasoning 48(1), 6276 (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: Proceeding
of the 2009 IEEE International Conference on Fuzzy System (FUZZ-IEEE 2009), Jeju
Island, Korea, August 19-24, pp. 10561061 (2009)
12. Lee, C.S., Wang, M.H., Teytaud, O.: The game of Go @ IEEE WCCI 2010. IEEE Computational Intelligence Magazine 5(4), 67 (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 Go
applications. International Journal of Fuzzy Systems 12(2), 103115 (2010)
14. Lucas, S.M., Kendall, G.: Evolutionary computation and games. IEEE Computational
Intelligence Magazine 1(1), 1018 (2006)
15. Mueller, M.: Computer Go. Artificial Intelligence 134(1-2), 145179 (2002)
16. Reformat, M., Ly, C.: Ontological approach to development of computing with words
based systems. International Journal of Approximate Reasoning 50(1), 7291 (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), 842856
(2006)
18. Warren, P.: Knowledge management and the semantic web: from scenario to technology.
IEEE Intelligent Systems 21(1), 5359 (2006)
19. Werf, E.C.D., Herik, H.J., Uiterwijk, J.W.H.M.: Solving Go on small boards. International Computer Games Association (ICGA) Journal 26(2), 92107 (2003)
20. Yen, S.J., Lee, C.S., Teytaud, O.: Human vs. computer Go competition in FUZZIEEE 2009. International Computer Games Association (ICGA) Journal 32(3), 178180
(2009)

Fuzzy Markup Language for Malware


Behavioral 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 important research topics in the area of network security threat. In addition, malware
have become a growing important problem for governments and commercial organizations. The key point of the research on the network security is to judge and
validate the similarity metrics among the malicious software. Indeed, most computer network issues are also caused by malware. As a consequence, one enhanced
system to analyze the behavior of malwares is needed to try to predict the malicious
actions and to minimize the computer damages caused by the malware. However,
Hsien-De Huang Jee-Gong Chang
National Center for High-Performance Computing, Taiwan
e-mail: tonton@twman.org, changjg@nchc.org.tw
Giovanni Acampora
School of Industrial Engineering, Information Systems, Eindhoven University of Technology,
P.O. Box 513, 5600 MB, Eindhoven, The Netherlands
e-mail: gacampora@tue.nl
Vincenzo Loia
Department of Computer Science, University of Salerno, Italy
e-mail: loia@unisa.it
Chang-Shing Lee Mei-Hui Wang
Dept. of Computer Science and Information Engineering,
National University of Tainan, Taiwan
e-mail: leecs@mail.nutn.edu.tw, mh.alice.wang@gmail.com
Hani Hagras
The Computational Intelligence Centre,
School of Computer Science and Electronic Engineering, University of Essex, UK
e-mail: hani@essex.ac.uk
Hung-Yu Kao
Dept. of Computer Science and Information Engineering,
National Cheng Kung University, Taiwan
e-mail: hykao@mail.ncku.edu.tw
G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 113132.
c Springer-Verlag Berlin Heidelberg 2013
DOI: 10.1007/978-3-642-35488-5_7


114

H.-D. Huang et al.

the conventional data analysis tools lack the ability to deal with the computer safety
because the environments malwares operating are with high levels of imprecision
and vagueness. For this reason, we have developed Taiwan Malware Analysis Net
(TWMAN) to improve the accuracy of malware behavioral analysis. This chapter
tries to explorer and deal with these computer security and safety issues by integrating the semantic technologies and computational intelligence methods, such as the
fuzzy ontologies and fuzzy markup language (FML). With the proposed approach,
the malware identification has achieved a good performance according to the experimental results.

1 Introduction
In recent years, the rapid growth of information technology has strongly enhanced
computer systems both in terms of computational and networking capabilities. However, these novel distributed computing scenarios have simultaneously increased the
issues about the security and safety of the interconnected hardware systems. Actually, computer threats, such as viruses and backdoor programs, have caused different
kinds of the economical and technological disasters all around the world. Internet
fraud activities [7], users private data stealing, and malwares damaging computer
systems without getting the owners informed consent [19] are only some examples that computer threats cause the sabotage of the personal, academic, and industrial computer equipments. As a consequence, this chapter tries to integrate different
kinds 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 computer
threats.
Ontologies are structural frameworks for modeling information by means of an
explicit specification and a shared conceptualization [16] and they are mainly used
as the good knowledge representation and communication model for intelligent
agents [9]. Nevertheless, the traditional ontologies are not enough to deal with imprecise and vague knowledge. Hence, many re-searchers have explored the use of
fuzzy ontologies, i.e., structural frameworks based on fuzzy logic used for modeling
information characterized by high levels of imprecision and vagueness. Lee et al. [9]
proposed a fuzzy ontology for designing an intelligent decision making system for
summarization systems. Quan et al. [15] presented the automatic fuzzy ontology
generation for semantic help desk support and the automatic fuzzy ontology generation for semantic web. Typically, the joint exploitation of fuzzy ontologies and
FML is mainly used as one supported framework for designing the intelligent fuzzy
inference systems, which is one of the key research topics in the artificial and computational intelligence areas [6].
Today, there is a growing interest in the development of systems based on
knowledge representation by means of ontological approaches. Nevertheless, the
conventional ontology languages are not appropriate to deal with uncertainty [5],
vagueness, or imprecision which strongly characterizes the real world scenarios. It

Fuzzy Markup Language for Malware Behavioral Analysis

115

is not surprising that the fuzzy set theory and fuzzy logic can handle these types
of knowledge and indeed the fuzzy ontologies are emerging as a useful methodology for knowledge representation in several semantic-oriented applications. Lee et
al. [13] applied the FML to university assessment. Wang et al. [25] presented the
FML-based food ontology applications.
The FML is a novel computer language useful for modeling the advanced fuzzy
systems by means of a structural and taxonomic approach that improves the fuzzy
systems design from two points of view: transparency and reliability [3]. Although
many malware behavioral analysis tools have actually been developed by the software companies, such as the Norman Sandbox and Virus Total and Threat Expert,
the behavior of some fractional exceptional malware still cannot be detected. As a
result, this chapter presents an FML-based ontological agent for malware behavioral analysis to model the malware behavioral knowledge defined by domain experts. Based on the proposed agent, one real operation system (OS) environment,
called Taiwan Malware Analysis Net (TWMAN), has been developed to analysis
the malware behavioral, detect the known or unknown malware, and finally output
the analysis reports to users [7] [9] [8].
This remainder of the chapter is as follows. Sect. 2 describes the literature survey
about Web Ontology Language (OWL), FML, and TWMAN. Sect. 3 describes the
integration of a fuzzy ontology model and FML for modeling the knowledge about
malware behaviors and proposes an intelligent decision making system for detecting computer anomalies. Sect. 4 discusses the experimental results. Finally, some
conclusive remarks are given in Sect. 5.

2 Basic Concepts: Improving TWMAN through FML and


OWL
In this section, an introduction to the encountered challenges this chapter faced, the
main components of the proposed technical architecture, and how to integrate OWL
and FML with TWMAN are described.

2.1 Ontology Web Language (OWL) for Modeling Malwares


Domain
When a malware behavioral analysis tool owns the malwares source code at its disposal, the analysis of the malware becomes quite simple. However, in fact, only if
one malware behavioral analysis tool is able to understand, read, interpret, and look
for key-code fragments, the key information on the attacker and the attack will be
revealed by the tool. Unfortunately, the proposed approach in this chapter does not
own malwares source codes to detect eventual viruses or similar programs, but this
chapter exploits an ontological view of malwares behavior in order to define a more
general and efficient detection platform. In order to express the ontological knowledge about the malware behavior, our proposed approach uses the OWL2 language,

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 novel


structure 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 layer
represents the domain names of the ontology. The category layer defines several
categories labeled as category 1, category 2, category 3, . . . , and category k. The
concept 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 the
instance layer for an application domain. Based on the structure of the domain ontology [25], some descriptions about how to apply the domain ontology to TWMAN
are given in sect. 3.
Based on the structure of Fig. 1, the OWL is used to describe an ontological
model of the malware behavioral, including File Hash (FH), Connect IP (CI), Files
Change (FC), and Similarity (SI) [7] [9]. Fig. 2 shows the structure of the malware
behavioral ontology. Precisely, File Hash (FH) is a malware information which is
computed by the ssdeep program [11]. The generated Hash values allow analysts to
assign a percentage score to represent the similarity between two malwares. Connect
IP (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

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 of


changes occurred in the client-side file system due to some eventual malware actions. The Similarity (SI) is calculated similarity between unknown sampled programs 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 is
not able to apply the advanced inference mechanisms to derive the additional imprecise 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 for


Malwares Analysis
Proposed by Acampora and Loia [3], FML is a domain-specific language and its
main aim is to model fuzzy systems by directly dealing with fuzzy concepts, fuzzy
rules, and fuzzy inference engines [6]. In particular, it is used to model two wellknown kinds of fuzzy controllers: Mamdani and Takagi-Sugeno-Kang (TSK). This
language is an XML-based language, so FML programs are coded through a collection of correlated semantic XML tags, following an opportune XML Schema,

118

H.-D. Huang et al.

Fig. 3 The tree structure of FML

capable of modeling the different components of a fuzzy controller. Some samples


of FML tag are as follows [1] [4]: (1) <FUZZYCONTROL> that models a whole
fuzzy system, and (2) <KNOWLEDGEBASE> and <RULEBASE> that represent
the 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, the
so-called eXtensible Stylesheet Language Translator (XSLT) is provided to change
this static view to a computable version. FML is essentially composed by three
layers [6]: (1) XML in order to create a new markup language for fuzzy logic control, (2) a XML Schema Document (XSD) as grammar to define the legal building
blocks, and (3) a XSLT in order to convert a fuzzy controller description into a
general-purpose computer language. Different from other similar approaches used
to describe fuzzy controllers such as Fuzzy Control Language or MATLAB Fuzzy
Inference System (FIS) developed by the Math Works, FML allows fuzzy designers to simply code their ideas on heterogeneous hardware by exploiting abstraction
benefits offered by XML tools. Fig. 3 shows the tree structure of FML.

2.3 Taiwan Malware Analysis Net (TWMAN)


According to Joe Stewarts Truman, a real OS environment open source software [7]
[8] [17], TWMAN (http://TWMAN.org) is developed as an open source (GPL v2)

Fuzzy Markup Language for Malware Behavioral Analysis

119

project. Some important features of TWMAN are given as follows: (1) TWMAN
also is an automated behavioral malware analysis software to analyze the malware
and developed by following the client-server architecture. (2) The server works on
Linux, while the client runs under Microsoft Windows and uses the PXE-Boot to
boot. (3) In a client-side Windows environment, malware usually attempts to execute or to install other applications in the Windows, so TWMAN also includes the
WinSock functions, which can be able to communicate with TCP/IP-networks, such
as the Internet or an intranet system. (4) Via the InetSim, TWMAN is able to skim
some important connections such as HTTP, FTP, SMTP, and IRC connections to extract the important data (i.e. FTP and IRC login information). (5) TWMAN also can
compare the before-infected image file with the after-infected one in the client side
to get known if the registry files where Windows NT/2000/2003/XP stores configuration data, including systems, user, applications, and hardware, have been modified
or configured to auto-start by some malware. (6) Through the Advanced Intrusion
Detection Environment (AIDE), TWMAN is also skilful to exactly detect what files
are added, modified, or deleted by comparing the disk image with the clean image
uploaded to the client before the process, and then to take a note after being infected
by malware.
In order to test and verify the performance of the proposed approach, we have
completed the analysis of 10000 malware samples and then generated the reports
via the developed TWMAN. Fig. 4 shows the partial reports from TWMAN. From
the experimental results, the proposed approach can get much more correct malware behavioral information than other analysis tools. In this way, the proposed
FML-based ontological agent for malware behavioral analysis is able to solve much
more complex problems, exploit the malware behavioral to infer the additional information, 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 semantic
methodology for improving malware behavioral analysis. In particular, in this section, we describe how to use fuzzy ontologies to model the knowledge related to
malware behaviors and how to merge these fuzzy ontologies with FML in order to
design the proposed intelligent system. The main tools used to achieve the proposed
results are: OWL by Protege and FML by VisualFML, a visual programming tool
based on FML. By using these tools, an FML-based malware behavioral inference
engine is introduced. As shown in Fig. 5, the proposed engine is composed of a
Knowledge Base, containing the fuzzy static information related to the malware domain, and a Rule Base, representing the fuzzy reasoning parts taking the opportune
safety critical decisions.

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 an
application domain for designing advanced distributed applications. Indeed, OWL
can describe the relation between concepts with instances and inference new instance; but, however, it is not capable of modeling inference mechanism for generating new knowledge. For this reason, other languages such as SWRL or JESS
should be integrated in OWL. Nevertheless, aforementioned languages do not support the fuzzy computation that, as shown in experiments, strongly supports the
malware behavioral analysis. Therefore, we improve the OWL with FML to model
the malware behavioral knowledge, shown as follows. FML parser was used to
extract the knowledge from the FML-based definition. The input is the FMLbased definition of the fuzzy controller which is denoted by CFML. The output is

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, ConnectIPNormal, ConnectIPMuch, ConnectIPVeryMuch, FileChangeLess, FileChangeVeryLess, FileChangeNormal, FileChangeMuch, FileChangeVeryMuch}, and a set of
Fout={SimilarityVeryLow, SimilarityLow, SimilarityMedium, SimilarityHigh, SimilarityVeryHigh}, 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 systems developed by Acampora and Loia. The environment has been completely programmed in Java, so it can be executed on any platform with JRE (Java Runtime
Environment) installed. Its functionalities cover the different stages of the fuzzy
system design process, from their initial description to the final implementation. It
is possible to import a .fml file to build a fuzzy controller, and also to export a system
created by the tool in a .fml file. The main functionalities the tool provides are the
following ones: (1) Fuzzy system description: define the system creating linguistic
variables and rules; (2) Verification: monitor the system behavior showing outputs
corresponding to different inserted inputs; (3) Tuning: apply algorithms based on
neural network; and (4) Synthesis: generate high-level languages descriptions.

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 = h t t p : / / www. w3 . org / 1 9 9 9 / 0 2 / 2 2 rdf s y nta x ns #
xmlns = f i l e : / D : /TWMAN/TWMAN. owl #
xmlns : p r o t e g e = h t t p : / / p r o t e g e . s t a n f o r d . edu / p l u g i n s /
owl / p r o t e g e #
xmlns : x s p = h t t p : / / www. owlo n t o l o g i e s . com / 2 0 0 5 / 0 8 / 0 7 /
xsp . owl #
xmlns : owl = h t t p : / / www. w3 . org / 2 0 0 2 / 0 7 / owl #
xmlns : s q w r l = h t t p : / / s qw r l . 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 / s qw r l . owl #
xmlns : x s d = h t t p : / / www. w3 . org / 2 0 0 1 / XMLSchema #
xmlns : s w r l = h t t p : / / www. w3 . org / 2 0 0 3 / 1 1 / s w r l #
xmlns : s w r l b = h t t p : / / www. w3 . org / 2 0 0 3 / 1 1 / s w r l b #
xmlns : r d f s = h t t p : / / www. w3 . org / 2 0 0 0 / 0 1 / rdf schema#
xmlns : s w r l a = h t t p : / / s w r l . s t a n f o r d . edu / o n t o l o g i e s / 3 . 3 /
s w r l a . owl #
xml : b a s e = f i l e : / D : /TWMAN/TWMAN. owl >
<owl : O n t o l o g y 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 = h t t p : / / s w r l . s t a n f o r d . edu /
o n t o l o g i e s / 3 . 3 / s w r l a . owl />
....
<V a r i a b l e >F i l e C h a n g e </ V a r i a b l e >
<Term>V e ry L e s s </Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >C o n n e c t IP </ V a r i a b l e >
<Term>Less </Term>
</ C l a u s e>
</ A n t e c e d e n t>
<C o n s e q u e n t>
<C l a u s e>
<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>
</ C l a u s e>
</ C o n s e q u e n t>
</ Rule>
</ R u l e B a s e>
</ 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 fuzzy
components composing the system have to be defined. Fig. 6 shows the fuzzy input variable editor in VisualFML and Fig.7 shows the conceptual framework for
the fuzzy controller. The task of this mechanism is to infer the possibility of developing malware behavioral of each instance according to the malware behavioral
knowledge base and rule base. First, there are four input fuzzy variables, including
File Hash (FH), Connect IP (CI), File Change (FC), and one output fuzzy variable Similarity (SI) considered in this fuzzy inference mechanism. In this chapter, a
trapezoidal function is adopted as the membership function of fuzzy number. It can
be expressed as the parameter set [a, b, c, d] and Figs. 8(a)-(d) show the membership
functions of the fuzzy variables:FH, CI, FC, and SI, respectively.

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 e n c o d i n g =UTF8?>
<F u z z y C o n t r o l l e r name=TWMAN3i 5 v 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 = 1 0 0 0 0 . 0
s c a l e = t y p e = i n p u t >
<FuzzyTerm name= L e s s c o m p l e m e n t = f a l s e >
<T r a p e z o i d S h a p e Param1= 1 8 1 8 . 1 8 1 8 1 8 Param2= 2 7 2 7 . 2 7 2 7 2 7
Param3= 3 6 3 6 . 3 6 3 6 3 6 Param4= 4 5 4 5 . 4 5 4 5 4 5/>
</FuzzyTerm>
<FuzzyTerm name=Much c o m p l e m e n t = f a l s e >
<T r a p e z o i d S h a p e Param1= 5 4 5 4 . 5 4 5 4 5 5 Param2= 6 3 6 3 . 6 3 6 3 6 4
Param3= 7 2 7 2 . 7 2 7 2 7 3 Param4= 8 1 8 1 . 8 1 8 1 8 2/>
</FuzzyTerm>
<FuzzyTerm name= Normal c o m p l e m e n t = f a l s e >
<T r a p e z o i d S h a p e Param1= 3 6 3 6 . 3 6 3 6 3 6 Param2= 4 5 4 5 . 4 5 4 5 4 5
Param3= 5 4 5 4 . 5 4 5 4 5 5 Param4= 6 3 6 3 . 6 3 6 3 6 4/>
</FuzzyTerm>
<FuzzyTerm name= VeryLess c o m p l e m e n t = f a l s e >
<T r a p e z o i d S h a p e Param1= 0 . 0 Param2= 0 . 0
Param3= 1 8 1 8 . 1 8 1 8 1 8 Param4= 2 7 2 7 . 2 7 2 7 2 7/>
</FuzzyTerm>
<FuzzyTerm name=VeryMuch c o m p l e m e n t = f a l s e >
<T r a p e z o i d S h a p e Param1= 7 2 7 2 . 7 2 7 2 7 3 Param2= 8 1 8 1 . 8 1 8 1 8 2
Param3= 1 0 0 0 0 . 0 Param4= 1 0 0 0 0 . 0 />
</FuzzyTerm>
</ F u z z y V a r i a b l e >
....
<KnowledgeBase>
<R u l e B a s e name=RB1 t y p e =Mamdani >
....
<R u l e 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 >
<A n t e c e d e n t>
<C l a u s e>
<V a r i a b l e >F i l e H a s h </ V a r i a b l e >
<Term>Less </Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >F i l e C h a n g e </ V a r i a b l e>
<Term>V e ry L e s s </Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >C o n n e c t IP </ V a r i a b l e >
<Term>Less </Term>
</ C l a u s e>
</ A n t e c e d e n t>
<C o n s e q u e n t>
<C l a u s e>
<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>
</ C l a u s e>
</ C o n s e q u e n t>
</ Rule>
</ R u l e B a s e>
</ 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 linguistic terms, Very Less, Low, Normal, Much, and Very Much, to express the trapezoidal 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

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 stored
in the ontology. The AND operator is then used to combine the matching degree
of each fuzzy rules condition. Next, the center of area of each rule is calculated.
We utilize the membership functions of fuzzy output variable Similarity with five
linguistic terms are Very Low, Low, Medium, High, and Very High, whose trapezoidal 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], respectively. Finally, the fuzzy inference mechanism performs the MAX operation to
integrate the triggered rules having the same consequences and outputs the maximum center of area. Table 1 lists the parameters of the membership functions. Table
2 lists part of the fuzzy rules, which are constructed by the domain experts. Starting from this initial information, the proposed approach is able to take opportune
decisions to detect the malicious program.

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) SI
and k means 103

4 Experimental Results
This section is devoted to introduce a case study where our intelligent framework
has been tested and validated. In order to evaluate the effectiveness of the proposed
approach, 10000 attendance records retrieved from the malware repository of National Center for High Performance and Computing (NCHC) of Taiwan are used as
the experimental data, shown in Table 3.
Fig. 9 shows a three-dimensional graphical representation of the system behavior
and results of the fuzzy inference process, where X axis is File Hash and Y axis
is File Change. Fig. 10 shows anther system behavior view, where X axis is File
Change and Y axis is Connect IP. Figs. 9 and 10 indicate that we can effectively
judge 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 criteria
such as accuracy, precision, and recall. The accuracy, precision, and recall functions
are calculated by Eqs. 4, 5 and 6, respectively. The parameters of T P (true positive), FP (false positive), FN (false negative), and T N (true negative) are defined
and listed in Table 4. T P and T N denote correct classifications. A FP is when the

126

H.-D. Huang et al.

Table 1 Parameters of the membership functions


Symbol

Fuzzy Term

Membership Function

FH

Very Less
Less
Normal
Much
Very Much

[0, 0, 1818, 2727]


[1818, 2727, 3636, 4545]
[3636, 4545, 5454, 6363]
[5454, 6363, 7272, 8181]
[7272, 8181, 10000, 10000]

FC

Very Less
Less
Normal
Much
Very Much

[0, 0, 1818, 2727]


[1818, 2727, 3636, 4545]
[3636, 4545, 5454, 6363]
[5454, 6363, 7272, 8181]
[7272, 8181, 10000, 10000]

CI

Very Less
Less
Normal
Much
Very Much

[0, 0, 1818, 2727]


[1818, 2727, 3636, 4545]
[3636, 4545, 5454, 6363]
[5454, 6363, 7272, 8181]
[7272, 8181, 10000, 10000]

SI

Very Low
Low
Medium
High
Very High

[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]
[0.72, 0.81, 0.90, 1]

outcome is not correctly predicted as Yes but in fact, it is No. A FN is when outcome is not correctly predicted as No, but in fact, it is Yes. The distribution of the
accuracy, precision and recall are shown in Fig. 11.
Accuracy =

(T N + T P)
100%
(T P + T N + FP + FN)

(1)

TP
100%
(T P + FP)

(2)

Precision =
Recall =

TP
100%
(T P + FN)

(3)

5 Conclusions
A fuzzy logic approach involves the ability to compare two distinctly different items
and determines a fundamental level of similarity between the two items. This chapter explores the possibility of utilizing the fuzzy techniques as a means to identify

Fuzzy Markup Language for Malware Behavioral Analysis

127

Table 2 Part of the fuzzy rules


Rule
No

FH

Input Variables
FC

1
2
3
4
5
6
7
8
9
10
11
12
13

Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal
Normal

Normal
Normal
Normal
Normal
Normal
Very Much
Very Much
Very Much
Very Much
Very Much
Much
Much
Much

Very Less
Very Less
Very Less
Very Less
Very Less
Very Less
Very Less
Very Less
Very Less
Very Less
Very Less
Very Less

Normal
Normal
Less
Less
Less
Less
Less
Very Less
Very Less
Very Less
Very Less
Very Less

...
114
115
116
117
118
119
120
121
122
123
124
125

CI

Output Variable
SI

Normal
Very Much
Much
Less
Very Less
Normal
Very Much
Much
Less
Very Less
Normal
Very Much
Much

Medium
High
Medium
Low
Very Low
Medium
High
High
Medium
Medium
Medium
High
High

Less
Very Less
Very Much
Much
Normal
Less
Very Less
Very Much
Much
Normal
Less
Very Less

Low
Low
Low
Medium
Low
Low
Very Low
Low
Medium
Medium
Low
Very Low

...

...

the similarities in emerging families of malicious software. However, the similarity degree of two programs is usually used to determine that whether one program
of these two is a variant of the other. In this model, malicious characteristics of a
program are first abstracted by the fuzzy pattern recognition, and then the fuzzy ontology for malware behavioral analysis scheme is presented. The proposed approach
is composed of a fuzzy inference and semantic decision-making mechanism to describe the changes of the registry key value, network connection, and file change
to build the ontology and behavioral rules. The experimental results show that our
approach is feasible and usable for malware behavioral analysis system. This proposed approach is capability of detecting unknown malicious programs and malware

128

H.-D. Huang et al.

Table 3 Experimental data input

Unit

FH

Input
CI

FC

[0,10000]

[0,10000]

[0,10000]

No
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

4561
1225
1125
6523
2541
7521
6564
6256
5421
6325
235
6134
7661
461
2564
6741
1954
167
647
6197
6347
235
8647
8647
233
6635
5142
5127
8138
7138
674
1297
179
675

2686
2655
2674
2673
2675
2675
3673
3705
4055
6562
5
7353
7543
145
106
9621
264
912
922
9462
7680
140
9420
9820
365
7432
7450
6503
8543
7873
324
156
258
28

9239
8883
8707
7846
1313
7731
6680
4152
8480
7332
0
10000
10000
115
726
10000
0
0
0
7565
8565
850
7850
10000
0
8865
7650
8850
9850
9850
0
339
0
0

Output
SI
[0,1]
Desired

Inferred

0.951
0
0
0.927
0
0.951
0.951
0.951
0.927
0.975
0
0.951
0.927
0
0
0.953
0
0
0
0.976
0.951
0
1
0.976
0
0.975
0.929
0.951
0.976
1
0
0
0
0

0.681
0.499
0.5
0.681
0.15
0.746
0.672
0.571
0.681
0.681
0.136
0.703
0.745
0.136
0.281
0.753
0.167
0.136
0.136
0.743
0.764
0.136
0.794
0.863
0.136
0.717
0.681
0.681
0.863
0.798
0.136
0.136
0.136
0.136

Fuzzy Markup Language for Malware Behavioral Analysis


Table 3 (continued)

Unit

FH

Input
CI

FC

[0,10000]

[0,10000]

[0,10000]

No
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

6571
6429
6943
1257
8642
6431
5741
6652
7410
2268
2149
6541
1421
2431
6643
314

6541
7831
7585
145
8007
6921
8421
8650
7922
94
680
8041
2402
3997
6756
478

947
8565
9543
115
5726
6026
10000
10000
6520
0
0
7850
1850
5939
9329
0

Fig. 9 Fuzzy variable control surface viewer

Output
SI
[0,1]
Desired

Inferred

0.927
0.951
0.927
0
0.976
0.951
0.829
0.95
0.814
0
0
0.976
0.024
0.634
1
0

0.863
0.791
0.747
0.136
0.639
0.611
0.742
0.863
0.647
0.226
0.205
0.794
0.146
0.103
0.681
0.136

129

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 results

Prediction 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 better
protection and services to end users.
In the future, introducing the fuzzy techniques to a larger of collection and analyzing the infrastructure of other security-related data points, such as malware,
Botnet family similarity, and social networking inferences of similar malware, will
be considered. In addition, vaguer knowledge of OS platform with experimental
data 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 performance with other classification methods. In order to take prompt and appropriate measures, TWMAN can integrate with a human thinking semantic model.

Fuzzy Markup Language for Malware Behavioral Analysis

131

Therefore, we consider that TWMAN could be a powerful tool to improve the


network safety.
Acknowledgements. This work is partially supported by the National Science Council of
Taiwan under the grant NSC98-2221-E-024-009-MY3 and NSC99-2911-I-024-004. The authors would like to thank National University of Tainan in Taiwan and University of Essex in
UK for their supporting this research project.

References
1. Acampora, G., Gaeta, M., Loia, V., Vasilakos, A.V.: Interoperable and adaptive fuzzy
services for ambient intelligence applications. ACM Transactions on Autonomous and
Adaptive Systems 5(2), 126 (2010)
2. Acampora, G., Loia, V.: Using FML and fuzzy technology in adaptive ambient intelligence environments. International Journal of Computational Intelligence Research 1(2),
171182 (2005)
3. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive domotic framework. IEEE Transactions on Industrial Informatics 2, 97111 (2005)
4. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelligence. Information Sciences 178(3), 631646 (2008)
5. Bobillo, F., Straccia, U.: Representing fuzzy ontologies in OWL 2. In: 2010 IEEE World
Congress 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 Inference Scheme for Healthcare Applications Based on Fuzzy Markup Language. In: 2009
10th International Symposium on Pervasive Systems, Algorithms, and Networks (ISPAN
2009), Kaohsiung, Taiwan, December 14-16 (2009)
7. Huang, H.D., Chuang, T.Y., Tsai, Y.L., Lee, C.S.: Ontology-based Intelligent System
for Malware Behavioral Analysis. In: 2010 IEEE World Congress on Computational
Intelligence (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 Analysis System: TWMAN. In: 2011 IEEE Symposium on Computational Intelligence for
Intelligent 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 Fuzzy
Ontologies to Malware Behavioral Analysis. In: 2011 IEEE International Conference on
Fuzzy Systems (FUZZ-IEEE 2011), Taipei, Taiwan, June 27-30 (2011)
10. Hungenberg, T., Eckert, M.: INetSim (2010), http://www.inetsim.org
11. Kornblum, J.: ssdeep (2010), http://ssdeep.sourceforge.net
12. Lee, C.S., Jian, Z.W., Huang, L.K.: A fuzzy ontology and its application to news summarization. IEEE Transactions on Systems, Man and Cybernetics Part B 35(5), 859880
(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 International
Conference 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

132

H.-D. Huang et al.

15. Quan, T.T., Hui, S.C., Fong, A.C.M., Cao, T.H.: Automatic fuzzy ontology generation for
semantic web. IEEE Transaction on Knowledge and Data Engineering 18(6), 842856
(2006)
16. Sanchez, F.G., Bejar, R.M., Contreras, L., Breis, J.T.F., Nieves, D.C.: An ontology-based
intelligent system for recruitment. Expert Systems with Applications 31(2), 248263
(2006)
17. Stewart, J.: Behavioural malware analysis using Sandnets. Computer Fraud & Security 12, 46 (2006)
18. Wang, M.H., Lee, C.S., Hsieh, K.L., Hsu, C.Y., Chang, C.C.: Intelligent ontological
multi-agent for healthy diet planning. In: 2009 IEEE International Conference on Fuzzy
System (FUZZ-IEEE 2009), Jeju Island, Korea, August 19-24 (2009)
19. Zhao, H., Xu, M., Zheng, N., Yao, J., Ho, Q.: Malicious Executables Classification Based
on Behavioral Factor Analysis. In: 2010 International Conference on e-Education, eBusiness, e-Management and e-Learning, Sanya, China, January 22-24 (2010)

Applying FML-Based Fuzzy Ontology to


University 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 that
education provided by institutions meets acceptable levels of quality. In 2011, the
higher education evaluation and accreditation council of Taiwan (HEEACT) started
to evaluate the higher education institutions through five predefined items, including (1) university goal, (2) university governance and management, (3) teaching
and learning resource, (4) performance and society responsibility, and (5) improvement and quality assurance mechanism. In this chapter, we present a novel Fuzzy
Markup Language (FML)-based fuzzy ontology and its application to university assessment for National University of Tainan (NUTN), Taiwan. The proposed fuzzy
ontology model is utilized to represent the university evaluation and accreditation
domain knowledge predefined by domain experts. The FML is adopted to describe
the knowledge base and rule base of the university assessment. Simulation results
indicate that the proposed approach can effectively infer the pass level of the university assessment.
Mei-Hui Wang Chang-Shing Lee Ming-Kai Su
Dept. of Computer Science and Information Engineering,
National University of Tainan, Taiwan
e-mail: {mh.alice.wang,devil74825}@gmail.com,
leecs@mail.nutn.edu.tw
Hani Hagras
The Computational Intelligence Centre, University of Essex, UK
e-mail: hani@essex.ac.uk
Yu-Yang Tseng Che-Hung Liu
Dept. of Business and Management, National University of Tainan, Taiwan
e-mail: {kofninja,chehung}@gmail.com
Hui-Min Wang Yuan-Liang Wang
Computer Center, National University of Tainan, Taiwan
e-mail: ming1966@gmail.com, yuan@mail.nutn.edu.tw
G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 133147.
c Springer-Verlag Berlin Heidelberg 2013
DOI: 10.1007/978-3-642-35488-5_8


134

M.-H. Wang et al.

1 Introduction
The higher education accreditation is conducted or supported by a government organization in many countries, such as the ministry of education. In 2005, the Higher
Education Evaluation and Accreditation Council of Taiwan (HEEACT) has been
established to cooperate with Ministry of Education to execute the university assessment in Taiwan. Additionally, the HEEACT also develops the indicators, interacts with the practitioners, and exchanges with the international evaluation councils
for the higher education evaluation. For most higher education institutes, collecting,
confirming, and organizing the necessary documents about the university evaluation is a very time-consuming and exhausted job. After almost all of the things
are ready, it is still unknown if the institute can pass the accreditation. Hence, in
this chapter, we present a fuzzy markup language (FML)-based university assessment system, combined the FML, fuzzy ontology, and fuzzy inference mechanism
to help the higher education institutes to create a reference for the results of the evaluation. Fuzzy Markup Language (FML) is a fuzzy-based markup language that can
manage fuzzy concepts, fuzzy rules, and a fuzzy inference engine [4] [3] [4]. Additionally, FML is composed of three layers-eXtensible Markup Language (XML), a
document-type definition, and extensible stylesheet language transformations. The
developed approach is different from the other similar approaches such as Fuzzy
Control Language (FCL) or MATLAB Fuzzy Inference System (FIS) developed
by the Mathworks. The root of the fuzzy controller taxonomy, controller node, is
represented through the FML tag <FuzzyController>. The fuzzy knowledge base
is defined by means of the tag <KnowledgeBase> which maintains the set of the
fuzzy concepts used to model the fuzzy rule base. The root of the fuzzy rule base
component 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 proposed
the interoperable and adaptive fuzzy services for ambient intelligent applications.
The knowledge is defined as any information that is relevant, actionable, and it
is based on the experience of a person. All knowledge workers share certain characteristic activities. However, when data is annotated, it is done against a framework
or ontology. Ontology has become a very powerful way of sharing the knowledge as
well as representing the information and its semantic. An ontology is a collection of
key concepts and their inter-relationships collectively providing an abstract view of
an application domain [17]. With the support of the ontology, both user and system
can communicate with each other by the shared and common understanding of a
domain [17]. In addition, an ontology is an essential element in many applications,
including agent systems, knowledge management systems, and e-commerce platforms. For example, Lee et al. [9] presented a fuzzy ontology and applied it to news
summarization. They also proposed a novel episode-based ontology construction
mechanism to extract domain ontology from unstructured text documents [11].
In this chapter, the FML is applied to represent the knowledge base of the university assessment. In particular, National University of Tainan (NUTN) is given an
instance to be described. In addition, the rule base of the university assessment in
Taiwan is also constructed by using the FML. According to the HEEACT [5], there

Applying FML-Based Fuzzy Ontology to University Assessment

135

are five items, including (1) university goal, (2) university governance and management, (3) teaching and learning resource, (4) performance and society responsibility, and (5) improvement and quality assurance mechanism, to be considered if this
university passes the assessment or not. We will take the university goal as an example for constructing the FML knowledge base and rule base in this chapter. Based
on the HEEACT, there are six factors that will affect the university goals evaluated
results, namely, the SWOT (Strength, Weakness, Opportunity, and Threat) analysis,
development plan, student core ability, academic office, development direction, and
development identification. The simulation results show that the proposed approach
can work effectively.
The remainder of this chapter is structured as follows. Sect. 2 presents the structure 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 presented. The simulation results are shown in Sect. 4. Finally, the conclusions are
drawn in Sect. 5.

2 Structure of University Goal Ontology


In this section, the structure of university goal ontology is introduced. The structure
of the domain ontology adopted in this chapter contains four layers, namely the
domain layer, category layer, concept layer, and instance layer. The domain layer
represents the domain name of the university goal ontology, and consists of various
categories defined by domain experts. The category layer defines several categories.
Each concept in the concept layer contains a concept name and some attributes for
an application domain. The instance layer is composed of lots of instances. The
association indicates a semantic relationship between concepts in the concept layer
and instances in the instance layer [9] [11].
According to the criteria defined by the HEEACT, the university is not able to
pass the evaluation and accreditation unless the university certainly plans the university goal, does the university governance and management as well as teaching and
learning resource, checks the performance and society responsibility, and eventually acts the improvement and quality assurance mechanism. That is, the university
can fully pass the evaluation and accreditation if the university completely achieves
the goal of PDCA (Plan, Do, Check, and Act) action circulation circle [5]. For
planning the university goal, it is necessary for the university to (1) analyze the
strength, weakness, opportunity, and threat from the internal and external higher
education environment, (2) describe the completeness and rationality of the university goal based on SWOT, (3) define the universitys developing plan with vision,
goal, strategy, and action item to meet the planned university goal, (4) develop the
university-level and college-level students basic accomplishment and core ability,
and then further guide the departments to define department-level students basic
accomplishment and core ability, (5) fully statement the installation of the administrative units and departments to meet the planned university goal and achieve the
goal of the university development, and (6) make use of diverse ways to promote

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 and
assess the performance of such a promotion.
Based on the above-mentioned fundamental knowledge of the university assessment [5], this chapter designs the fuzzy ontology for the university goal. Figs. 1
and 2 show the partial fuzzy ontology model for planning the university goal in
English and in Chinese, respectively. In the domain layer, the domain name of this
ontology is University Goal. There are six categories, including (1) SWOT Analysis,

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) Development Direction, and (6) Development Identification, in the category layer of the
ontology.
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

138

M.-H. Wang et al.

Analysis for an example. The SWOT denotes Strength, Weakness, Opportunity, and
Threat. This concept can divide into two parts including internal factors and external factors, and then these factors are considered as the fuzzy variables and fuzzy
sets for the knowledge base and rule base of the FML-based university assessment
system.
Table 1 Example of categories and concepts for university goal ontology
Category

Concept
Internal

SWOT Analysis
External

Development Plan

Member
Developed Proposal
Content

Attribute
Strength, Weakness,
Completeness, Rationality
Opportunity, Threat,
Completeness, Rationality
Fitness, Consult Expert
Meeting Material, Meeting Record
Vision, Goal, Strategy, Action Item

Department

Basic Accomplishment,
Core Ability, University Goal
Basic Accomplishment,
Core Ability, Feature
Basic Accomplishment, Core Ability

Academic Office

Academic Unit
Planning and Setting
Academic Unit
Review Mechanism

Plan, Setting,
Vision, Goal
Definite Mechanism,
Definite Procedure

Development Direction

University Development Plan


College Development Plan

Direction, Feature
Direction, Strategy

University
Student Core Ability

College

Involvement Development
Plan of Faculty
Understanding Development
Plan of Students
Development Identification
Understanding
the Goal of Faculty
Understanding
the Goal of Students

Involvement,
Understanding
Vision, Goal
Basic Accomplishment,
Core Ability
Basic Accomplishment,
Core Ability

Table 1 shows the examples of categories and their corresponding concepts and
attributes for the university goal ontology. For instance, the concepts of the category Development Plan contain Member, Developed Proposal, and Content. The
attributes of the concept Member are Fitness and Consult Expert. Take NUTN as an
instance of university goal ontology. The values of the attributes Fitness and Consult
Expert are Excellent and Expert outside the School, respectively.

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 fuzzy
inference 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 developed by Dr. Giovanni Acampora and Prof. Vincenzo Loia, University of Salerno,
Italy [4] [3]. Recently, FML has been successfully applied to lots of research topics such as diet and meeting scheduling [11] [15] [13]. The knowledge base is defined by means of the tag <KnowledgeBase> which maintains the set of fuzzy
concepts used to model the fuzzy rule base. The <KnowledgeBase> uses the
attribute ip that determines the location in the network of whole fuzzy knowledge base of our system. In order to define the fuzzy concept related controlled
system, <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 linguistic term describing the fuzzy concept, for example, low temperature; the set
of tags defining the shapes of fuzzy sets are related to fuzzy terms. The attributes
of <FuzzyVariable> tags are: name, scale, domainLeft, domainRight, type, and
ip. <FuzzyTerm> uses one attribute, name, used to define the linguistic value,
to associate with fuzzy concept. Fuzzy shape tags, used to complete the definition of fuzzy concept, are: <PIShape>, <SShape>, <ZShape>, <LinearShape>,
<TrapezoidShape>, and <TriangularShape>. Every shaping tag uses a set of attributes which define the real outline of corresponding fuzzy set [11].
The root of fuzzy rule base component is modeled by the <RuleBase> tag which
defines a fuzzy rule set. The <RuleBase> tag uses two attributes: inferenceEngine
and ip. The former is used to define inference operator type: MinMaxMin Mamdani
or LarsonProduct. The latter defines the network location of the set of rules used
in fuzzy controller. In order to define the single rule, the <Rule> tag is used. The
tags used by <Rule> are: id, connector, weight, and ip. The definition of antecedent
and 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> is
used to define fuzzy clauses in antecedent and consequent part of Mamdani controller rules as well as in antecedent part of TSK controller rules. While, the pair
<Variable>, <TSKParam> is used to model the consequent part of TakagiSugeno-Kang (TSK) controller rules [11].

3.2 Knowledge Base of University Assessment System


The knowledge base of university assessment system for evaluating the university goal consists of five input fuzzy variables, namely SWOT Analysis (SWOTA),

140

M.-H. Wang et al.

Development Plan (DP), Student Core Ability (SCA), Academic Office (AO), Development Direction (DD), and Development Identification (DI), and one output fuzzy
variable University Goal (UG). Listing 1 lists the partial knowledge base of assessing university goal, and Table 2 shows the parameters of fuzzy variables and fuzzy
sets. 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 = i n p u t >
<FuzzyTerm name= P a s s h e d g e =Normal>
<T r a p e z o i d S h a p e Param1= 40 Param2= 60 Param3= 100 Param4= 100 />
</FuzzyTerm>
<FuzzyTerm name= F a i l h e d g e =Normal>
<T r a p e z o i d S h a p e Param1= 0 Param2= 0 Param3= 0 Param4= 60 />
</FuzzyTerm>
</ F u z z y V a r i a b l e >
<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 = i n p u t >
<FuzzyTerm name= P a s s h e d g e =Normal>
<T r a p e z o i d S h a p e Param1= 40 Param2= 60 Param3= 100 Param4= 100 />
</FuzzyTerm>
<FuzzyTerm name= F a i l h e d g e = Normal>
<T r a p e z o i d S h a p e Param1= 0 Param2= 0 Param3=0 Param4= 60 />
</FuzzyTerm>
</ F u z z y V a r i a b l e >
....
<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 = o utput >
<FuzzyTerm name= P a s s h e d g e =Normal>
<T r a p e z o i d S h a p e Param1= 65 Param2= 70 Param3= 100 Param4= 100 />
</FuzzyTerm>
<FuzzyTerm name= C o n d i t i o n a l h e d g e = Normal>
<T r a p e z o i d S h a p e Param1= 50 Param2= 55 Param3= 65 Param4= 70 />
</FuzzyTerm>
<FuzzyTerm name= F a i l h e d g e = Normal>
<T r a p e z o i d S h a p e Param1=0 Param2= 0 Param3= 50 Param4= 55 />
</FuzzyTerm>
</ F u z z y V a r i a b l e >
</ KnowledgeBase>

3.3 Rule Base of University Assessment System


In this subsection, the rule base of the university assessment system for assessing
the passing level of the university goal is introduced. Listing 2 and Table 3 show the
partial 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 the
fuzzy inference rule in this chapter. Hence, the total number of the fuzzy inference
rules is 64 in this chapter. Moreover, there are three fuzzy sets, including Pass,
Conditional, and Fail, defined in the output fuzzy variables.

Applying FML-Based Fuzzy Ontology to University Assessment

141

Table 2 Parameters of fuzzy variables and fuzzy sets


Fuzzy Variable

Fuzzy Set

Membership Function

SWOTA

Pass
Fail

[40, 60, 100,100]


[0, 0, 60]

SCA

Pass
Fail

[40, 60, 100,100]


[0, 0, 60]

DD

Pass
Fail

[40, 60, 100,100]


[0, 0, 60]

Pass
Conditional
Fail

[65, 70, 100,100]


[50, 55, 65, 70]
[0, 0, 50, 55]

DP

Pass
Fail

[40, 60, 100,100]


[0, 0, 60]

AO

Pass
Fail

[40, 60, 100,100]


[0, 0, 60]

DI

Pass
Fail

[40, 60, 100,100]


[0, 0, 60]

UG

4 Simulation Results
In this section, some simulation results are given. The proposed FML-based university assessment system is implemented by ASP.Net (Web Inference), Microsoft C#
programming language (Fuzzy Inference Mechanism), and Java (FML and Visual
Editor). The research performance presented in this chapter is a research project
involving with the NUTN and HAMASTAR TECHNOLOGY CO., LTD. in Taiwan. With the support of the involved domain experts and the on-line information
provided by the HEEACT [5], the proposed method is applied to the university assessments five domain areas, including (1) planning the university goal, (2) doing
the university governance and management, (3) doing the teaching and learning resource, (4) checking the performance and society responsibility, and (5) acting the
improvement and quality assurance mechanism. In this section, the university goal
domain is implemented to give an example. Fig. 4 shows the screenshot of the webbased university assessment system for NUTN. Fig. 5 shows the screenshot of the
FML-based university assessment system when assessing the passing level of planning university goal. Fig. 6 shows the screenshot that the university goal is passed
if the values of the SWOTA, DP, SCA, AO, DD, and DI are 80, 85, 70, 80, 80, and
90, respectively.

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 by


the University of Salerno are shown in Fig. 7. Fig. 7(a) shows the relationship among
SCA, DP, and UG. It indicates that the UG does start to increase as the SCA and DP
approaches the pass state (40 100). On the contrary, if SCA and DP reduce toward the fail state (0 60), the passing possibility of the university goal gradually
decreases. Fixed the values of SCA, DP, AO, and DI at 0, 100, 100, and 100, respectively, and varied the values of the SWOTA and DD, Fig. 7(b) shows that the
passing possibility of the university goal gradually increases when the values of the
both SWOTA and DD increase.
Fig. 7(c) illustrates the variances in UG when changing the values of AO and
DI. 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

Applying FML-Based Fuzzy Ontology to University Assessment

Listing 2 Partial rule base of FML for assessing university goal


<R u l e B a s e a c t i v a t i o n M e t h o d =MIN andMethod =MIN o r Me t h o d=MAX
name= RuleBase1 t y p e =mamdani >
<R u l e 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>
<A n t e c e d e n t>
<C l a u s e>
<V a r i a b l e >SWOTA</ V a r i a b l e > <Term>Pa s s </Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >DP</ V a r i a b l e > <Term>Pa s s </Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >SCA</ V a r i a b l e > <Term>Pa s s </Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >AO</ V a r i a b l e > <Term>Pa s s </Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >DD</ V a r i a b l e > <Term>Pa s s </Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >DI</ V a r i a b l e > <Term>Pa s s </Term>
</ C l a u s e>
</ A n t e c e d e n t>
<C o n s e q u e n t>
<C l a u s e>
<V a r i a b l e >UG</ V a r i a b l e > <Term>Pa s s </Term>
</ C l a u s e>
</ C o n s e q u e n t>
</ Rule>
...
<R u l e 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>
<A n t e c e d e n t>
<C l a u s e>
<V a r i a b l e >SWOTA</ V a r i a b l e > <Term>F a i l </Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >DP</ V a r i a b l e > <Term>F a i l </Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >SCA</ V a r i a b l e > <Term>F a i l </Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >AO</ V a r i a b l e > <Term>F a i l </Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >DD</ V a r i a b l e > <Term>F a i l </Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >DI</ V a r i a b l e > <Term>F a i l </Term>
</ C l a u s e>
</ A n t e c e d e n t>
<C o n s e q u e n t>
<C l a u s e>
<V a r i a b l e >UG</ V a r i a b l e > <Term>F a i l </Term>
</ C l a u s e>
</ C o n s e q u e n t>
</ Rule>
</ R u l e B a s e>

143

144

M.-H. Wang et al.

on the major trends of Fig. 7, the behavior of the proposed FML-based university
assessment system meets the criteria defined by the HEEACT [5]; that is, the higher
the values of affected factors, the higher the passing possibility of the university
goal. Hence, the proposed approach is feasible for the university evaluation.
Table 3 Partial fuzzy inference rules for assessing university goal
Input Variables
DP SCA AO

DD

DI

Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass

Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass

Pass
Pass
Pass
Pass
Fail
Fail
Fail
Fail
Pass
Pass
Pass
Pass
Fail
Fail
Fail

Pass
Pass
Fail
Fail
Pass
Pass
Fail
Fail
Pass
Pass
Fail
Fail
Pass
Pass
Fail

Pass
Fail
Pass
Fail
Pass
Fail
Pass
Fail
Pass
Fail
Pass
Fail
Pass
Fail
Pass

Fail
Fail
Fail
Fail
Fail
Fail
Fail
Fail
Fail

Fail
Fail
Fail
Fail
Fail
Fail
Fail
Fail
Fail

Fail
Pass
Pass
Pass
Pass
Fail
Fail
Fail
Fail

Fail
Pass
Pass
Fail
Fail
Pass
Pass
Fail
Fail

Fail
Pass
Fail
Pass
Fail
Pass
Fail
Pass
Fail

No

SWOTA

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
...
56
57
58
59
60
61
62
63
64

Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Fail
Fail
Fail
Fail
Fail
Fail
Fail
...
Pass
Fail
Fail
Fail
Fail
Fail
Fail
Fail
Fail

Output Variable
UG
Pass
Pass
Pass
Conditional
Pass
Conditional
Conditional
Conditional
Pass
Conditional
Conditional
Conditional
Conditional
Conditional
Conditional
...
Fail
Conditional
Fail
Fail
Fail
Fail
Fail
Fail
Fail

Applying FML-Based Fuzzy Ontology to University Assessment

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

145

146

M.-H. Wang et al.

Fig. 7 Surface view for FML-based university assessment system (a) Inputs (SCA and
DP)/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 of
fuzzy ontology. Additionally, the FML-based university assessment system is constructed at NUTN to support the evaluation of the university. The simulation results
show that the proposed approach is workable for the higher education institutes. In
the future, it is hoped to improve the performance of the university assessment system by adding the genetic algorithm, and extend the developed tool to the higher
education institutes to simulate the evaluated results of other domain areas in the
university assessment.
Acknowledgements. The authors would like to thank the National Science Council of Taiwan for financially supporting this international cooperation research project under the grant
NSC99-2911-I-024-004, NSC99-2622-E-024-003-CC3, NSC98-2221-E-024-009-MY3, and
NSC99-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

Applying FML-Based Fuzzy Ontology to University Assessment

147

developed FML editors for simulating the university assessment, and (2) National University
of Tainan in Taiwan, HAMASTAR TECHNOLOGY CO., LTD. in Taiwan, and University of
Essex in UK for their supporting this research project.

References
1. Acampora, G., Gaeta, M., Loia, V., Vasilakos, A.V.: Interoperable and adaptive fuzzy
services for ambient intelligence applications. ACM Transactions on Autonomous and
Adaptive Systems 5(2), 126 (2010)
2. Acampora, G., Loia, V.: Using FML and fuzzy technology in adaptive ambient intelligence environments. International Journal of Computational Intelligence Research 1(2),
171182 (2005)
3. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive domotic framework. IEEE Transactions on Industrial Informatics 2, 97111 (2005)
4. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelligence. Information Sciences 178(3), 631646 (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 summarization. IEEE Transactions on Systems, Man, and cybernetics, Part B: Cybernetics 35(5), 859880 (2005)
7. Lee, C.S., Kao, Y.F., Kao, Y.H., Wang, M.H.: Automated ontology construction for unstructured text documents. Data and Knowledge Engineering 60(3), 547566 (2007)
8. Lee, C.S., Wang, M.H., Chen, J.J.: Ontology-based intelligent decision support agent for
CMMI project monitoring and control. International Journal of Approximate Reasoning 48(1), 6276 (2008)
9. Lee, C.S., Wang, M.H., Acampora, G., Hsu, C.Y., Hagras, H.: Diet assessment based on
type-2 fuzzy ontology and fuzzy markup language. International Journal of Intelligent
System 25(12), 11871216 (2010)
10. Lee, C.S., Wang, M.H., Wu, M.H., Hsu, C.Y., Lin, Y.C., Yen, S.J.: A type-2 fuzzy personal ontology for meeting scheduling system. In: 2010 IEEE World Congress on Computational Intelligence (IEEE WCCI 2010), pp. 1823 (2010)
11. Wang, M.H., Lee, C.S., Hsieh, K.L., Hsu, C.Y., Acampora, G., Chang, C.C.: Ontologybased multi-agents for intelligent healthcare applications. Journal of Ambient Intelligence and Humanized Computing 1(2), 111131 (2010)

A Type-2 FML-Based Fuzzy Ontology for


Dietary 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 the
worlds top ten fatal causes of death for the past few years. As far as the diet is
concerned, it is easy to find out how to eat healthily and which food is good for
people on the Internet. The diet behavior is highly personalized and also associated
with the culture and religion. In this chapter, the type-2 FML-based fuzzy ontology
is introduced. Moreover, the food ontology and type-2 fuzzy dietary ontology are
further applied to the dietary assessment. Additionally, with the technologies of the
type-2 fuzzy sets and fuzzy inference approach based on FML, the dietary healthy
level is obtained to give users a reference for their eating. Experimental results show
that the proposed approach is feasible to evaluate the dietary healthy level for the
collected meal records.

1 Introduction
In health education clinic, sometimes dietary assessment carried out face-to-face
with a patient is time-consuming for the researcher or clinician [21]. For this reason,
Mei-Hui Wang Chang-Shing Lee Zhi-Wei Chen
Dept. of Computer Science and Information Engineering,
National University of Tainan, Taiwan
e-mail: {mh.alice.wang,a301203034}@gmail.com,
leecs@mail.nutn.edu.tw
Hani Hagras
The Computational Intelligence Centre,
School of Computer Science and Electronic Engineering, University of Essex, UK
e-mail: hani@essex.ac.uk
Su-E Kuo Hui-Hua Cheng Hui-Ching Kuo
Dept. of Nutritional Service, National Cheng Kung University Hospital, Taiwan
e-mail: {iris,susan,n941272}@mail.ncku.edu.tw
G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 149168.
c Springer-Verlag Berlin Heidelberg 2013
DOI: 10.1007/978-3-642-35488-5_9


150

M.-H. Wang et al.

a computer-assisted dietary assessment system with standardization of the questioning sequence, immediate results, and increased flexibility is a good choice for the
health practitioners to allow them to focus their time on the nutritional needs of the
individual rather than the coding and sorting of the dietary data [23]. Additionally,
the computer-assisted systems can provide recommendations based on an individuals usual eating habits, food preferences, and state of change [22]. Consequently,
Probst et al. [21] designed a meal-based framework to allow patients with diabetes
to self-report their dietary information for individualized dietary prescription. Lee
et al. proposed a novel fuzzy ontology to apply to diet assessment [16] and an intelligent ontology-based agent system for diabetic food recommendation [17] [15].
Wang et al. [25] proposed an intelligent ontological multi-agent system for healthy
diet planning. Lee and Wag [12] proposed a fuzzy expert system for diabetes decision support application.
Peoples diet is deeply affected by the culture, religion, and lifestyle. Each person 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 propose the most suitable and healthy dietary pattern for each individual. The research
community of the ontology has spent considerable effort making these ontology languages a formal semantic and completely unambiguous. Recently, the research on
the ontology has been popularized widely in many research fields such as knowledge management, semantic Web, business-to-business applications, multi-agent
systems, database design, software engineering, and several other application areas [5]. For example, Gutierrez et al. [9] proposed the ontology of virtual humans to
incorporate semantics into human shapes. Lee et al. presented a fuzzy ontology to
apply to news summarization [9] and also proposed a novel episode-based ontology
construction mechanism to extract domain ontology from unstructured text documents [11]. Chau [6] proposed ontology-based knowledge management system for
flow and water quality modeling. Francisco et al. [8] developed an ontology-based
intelligent web portal to provide more intelligent matches between job offers and
candidates curricula.
Type-2 fuzzy sets (T2FSs) are originally introduced by Zadeh [26]. The definitions of type-2 fuzzy sets and type-2 fuzzy logic system are described with higher
uncertainties. T2FSs can provide additional design degrees of freedom in Mamdani and Takagi-Sugeno-Kang (TSK) fuzzy logic systems (FLSs). They can be very
useful when the systems are with lots of uncertainties [14]. T2FSs also have been
applied several applications where Zarandi et al. [22] proposed type-2 fuzzy rulebased expert system model for stock price analysis, Miller and John [20] developed an interval type-2 fuzzy multiple echelon supply chain model, and Yimin and
Jing [20] applied type-2 fuzzy mathematical modeling to analyze dynamical behaviors of complex ecosystems. Lee et al. [13] proposed a diet assessment system based
on type-2 fuzzy ontology and type-2 fuzzy markup language (FML2), a type-2 fuzzy
logic extension of FML [1] [2] [3] [4].

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 dietrelated information from the website to increase the knowledge of the diet. Generally speaking, most people know that eating healthily is very important to live
in a high-quality life but they dont exactly know whether what they have eaten is
healthy or not. This is because the diet is very complicated, highly uncertain, and
deeply affected by many external factors. For example, 2200 kcal/day is enough for
an adult with the average levels of physical activity, but 2200 kcal/day is too much
for a weight-losing person. Additionally, according to the dieticians, they just can
give an approximately value rather than a precise value to describe the nutrition
facts of each food. Consequently, this chapter combines the type-2 fuzzy sets and
the ontology model to propose a type-2 fuzzy ontology.
In this chapter, we present a type-2 FML-based fuzzy ontology for dietary assessment system to analyze the dietary healthy level for the collected meal records
from the involved subjects. The experimental results indicate that the proposed system 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 ontology is introduced in Sect. 2. The type-2 FML-based fuzzy ontology for dietary
assessment 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 fuzzy
concepts and fuzzy relations in the dietary domain which is an extension version of
the domain ontology [11] and fuzzy ontology [9] proposed by our previous research
works. The definition of fuzzy ontology is first introduced. The type-2 fuzzy dietary
ontology 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 domain knowledge that is with uncertainty. It is an extension of the domain ontology
and contains five layers, including a fuzzy information layer, a fuzzy group relation layer, a fuzzy group domain layer, a fuzzy individual relation layer, and a fuzzy
individual domain layer. The concepts and relations of the fuzzy ontology are constructed by fuzzy variables and fuzzy numbers, respectively. That is, a fuzzy variable
including some fuzzy numbers is used to represent a fuzzy concept. In addition, the
relations in the fuzzy group relation layer and the fuzzy individual relation layer are
constructed by the fuzzy numbers [12].

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 layer
contains p fuzzy group relations, such as FG1 , . . . , and FG p . The fuzzy group
domain 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 , respectively. 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 ontology
will be introduced as follows.
1. A fuzzy information layer contains the fuzzy information domain name, various
categories of the fuzzy domain, and fuzzy concept sets. The concept sets contains some fuzzy variables. Each fuzzy variable in the concept sets has some
fuzzy numbers to describe the characteristics of the fuzzy variable.
2. A fuzzy group relation, denoted by FG , is an extension of instance-of relation that describes the greater than relationship between the fuzzy concept in the fuzzy information layer and its specific instance in the fuzzy group
domain layer using a fuzzy number. For a fuzzy concept set IC of the fuzzy

A Type-2 FML-Based Fuzzy Ontology for Dietary Assessment

3.

4.

5.

6.
7.

8.

9.

10.

11.

12.
13.

153

information layer and an instance set IG of the fuzzy group domain layer, any
subset of IC IG is called an FG from IC to IG .
The FG on a IC IG is called fuzzy reflexive if for all fuzzy concept pairs
(Ci ,C j ) in IC IG , where Ci is in the set IC , C j is in the set IG , and Ci = C j , we
denote that (Ci ,C j ) IC IG , (Ci ,C j ) FG .
The FG on a IC IG is called fuzzy anti-symmetric if for all fuzzy concept
pairs (Ci ,C j ) in IC IG , where Ci is in the set IC , C j is in the set IG , we denote
that (Ci ,C j ), (Ci ,C j ) IC IG , Ci FGC j , and Ci FG = C jCi = C j .
For a IC IG , an FG on a IC IG is called fuzzy transitive, if for all fuzzy
concept pairs (Ci ,C j ) in IC IG , where Ci is in the set IC and C j is in the set IG ,
we denote that (Ci ,C j ), (C j ,Ck ), (Ck ,Ci ) IC IG , (Ci ,C j ) FG , (C j ,Ck )
FG = (Ci ,Ck ) FG .
A fuzzy group relation FG is called a fuzzy partial order relation if FG is
fuzzy reflexive, fuzzy anti-symmetric, and fuzzy transitive.
A fuzzy group domain layer is a specific fuzzy information layer, including
the concepts of the instances with specific properties and the similar relation
defined in the fuzzy ontology.
A fuzzy individual relation, denoted by =FI , is an extension of instance-of
relation that describes the relationship between the fuzzy concept in the fuzzy
group domain layer and its specific instance in the fuzzy individual domain
layer using a fuzzy number. For a fuzzy concept set IG of the fuzzy group domain layer and an instance set II of the fuzzy individual domain layer, any
subset of IG II is called an =FI from IG to II .
The =FI on a IG II is called fuzzy reflexive if for all fuzzy concept pairs
(Ci ,C j ) in IC IG , where Ci is in the set IC , C j is in the set IG , and Ci = C j , we
denote that (Ci ,C j ) IC IG , (Ci ,C j ) =FI .
The =FI on a IG II is called fuzzy symmetric if for all fuzzy concept pairs
(Ci ,C j ) in IC IG , where Ci is in the set IC , C j is in the set IG , we denote
that (Ci ,C j ) =FI = (C j ,Ci ) =FI , for all fuzzy concept pairs (Ci ,C j ),
(C j ,Ci ) IC IG .
For a IG II , an =FI on a IG II is called fuzzy transitive, if for all fuzzy
concept pairs (Ci ,C j ) in IC IG , where Ci is in the set IC and C j is in the set IG ,
we denote that (Ci ,C j ), (C j ,Ck ), (Ck ,Ci ) IG II , (Ci ,C j ) =FI , (C j ,Ck )
=FI = (Ci ,Ck ) =FI .
A fuzzy individual relation =FI is called a fuzzy equivalence relation if =FI
is fuzzy reflexive, fuzzy symmetric, and fuzzy transitive.
A fuzzy Individual domain layer is a specific fuzzy information layer, including
the concepts of the instance with the same fuzzy number properties defined in
the fuzzy ontology.

2.2 Type-2 Fuzzy Set


Because the words mean different things to different people, hence the type-2 fuzzy
logic systems (T2FLS) have the potential to provide better performance than a

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), and
denoted by Eq. 1, where x X and u Jx [0, 1], 0 A (x, u) 1. A can also
expressed by Eq. 2 for discrete universes of discourse. When all A (x, u) = 1, then
A is an interval T2FS (IT2FS) [14].
A = {((x, u), A (x, u))|x X, u Jx [0, 1]}
A =

xX uJx

A (x, u)
(x, u)

(1)
(2)

Fig. 2 Type-2 trapezoidal membership function

The upper membership function


Fig. 2 shows a trapezoidal type-2 fuzzy set A.
(UMF) and lower membership function (LMF) are completely bounded the shaded
region, called the footprint of uncertainty (FOU) [14] [13]. The UMF is associated
and is denoted by UMF(A)
or (x), where x
with the upper bound of FOU(A)
A
and is
X. The Lower MF (LMF) is associated with the lower bound of FOU(A)

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 set
whose membership degree is a crisp value in [0,1], a type-2 membership grade can
be described as any fuzzy subset in [0,1]. This fuzzy subset is called the primary
membership. And, for each primary membership, there is a secondary grade that
defines the possibility for the primary membership [20].
A = { A (x), A (x)} = {[a, b, c, d], [e, f , g, h]}

(3)

A Type-2 FML-Based Fuzzy Ontology for Dietary Assessment

Fig. 3 Structure of fuzzy diet ontology

155

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 descriptions
are as follows.
Fuzzy diet layer: In the fuzzy diet layer, the domain name is type-2 fuzzy diet
ontology. The categories are Underweight, Normal, Overweight, and Obesity.
Additionally, some fuzzy variables and fuzzy numbers represent the fuzzy concepts, including PCC (Percentage of Calories from Carbohydrate), FVPCC , PCP
(Percentage of Calories from Protein), FVPCP, PCF (Percentage of Calories
from Fat), FVPCF , CD (Caloric Difference), FVCD , FGB (Food Group Balance),
FVFGB , DHL (Dietary Healthy Level), and FVDHL . For instance, fuzzy concept
PCC has an attribute set {FNPCC , ValuePCC }. Fuzzy variable FVPCC is derived
from fuzzy concept PCC and has an attribute set {FNPCC Low , FNPCC Medium , and
FNPCC High }, which represents the knowledge of FVPCC .
Fuzzy group relation layer: In this layer, there are various relations such as
FGFGB1 and FGFGB . For instance, FGFGB1 describes a situation in which
6
a the number of six food groups that the meal contains is greater than 1 relationship exists between the fuzzy concept FGB in the fuzzy diet layer and its
specific instances in the fuzzy group diet layer.
Fuzzy group diet layer: In this layer, it is a specific fuzzy diet layer and contains
the concepts of the instances. Each group is composed of some instances with
similar value of the actual diet healthy level. The extended instance-of relation
FGFGB is used to describe that the FGB values of these three specific instances
3
FID1i , 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 the
number of six food groups that the meal contains equals about 3 relationship exists between the fuzzy concept FGB in the fuzzy group diet layer and its specific
instance 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 relation =FGFGB28 is used to describe that the FGB values of the both specific
instances 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 perform the type-2 FML-based dietary assessment. The system structure is first introduced. The food nutrition facts database and type-2 FML-based fuzzy inference
mechanism are described are follows.

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 Internet, convenient stores, and nutrition books. Second, the dieticians confirm and
define the nutrition facts, and then store them into the food nutrition facts database.
The information about each foods nutrition facts contains the amount of various
nutrients, calories, portion size, and servings of six food groups. Third, based on the
food nutrition facts database, the ontology engineering constructs the type-2 fuzzy
ontology, including food ontology and type-2 fuzzy dietary ontology, and type-2
FML (FML2). Additionally, the involved subjects brief personal profiles including height, weight, age, sex, and body mass index (BMI), are also built. Fourth, the
involved subjects are routinely requested to input eaten items each day through a
notebook, cell phone, personal digital assistant (PDA), or personal computer. Afterwards, the proposed type-2 fuzzy ontology-based dietary assessment operates as
follows:
1. The ingredients extraction mechanism retrieves the nutrition facts of each eaten
item from the food ontology.
2. The nutrients analysis mechanism diagnoses the percentage of calories from
carbohydrates, proteins, and fats for one meal.
3. The calorie computation mechanism calculates the caloric difference between
actual 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 the
eaten food is.

158

M.-H. Wang et al.

5. The type-2 fuzzy inference mechanism based on FML infers the dietary healthy
level of the eaten food based on the predefined ontology and outputs from steps
1 to 4.
6. Finally, the dietary healthy level is stored into the dietary assessment repository and validated by the dieticians to evaluate the performance of the proposed
approach.

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

12 cup(s)

Meats & Proteins

1 serving=1 egg

45 servings

Fats

1 serving=2 tablespoons of vegetable oil

23 spoons

3.2 Food Nutrition Facts


The information of the food nutrition facts, including serving size, calories, and
nutrient information, can vary with each food product. The nutrients in foods contain
vitamins B, calcium, carbohydrate, fat, fiber, sodium, protein, vitamin A, etc. The
bodys main source of energy comes from carbohydrate, protein, and fat. Therefore,
the percentage of calories from carbohydrate (PCC), percentage of calories from
protein (PCP), and percentage of calories from fat (PCF) are considered to be one
of the features of healthy dietary assessment. The suggested percentages of calories
from 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 and
PCP. 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 quantity and variety of foods from each of the main food groups every day. From this
viewpoint, how to balance the energy between intake and burn is very important.
The Harris-Benedict Equation [7] is used to calculate each persons daily calorie requirements based on each persons height, weight, age, sex, and activity level. Base
on predefined ontology, we can know the actual calories intake from the collected
meal records. The smaller the caloric difference (CD) between the planned daily
caloric intake and actual daily caloric intake, the healthier the eaten food is. The
feature of CD is especially important for those who are losing weight or need to
consider the weight management such as diabetes.

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 best
to cover six food groups for your one-day eaten food as possible as you can. The
six 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 variety
of foods so you can get the nutrients you need, and the suggested serving sizes can
help you control the amount of calories, fat, or sodium in your diet. Table 1 lists a
food 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 balanced
the eaten food is. As a result, the input of the proposed system also takes food group
balance (FGB) into consideration. For dieticians, FGB is the most important feature
to 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
PCC

PCP

PCF

CD

FGB

DHL

Linguistic Term

Low

Medium

High

T2FS as {[a, b, c, d], [e, f, g, h]}


{[0, 0, ,35 ,40], [0, 0, 35, 50]}
{[45, 50, 55, 60,] [35 50 55 65]}
{[65, 70, 100, 100], [60, 70, 100, 100]}

Low

Medium

High

Low

Medium

High

{[0, 0, 5, 10], [0, 0, 5, 15]}


{[10, 15, 20, 25], [5, 15, 20, 30]}
{[25, 30, 100, 100], [20, 30, 100, 100]}

Low

Medium

High

Low

Medium

High

{[0, 0, 60, 70], [0, 0, 60, 100]}


{[90, 100, 160, 170], [60, 100, 160, 200]}
{[190, 200, 300, 300], [160, 200, 300, 300]}

VeryLow

Low

Medium

High

VeryHigh

{[0, 0, 2, 2.5], [0, 0, 2, 3]}


{[2.5, 3, 4, 4.5], [2, 3, 4, 5]}
{[4.5, 5, 6, 6.5], [4, 5, 6, 7]}
{[6.5, 7, 8, 8.5], [6, 7, 8, 9]}
{[8.5, 9, 10, 10], [8, 9, 10, 10]}

{[0, 0, 10, 15], [0, 0, 10, 20]}


{[15, 20, 25, 30], [10, 20, 25, 35]}
{[35, 40, 100, 100], [30, 40, 100, 100]}

{[0, 0, 2, 2.5], [0, 0, 2, 3]}


{[2.5, 3, 4, 4.5], [2, 3, 4, 5]}
{[4.5, 5, 6, 6], [4, 5, 6, 6]}

3.3 Type-2 Fuzzy Inference Mechanism


In the type-2 fuzzy inference mechanism based on FML, five attributes, namely
PCC, PCF, PCP, CD, and FGB, are chosen as the input fuzzy variables of the

160

M.-H. Wang et al.

adopted fuzzy rule-based inference and the related information about fuzzy numbers 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 the
dieticians, the parameters of the fuzzy numbers are presented in Table 2. It shows

Medium
that PCC, PCP, and PCF have three linguistic terms, namely Low,
and
If the values of the PCC, PCP, and PCF approach to Medium,

High.
it means that
the percentages of eaten-meal calories from carbohydrate, protein, and fat are much
more 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

Medium

For fuzzy variable CD, there are three linguistic terms, including Small,

and Large, to express concepts and knowledge of CD. The FGB fuzzy variable de
to represent the level
Medium
fines three linguistic terms, namely Low,
and High,
that the eaten food covers six food groups. The output fuzzy variable is DHL with

and VeryHigh.

Medium,
five linguistic terms, namely VeryLow,
Low,
High
If the
DHL value is large, the membership degree for the dietary healthy level is high. Additionally, the Karnik-Mendel (KM) algorithm [13] is used to compute the centroids
of type-2 fuzzy sets. Figs. 5(a)-5(f) show the type-2 fuzzy sets of the fuzzy variables

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 fuzzy
rules, which are constructed by the domain experts, where the highest priority is
FGB, then PCF, PCC, PCP, and CD. Fig. 6 shows the structure of the type-2 fuzzy
inference mechanism based on FML. Listings 1 and 2 respectively show partial of
knowledge 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
No
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
...
234
235
236
237
238
239
240
241
242
243

PCC

Low

Low

Low

Low

Low

Low

Low

Low

Low

Low

Low

Low

Low

Low

Low

Input Fuzzy Variable


PCP
PCF
CD

Low
Low
Small

Low
Low
Small

Low
Low
Small

Low
Low
Medium

Low
Low
Medium

Medium
Low
Low

Low
Low
Large

Low
Low
Large

Low
Low
Large

Low
Medium
Small

Low
Medium
Small

Low
Medium
Small

Low
Medium
Medium

Low
Medium
Medium

Medium
Medium
Low

High

High

High

High

High

High

High

High

High

High

High

High

High

High

High

High

High

High

High

High

...

Medium

High

High

High

High

High

High

High

High

High

Large

Small

Small

Small

Medium

Medium

Medium

Large

Large

Large

FGB

Low

Medium

High

Low

Medium

High

Low

Medium

High

Low

Medium

High

Low

Medium

High

Output Fuzzy Variable


DHL

VeryLow

Low

Medium

VeryLow

VeryLow

Low

VeryLow

VeryLow

Low

Low

Medium

High

VeryLow

Low

Medium

High

Low

Medium

High

Low

Medium

High

Low

Medium

High

...

Medium

VeryLow

Low

Medium

VeryLow

VeryLow

Medium

VeryLow

VeryLow

Low

4 Experiments and Results


We have conducted several experiments which focus on people who are aged from
20 to 30 years old and with the average levels of physical activity. Seven students of

162

M.-H. Wang et al.

Ontology Application & software Engineering (OASE) Lab. of National University


of Tainan (NUTN) in Taiwan were involved in this experiment. They recorded their
three meals from Monday to Friday for twenty days. Therefore, 60 records were
collected for each subject. In this chapter, we take subjects 1 and 2 as examples to
describe the experiments. Table 4 shows the nutrition facts for the collected food per
portion. Table 5 shows part of the collected foods servings of six food groups per
portion. Table 6 lists the ten collected meal records for subjects 1 and 2 and each
subject 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 y p e 2 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 i p = l o c a l h o s t
name=PCC s c a l e = p e r c e n t a g e t y p e =INPUT>
<Type2FuzzyTerm name=Low>
<T y p e 2 T ra p e z o i d S h a p e >
<UMF param1= 0 param2=0 param3= 35 param4 = 50 />
<LMF param1= 0 param2=0 param3= 35 param4 = 40 />
</ T y p e 2 T ra p e z o i d S h a p e >
</Type2FuzzyTerm >
<Type2FuzzyTerm name=Medium>
<T y p e 2 T ra p e z o i d S h a p e >
<UMF param1= 35 param2= 50 param3= 55 param4 = 65 />
<LMF param1= 45 param2= 50 param3= 55 param4 = 60 />
</ T y p e 2 T ra p e z o i d S h a p e >
</Type2FuzzyTerm >
<Type2FuzzyTerm name= High >
<T y p e 2 T ra p e z o i d S h a p e >
<UMF param1= 60 param2= 70 param3= 100 param4 = 100 />
<LMF param1= 65 param2= 70 param3= 100 param4 = 100 />
</ T y p e 2 T ra p e z o i d S h a p e >
</Type2FuzzyTerm >
</ T y p e 2 F u z z y V a r i a b l e>
<T y p e 2 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 i p = l o c a l h o s t
name=PCP s c a l e = p e r c e n t a g e t y p e =INPUT>
<Type2FuzzyTerm name=Low>
<T y p e 2 T ra p e z o i d S h a p e >
<UMF param1= 0 param2=0 param3= 5 param4 = 15 />
<LMF param1= 0 param2=0 param3= 5 param4 = 10 />
</ T y p e 2 T ra p e z o i d S h a p e >
</Type2FuzzyTerm >
<Type2FuzzyTerm name=Medium>
<T y p e 2 T ra p e z o i d S h a p e >
<UMF param1= 5 param2= 15 param3= 20 param4 = 30 />
<LMF param1= 10 param2= 15 param3= 20 param4 = 25 />
</ T y p e 2 T ra p e z o i d S h a p e >
</Type2FuzzyTerm >
<Type2FuzzyTerm name= High >
<T y p e 2 T ra p e z o i d S h a p e >
<UMF param1= 20 param2= 30 param3= 100 param4 = 100 />
<LMF param1= 25 param2= 30 param3= 100 param4 = 100 />
</ T y p e 2 T ra p e z o i d S h a p e >
</Type2FuzzyTerm >
</ T y p e 2 F u z z y V a r i a b l e>
...
</ KnowledgeBase>
</ F u z z y C o n t r o l l e r >

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 >
....
<R u l e B a s e a c t i v a t i o n M e t h o d =MIN andMethod =MIN o r Me t h o d=MAX
t y p e =mamdani i p = l o c a l h o s t >
<R u l e 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>
<A n t e c e d e n t>
<C l a u s e>
<V a r i a b l e >PCC</ V a r i a b l e > <Term>Low</Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >PCP</ V a r i a b l e > <Term>Low</Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >PCF</ V a r i a b l e > <Term>Low</Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >CD</ V a r i a b l e > <Term>Sma l l </Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >FGB</ V a r i a b l e > <Term>Low</Term>
</ C l a u s e>
</ A n t e c e d e n t>
<C o n s e q u e n t>
<C l a u s e>
<V a r i a b l e >DHL</ V a r i a b l e > <Term>VeryLow </Term>
</ C l a u s e>
</ C o n s e q u e n t>
</ Rule>
<R u l e 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 >
<A n t e c e d e n t>
<C l a u s e>
<V a r i a b l e >PCC</ V a r i a b l e > <Term>High </Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >PCP</ V a r i a b l e > <Term>High </Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >PCF</ V a r i a b l e > <Term>High </Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >CD</ V a r i a b l e > <Term>L a rg e </Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >FGB</ V a r i a b l e > <Term>High </Term>
</ C l a u s e>
</ A n t e c e d e n t>
<C o n s e q u e n t>
<C l a u s e>
<V a r i a b l e >DHL</ V a r i a b l e > <Term>VeryLow </Term>
</ C l a u s e>
</ C o n s e q u e n t>
</ Rule>
</ R u l e B a s e>
</ 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 also
lists the evaluated results from three dieticians and their mean value. It is observed
that meals 1 and 8 have much larger difference between the proposed method and
the dieticians. However, the caloric difference is also the first two high for meals 1
and 8. According to the membership functions for fuzzy variable CD, we know if

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 proposed
method. Nevertheless, from the viewpoint of the dieticians, it will not affect the
dietary healthy level if one common person eats a few calories for one meal unless
the 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)

Sushi

289

47.5

13.5

5.0

Beef Noodles

531

75.0

24.0

15.0

Hot Pot with Seafood

596.5

65.0

33.5

22.5

Spaghetti with Pork Sauce

689

90.0

26.0

25.0

Wonton Soup

186

15.0

9.0

10.0

Pan-fried Pork Pie

301.5

22.5

13.5

17.5

Laver Soup with Egg

59

0.0

3.5

5.0

Lemon Juice with Kumquat

240

60.0

0.0

0.0

Dumpling

431.5

45.0

23.5

17.5

10

Creamed Corn Soup

161.6

22.5

4.4

6.0

11

Porridge with Lean Meat


and Preserved Egg

440.5

60.0

22.0

12.5

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

A Type-2 FML-Based Fuzzy Ontology for Dietary Assessment

165

Table 5 Servings of Six food groups per portion


Six Food Groups
No

Item

Grains &
Starches

Vegetables

Fruits

Milk

Meats &
Proteins

Fats

Sushi

3.0

0.5

0.0

0.0

1.0

0.0

Beef Noodles

5.0

0.0

0.0

0.0

2.0

1.0

Hot Pot with Seafood

4.0

1.0

0.0

0.0

3.5

1.0

Spaghetti with Pork Sauce

6.0

0.0

0.0

0.0

2.0

3.0

Wonton Soup

1.0

0.0

0.0

0.0

1.0

1.0

Pan-fried Pork Pie

1.5

0.0

0.0

0.0

1.5

2.0

Laver Soup

0.0

0.0

0.0

0.0

0.5

0.5

Lemon Juice with Kumquat

4.0

0.0

1.0

0.0

0.0

0.0

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

11

Porridge with Lean Meat


and Preserved Egg

4.0

0.0

0.0

0.0

2.0

0.5

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


Meal
No

Content (Portions)

Sushi (1.5)

Beef Noodles (1)

Hot Pot with Seafood (1)

Spaghetti with Pork Sauce (1) and Wonton Soup (1)

Pan-fried Pork Pie (3), Laver Soup with Egg (1), and Lemon Juice with Kumquat (1)

Dumpling (1) and Creamed Corn Soup (1)

Porridge with Lean Meat and Preserved Egg (1)

Spring Pancake (1)

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 the
variances of the mean square error (MSE), calculated by Eq. 4, between our method
and 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-dietician
mean evaluated results is 2.11, which indicates that the MSE has been reduced.

166

M.-H. Wang et al.

Consequently, it is likely to give different evaluated results for the domain experts
even the evaluated data are identical, which shows that the diet is very complicated
and suitable to use T2FS to solve the problem.
MSE =

1 n 2
ei
n i=1

(4)

where n is the total number of meals, and e is the outcome difference between the
proposed method and dieticians.
Table 7 Inputs and Outputs of proposed method and dieticians

Meal No

1
2
3
4
5
6
7
8
9
10

Inputs
PCF
CD

PCC

PCP

kcal

65.7
56.5
43.6
48.0
42.4
45.5
54.5
36.5
45.3
55.9

18.7
18.1
22.5
16.0
14.6
18.8
20.0
19.1
8.7
13.0

15.6
25.4
33.9
36.0
43.0
35.7
25.5
44.4
46.0
31.1

467.1
369.6
304.1
25.6
302.9
33.0
185.6
423.3
87.8
125.5

FGB

2.8
3.0
4.0
3.0
3.0
3.0
2.5
3.7
2.7
3.0

Outputs
DHL
Our
Dietician
Method 1 2 3 Mean
3.42
7.48
4.46
4.05
2.39
4.51
6.53
2.31
3.44
4.46

6
6
8
5
4
6
6
4
4
4

5
5
7
4
2
5
5
4
4
4

6
5
5
3
3
5
5
4
5
4

5
5
6
4
3
5
5
4
4
4

5 Conclusions
In this chapter, the property of the fuzzy ontology and a type-2 FML-based dietary
assessment system are proposed. Based on the viewpoint from dieticians, the percentage of calories from carbohydrate, the percentage of calories from protein, the
percentage of calories from fat, and six food groups balance are considered as one
of the features to evaluate if the eaten food is healthy or not. From the experimental results, it shows that the proposed approach is feasible for dietary assessment.
Additionally, owning to the change of the lifestyle, more and more processed food
is generated to meet modern-people requirements. However, the natural food (fresh
fruit juice) is much healthier than processed food (packaged fruit juice) even with
the same provided calories and nutrients. This is because the valuable nutrients contained in the raw food will be definitely partially washed away after the food is processed. Consequently, the food-processed level and the genetic learning machine
will be considered to improve the experimental results in the future.

A Type-2 FML-Based Fuzzy Ontology for Dietary Assessment

167

Acknowledgements. This work is supported by the National Science Council of Taiwan under the grant NSC99-2911-I-024-004 and NSC98-2221-E-024-009-MY3. The authors would
like to thank National University of Tainan in Taiwan and University of Essex in UK for their
supporting this research project.

References
1. Acampora, G., Gaeta, M., Loia, V., Vasilakos, A.V.: Interoperable and adaptive fuzzy
services for ambient intelligence applications. ACM Transactions on Autonomous and
Adaptive Systems 5(2), 126 (2010)
2. Acampora, G., Loia, V.: Using FML and fuzzy technology in adaptive ambient intelligence environments. International Journal of Computational Intelligence Research 1(2),
171182 (2005)
3. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive domotic framework. IEEE Transactions on Industrial Informatics 1(2), 97111 (2005)
4. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelligence. Information Sciences 178(3), 631646 (2008)
5. Brewster, C., OHara, K., Fuller, S., Wilks, Y., Franconi, E., Musen, M.A., Ellman, J.,
Shum, S.B.: Knowledge representation with ontologies: the present and future. IEEE
Intelligent Systems 19(1), 7281 (2004)
6. Chau, K.W.: An ontology-based knowledge management system for flow and water quality modeling. Engineering Software 38(3), 172181 (2006)
7. Frankenfield, D.C., Muth, E.R., Rowe, W.A.: The harris-benedict studies of human basal
metabolism: history and limitations. Journal of the American Dietetic Association 98(4),
439445 (1998)
8. Garca-Snchez, F., Martnez-Bjar, R., Contreras, L., Fernndez-Breis, J.T., CastellanosNieves, D.: An ontology-based intelligent system for recruitment. Expert Systems with
Applications 31(2), 248263 (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 semantics into human shapes. Visual Computing: International Journal of Computer Graphics 23(3), 207218 (2007)
10. Lee, C.S., Jian, Z.W., Huang, L.K.: A fuzzy ontology and its application to news summarization. IEEE Transactions on Systems, Man, and Cybernetics, Part B: Cybernetics 35(5), 859880 (2005)
11. Lee, C.S., Kao, Y.F., Kuo, Y.H., Wang, M.H.: Automated ontology construction for unstructured text documents. Data & Knowledge Engineering 60(3), 547566 (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 on
type-2 fuzzy ontology and fuzzy markup language. International Journal of Intelligent
System 25(12), 11871216 (2010)
14. Lee, C.S., Wang, M.H., Acampora, G., Loia, V., Hsu, C.Y.: Ontology-based intelligent
fuzzy agent for diabetes application. In: Proc. of the 2009 IEEE Symposium on Computational Intelligence for Intelligent Agent (IEEE SSCI 2009), Nashville, USA, March
30-April 2 (2009)

168

M.-H. Wang et al.

15. Lee, C.S., Wang, M.H., Hagras, H.: A type-2 ontology and its application to personal diabetic diet recommendation. IEEE Transactions on Fuzzy Systems 18(2), 374395 (2010)
16. Lee, C.S., Wang, M.H., Hsu, C.Y., Hagras, H.: A novel fuzzy ontology and its application
to diet assessment. In: Proc. of the 2009 IEEE/WIC/ACM International Conferences on
Web 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 diabetic
food recommendation. In: Proc. of the 2008 IEEE World Congress on Computational
Intelligence (WCCI 2008), Hong Kong, Junuary 1-6 (2008)
18. Mendel, J.M.: Type-2 fuzzy sets and systems: an overview. IEEE Computational Intelligence Magazine 2(l), 2029 (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), 808821 (2006)
20. Miller, S., John, R.: An interval type-2 fuzzy multiple echelon supply chain model.
Knowledge-Based Systems 23(4), 363368 (2010)
21. Probst, Y.C., Farajil, S., Batterham, M., Steel, D.G., Tapsell, L.C.: Computerized dietary
assessments compare well with interviewer administered diet histories for patients with
type 2 diabetes mellitus in the primary healthcare setting. Patient Education and Counseling 72(1), 4955 (2008)
22. Probst, Y.C., Tapsell, L.C.: Overview of computerized dietary assessment programs for
research and practice in nutrition education. Nutrition. Journal of Nutrition Education
and Behavior 37(1), 2026 (2005)
23. Probst, Y.C., Tapsell, L., Batterham, M.: Relationships between patient age and BMI
and use of a self-administered computerised dietary assessment in a primary healthcare
setting. Journal of Food Composition and Analysis 21(1), 5659 (2008)
24. Yimin, L., Jing, H.: Type-2 fuzzy mathematical modeling and analysis of the dynamical behaviors of complex ecosystems. Simulation Modelling Practice and Theory 16(9),
13791391 (2008)
25. Wang, M.H., Lee, C.S., Hsieh, K.L., Hsu, C.Y., Chang, C.C.: Intelligent ontological
multi-agent for healthy diet planning. In: Proc. of the 2009 IEEE International Conference 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 reasoning. Information Sciences 8(3), 199249 (1975)
27. Zarandi, M.H.F., Rezaee, B., Turksen, I.B., Neshat, E.: A type-2 fuzzy rule-based expert
system model for stock price analysis. Expert Systems with Applications 36(1), 139154
(2009)

A Type-2 FML-Based Meeting Scheduling


Support System
Chang-Shing Lee, Mei-Hui Wang, Ming-Kai Su, Min-Hsiang Wu, and Hani Hagras

Abstract. Scheduling meetings in organizations involves many considerations such


as scheduling conflicts and even personal preferences. The host of an organizational
meeting typically expends substantial time conferring with potential attendees to
determine the optimal time slot. To minimize the time and effort required for this
scheduling process, this chapter introduces a novel type-2 FML-based personal ontology, a type-2 meeting scheduling ontology, and a decision supported system. The
Fuzzy markup language (FML) is also used to describe the knowledge base and rule
base of the proposed meeting scheduling system, and a fuzzy inference mechanism
is then used to infer the probability of attendance for each potential attendee. Finally,
the system generates a semantic description that indicates the estimated probability
of attendance for each potential attendee. The experimental results show that the
proposed approach is feasible for meeting scheduling.

1 Introduction
Many organizations require frequent meetings to establish internal standards, procedures, and other regulations. Meetings are also important for providing organizationrelated activities, descriptions, and so on. However, before successfully hosting a
meeting, the host must consider the preferences, scheduling conflicts, and other constraints of potential attendees by calling them, emailing them, or even by speaking
Chang-Shing Lee Mei-Hui Wang Ming-Kai Su Min-Hsiang Wu
Dept. of Computer Science and Information Engineering,
National University of Tainan, Taiwan
e-mail: leecs@mail.nutn.edu.tw,
{mh.alice.wang,devil74825,izumo19831006}@gmail.com
Hani Hagras
The Computational Intelligence Centre, School of Computer Science and
Electronic Engineering, University of Essex, UK
e-mail: hani@essex.ac.uk
G. Acampora et al. (Eds.): On the Power of Fuzzy Markup Language, STUDFUZZ 296, pp. 169186.
c Springer-Verlag Berlin Heidelberg 2013
DOI: 10.1007/978-3-642-35488-5_10


170

C.-S. Lee et al.

to them directly. Unfortunately, this task can be quite tedious and time-consuming
and may require several rounds of negotiations among several people regarding the
meeting date, time, and place before a meeting is finally scheduled [7]. These personal issues can be considered personal hidden knowledge. From the management
viewpoint, how to present and then reuse the acquired personal hidden knowledge
is very significant for the knowledge management. Nevertheless, ontology is a good
way to present and reuse the hidden personal knowledge.
An ontology defines the application domain items that provide a shared and common understanding of some domain, an ontology is also a set of terms, including their
concepts, properties, and relations [24], and an ontology is an essential element in
many applications, including agent systems, knowledge management systems, and
e-commerce platforms. For example, Buitelaar et al. [6] presented an ontology-based
information system for extracting and integrating heterogeneous data resources such
as plain texts, tables, and image captions. Sourouni et al. [19] proposed an ontologybased government knowledge repository to support the change, transformation, and
evolution of e-Government. Zhang et al. [23] adopted ontology technologies to enhance terminology extraction from documents. The ontology developed by Sanchez
et al. [18] to represent recruitment domain knowledge has been used to guide application designs and to provide systems with semantic capabilities. Orgun and Vu [16]
proposed an ontology based on health level seven reference information model (HL7RIM) to manage patient information in a healthcare organization. Lee et al. [9] developed a fuzzy ontology for summarizing news.
Integrating agent technology with ontology is also an important research issue. A
system with both ontology and agent technologies becomes much smarter than the
one without ontology so that it can make some decisions regarding organizational
activities. The extensive literature on agent technology includes Sabar et al. [17],
who developed a multi-agent approach for solving personal scheduling problems
in assembly centers by minimizing operational costs and personal dissatisfactions.
Many studies applied ontology and agent in researches are also increasingly growing in the world, for example, Lee et al. proposed a fuzzy decision agent [10] and a
genetic fuzzy agent for meeting scheduling systems [8]. Type-2 fuzzy sets (T2FSs)
provide additional design freedom in traditional fuzzy logic systems (FLSs) and can
be very useful in systems are with many uncertainties [14]. Zarandi et al. [22] developed a type-2 fuzzy rule-based expert system for stock price analysis, Miller and
John [15] introduced an interval type-2 fuzzy logic model for a multiple echelon
supply chain, Yimin and Jing [20] used a type-2 fuzzy mathematical model to analyze the dynamical behavior of complex ecosystems, and Lee et al. [12] proposed a
type-2 fuzzy ontology and its application to personal diabetic-diet recommendation.
Meeting scheduling involves numerous considerations, including personal constraints, preferences, and even personal constraint. The process of optimizing a
meeting schedule for most invitees often requires substantial time and effort. Chun
et al. [7] therefore developed novel preference estimation techniques for optimizing
meeting scheduling in agent-based environments. Benhassine and Ho [5] developed
a scalable agent-based approach for solving dynamic meeting scheduling problems

A Type-2 FML-Based Meeting Scheduling Support System

171

with preferences. Wainer et al. [21] presented four meeting scheduling protocols for
multi-agent negotiations.
This chapter proposes a meeting scheduling system that combines type-2 fuzzy
sets and an ontology model to create a type-2 fuzzy ontology. The experimental
results confirm the feasibility of the proposed method, and the inferred results provide 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, and
the type-2 FML-based meeting scheduling ontology. Sect. 3 introduces the FMLbased 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 scheduling
system.

2.1 Type-2 Fuzzy Set


Because the words mean different things to different people, hence the type-2 fuzzy
logic systems (T2FLS) have the potential to provide better performance than a type1 FLS (T1FLS) when such linguistic uncertainties are presented [14]. A T2FS,
is characterized by a type-2 membership function (MF) (x, u), and
denoted A,
A
denoted by Eq. 1, where x X and u Jx [0, 1], 0 A (x, u) 1. A can also
expressed by Eq. 2 for discrete universes of discourse. When all A (x, u) = 1, then
A is an interval T2FS (IT2FS) [14].
A = {((x, u), A (x, u))|x X, u Jx [0, 1]}
A =

xX uJx

A (x, u)
(x, u)

(1)
(2)

The upper membership function


Fig. 1 shows a trapezoidal type-2 fuzzy set A.
(UMF) and lower membership function (LMF) are completely bounded the shaded
region, called the footprint of uncertainty (FOU) [14] [13]. The UMF is associ and is denoted by UMF(A)
or (x), where
ated with the upper bound of FOU(A)
A
and
x X. The Lower MF (LMF) is associated with the lower bound of FOU(A)

is 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 set
whose membership degree is a crisp value in [0,1], a type-2 membership grade can
be described as any fuzzy subset in [0,1]. This fuzzy subset is called the primary

172

C.-S. Lee et al.

Fig. 1 Type-2 trapezoidal membership function

membership. And, for each primary membership, there is a secondary grade that
defines 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 meeting
scheduling system presented in Fig. 2. The system supports the meeting host in
selecting suitable meeting times for invitees. The meeting scheduling problem
involves substantial uncertainty because many personal elements must be considered. The following example of a meeting schedule generated for university
laboratory members demonstrates the proposed system. Each laboratory member
assumedly performs many activities simultaneously, including research, coursework, and leisure activities. Unfortunately, however, scheduling conflicts may occur. Therefore, invitees may decide whether or not to participate in activities based
on their personal preferences and personal calendars. Based on the above concept,
Fig. 2 shows the type-2 FML-based personal ontology constructed by the domain
expert. The four-layer ontology includes a domain layer, category layer, concept
layer, and instance layer. The domain name is Type-2 Fuzzy Personal Ontology.
Some categories, namely, Research, Course, and Leisure, are included in the category layer. The concept layer includes various concepts such as Time, Place, Activity, Conflicting Activity, and Meeting Role. Each concept has numerous attributes.
For example, the concept Meeting Role has attributes attendee priority (AP), meeting subject preference (MSP), conflicting activity priority (CAP), meeting forcing
degree (MFD), and meeting time length (MTL). Various instances such as Meeting
Type and Restaurant are located in the instance layer. Assume that the ontology in
Fig. 2 is the personal ontology for meeting scheduling for a student, Vincent, who

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 these
two activities conflicts, so he must choose which to attend. In a word, scheduling a
meeting 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 domain
layer, 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 four
meeting types in the category layer are Regular Meeting, Department Meeting,
Research Meeting, and Administrative Meeting. Various sub-categories are stored
in the sub-category layer of the type-2 FML-based personal ontology for each attendee. For example, invitees 3, 4, and 5 are expected to attend a Department Meeting. Invitees 4, 5, and 6 are expected to attend a Research Meeting. Hence, invitees
4 and 5 may be professors because they must attend both department and research
meetings. For example, a professor tells his secretary, I would like to hold a twohour meeting to discuss research approaches with Vincent, Jay, Eddie, . . . , sometime
next week in room B215. Next Saturday afternoon is preferable.

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 as


the 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 enforcement
of 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 attend the meeting if and when they are available. Thus, numerous fuzzy variables
such as Meeting Subject Preference (MSP) and Meeting Time Length (MTL), which
are 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 Possibility (MAP) for each potential attendee based on the AP, MSP, CAP, MFD, and
MTL 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.

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 type2 FML-based meeting scheduling system are introduced in the four sub-sections
below.

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 decision
supported system, a type-2 FML-based meeting scheduling ontology, and various
type-2 FML-based personal ontologies. The type-2 FML-based meeting scheduling ontology and the type-2 FML-based personal ontologies are pre-defined by the
domain 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 their
own type-2 FML-based personal ontology.
4. The scheduling mechanism organizes all retrieved meeting-related information
to construct the type-2 FML-based meeting scheduling ontology for all potential attendees. Meanwhile, the domain experts also help to confirm the constructed type-2 FML-based meeting scheduling ontology.
5. The meeting scheduling mechanism retrieves the generated type-2 FML-based
meeting 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 of
the host. Otherwise, the agent negotiates with each personal agent.

176

C.-S. Lee et al.

7. If the negotiation is successful, the meeting negotiation mechanism sends the


results back to the personal agent of the host.
8. If the negotiation fails, the meeting negotiation mechanism passes the meetingrelated information to the fuzzy inference mechanism to infer the meeting attendance possibility for each invitee.
9. The sentence extraction mechanism transforms the inferred results into a semantic sentence and sends the results to the host.
10. The host announces the final meeting-related information such as the confirmed
invitees, the pre-defined meeting time, and the pre-defined meeting place to the
final attendees.

3.2 Knowledge Base for Type-2 FML-Based Meeting Scheduling


System
The Fuzzy Markup Language (FML) can manage fuzzy concepts, fuzzy rules, and
a fuzzy inference engine [1] [2] [3] [4]. The FML is implemented using eXtensible Markup Language (XML) and is used to exploit typical XML tools as the
XML Schema and the extensible style-sheet language transformations (XSLT). The
knowledge base describes fuzzy concepts, including fuzzy variables, fuzzy terms,
and membership functions of fuzzy sets, whereas the rule base describes the fuzzy
rule set, including the antecedent and consequent rules. Fig. 5 shows the structure of
the 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

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 y p e 2 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 = 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>
<T y p e 2 T ra p e z o i d S h a p e >
<UMF param1= 0 param2=0 param3= 0 param4 = 4 />
<LMF param1= 0 param2=0 param3= 0 param4 = 3 />
</ T y p e 2 T ra p e z o i d S h a p e >
</Type2FuzzyTerm >
<Type2FuzzyTerm name=Medium>
<T y p e 2 T ra p e z o i d S h a p e >
<UMF param1= 2 param2=4 param3= 6 param4 = 8 />
<LMF param1= 3 param2=4 param3= 6 param4 = 7 />
<T y p e 2 T ra p e z o i d S h a p e >
</Type2FuzzyTerm>
<Type2FuzzyTerm name= High >
<T y p e 2 T ra p e z o i d S h a p e >
<UMF param1= 6 param2= 10 param3= 10 param4 = 10 />
<LMF param1= 8 param2= 10 param3= 10 param4 = 10 />
<T y p e 2 T ra p e z o i d S h a p e >
</Type2FuzzyTerm>
</ T y p e 2 F u z z y V a r i a b l e>
...
</ KnowledgeBase>
<R u l e B a s e 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 >
<R u l e 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>
<A n t e c e d e n t>
<C l a u s e>
<V a r i a b l e >AP</ V a r i a b l e >
<Term>Low</Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >MSP</ V a r i a b l e >
<Term>Low</Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >CAP</ V a r i a b l e >
<Term>Low</Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >MFD</VARIABLE>
<Term>Low</Term>
</ C l a u s e>
<C l a u s e>
<V a r i a b l e >MTL</ V a r i a b l e >
<Term>S h o r t </Term>
</ C l a u s e>
</ A n t e c e d e n t>
<C o n s e q u e n t>
<C l a u s e>
<V a r i a b l e >MAP</ V a r i a b l e >
<Term>Low</Term>
</ C l a u s e>
</ C o n s e q u e n t>
</ Rule>
.......
</ R u l e B a s e>
</ F u z z y C o n t r o l l e r >

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

A Type-2 FML-Based Meeting Scheduling Support System

179

the type-2 FML-based meeting scheduling system, which stores related information
from the knowledge base and rule base of the proposed type-2 FML-based meeting
scheduling system. Each fuzzy variable is described in detail below.
Attendee Priority (AP) represents the overall importance of the attendee to the
meeting. The higher the AP, the more important the attendee.
Meeting Subject Preference (MSP) indicates the meeting subject that the attendee
prefers. The higher the MSP, the more the attendee prefers the meeting subjects.
Conflicting Activity Priority (CAP) indicates the importance of conflicting activities from the perspective of the attendee. The higher the CAP is, the higher the
priority of the conflicting activity is.
Meeting Forcing Degree (MFD) represents the enforcement of meeting attendance. When MFD tends towards low, it means that it doesnt matter whether
this person can attend the meeting or not. On the contrary, when MFD tends
towards high, it means that the degree of being forced to attend the meeting is
gradually becoming high.
Meeting Time Length (MTL) denotes the duration of the meeting. The larger the
MTL is, the longer the meeting is.
Meeting Attendance Possibility (MAP) is the possibility of attending the meeting
for 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
Medium
High

{[0, 0, 0, 3], [0, 0, 0, 4]}


{[3, 4, 6, 7], [2, 4, 6, 8]}
{[8, 10, 10, 10], [6, 10, 10, 10]}

MSP

Low
Medium
High

{[0, 0, 0, 3], [0, 0, 0, 4]}


{[4, 4, 5, 6], [3, 4, 5, 7]}
{[6, 10, 10, 10], [5, 10, 10, 10]}

CAP

Low
Medium
High

{[0, 0, 0, 4], [0, 0, 0, 5]}


{ [3, 4, 7, 7], [2, 4, 7, 8] }
{[7, 10, 10, 10], [6, 10, 10, 10] }

MFD

Low
Medium
High

{[0, 0, 2, 3], [0, 0, 2, 4]}


{[4, 5, 5, 6], [3, 5, 5, 7]}
{[7, 9, 10, 10], [6, 9, 10, 10]}

MTL

Short
Long

{[0, 0, 0, 2], [0, 0, 0, 3.5]}


{[2.5, 5, 5, 5], [2, 5, 5, 5]}

MAP

Low
Medium
High

{[0, 0, 0, 0.3], [0, 0, 0, 0.4]}


{[0.4, 0.4, 0.6, 0.6], [0.3, 0.4, 0.6, 0.7]}
{[0.7, 1, 1, 1], [0.6, 1, 1, 1]}

180

C.-S. Lee et al.

Table 2 Part of the fuzzy rules


Rule
No
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
...
151
152
153
154
155
156
157
158
159
160
161
162

AP

Input Fuzzy Variable


MSP
CAP
MFD

MTL

Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low

Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low
Low

Low
Low
Medium
Medium
High
High
Low
Low
Medium
Medium
High
High
Low
Low
Medium

Short
Long
Short
Long
Short
Long
Short
Long
Short
Long
Short
Long
Short
Long
Short

High
High
High
High
High
High
High
High
High
High
High
High

High
High
High
High
High
High
High
High
High
High
High
High

High
High
Low
Low
Medium
Medium
High
High
Low
Low
Medium
Medium

Short
Long
Short
Long
Short
Long
Short
Long
Short
Long
Short
Long

Low
Low
Low
Low
Low
Low
Medium
Medium
Medium
Medium
Medium
Medium
High
High
High
...
Low
Low
Medium
Medium
Medium
Medium
Medium
Medium
High
High
High
High

Output Fuzzy Variable


MAP
Low
Low
Medium
Low
High
High
Low
Low
Medium
Low
High
High
Low
Low
Medium
...
High
High
High
Medium
High
High
High
High
Low
Low
High
High

3.3 Fuzzy Inference Mechanism


Fig. 6 shows the structure of the fuzzy inference mechanism based on type-2 fuzzy
sets and fuzzy logic [13], which includes five components: type-2 FML-based ontology, fuzzifier, inference, type-reducer, and defuzzifier. The proposed type-2 FMLbased ontology stores the established knowledge base and rule base that are provided
by domain experts. Karnik-Mendel (KM) algorithms [13] are used to compute the
centroids of the type-2 fuzzy set.

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 2
fuzzy 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 fuzzy
rules, which are constructed by the domain experts. The MFD is considered the most
important feature when domain experts design the fuzzy rules, and the following is
AP, CAP, MTL, and MSP.

3.4 Sentence Extraction Mechanism


Sentence extraction mechanism is responsible for represent the extracted sentences
based on the possibility of each persons attending meeting. Table 3 shows the
adopted sentence patterns, including semantic description sentence and semantic
decision sentence. Tables 4 and 5 shows the extracted semantic sentences for attendance 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, and
the type-2 FML-based personal ontology from the ontology application & software
engineering (OASE) laboratory of the National University of Tainan, Taiwan. The
proposed approach is evaluated in terms of accuracy and precision. Table 6 shows
four possible outcomes of a single prediction [11]. In this experiment, each OASE
member first gives the meeting attendance possibility as the desired output, and
then 0.6 is selected as the threshold value determining whether this attendee will
participate in the meeting or not. Note that the threshold value denoted the membership degree threshold for MAP. If the desired output equals or exceeds 0.6, then the
proposed approach infers that the candidate can attend the meeting. However, if the

182

C.-S. Lee et al.

Table 4 Results of attendances Nos. 2, 4 and 17


Semantic Description for Attendee No. 2
AP
3

MSP
5

CAP
3

MFD
4

MTL
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
7

MSP
1

CAP
6

MFD
9

MTL
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
0

MSP
3

CAP
3

MFD
0

MTL
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 cannot
attend. 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.

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
4

MSP
8

CAP
2

MFD
9

MTL
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
10

MSP
1

CAP
9

MFD
1

MTL
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
8

MSP
6

CAP
7

MFD
2

MTL
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 all
adopted experimental data. This figure reveals that accuracy and precision exceed
90% when the threshold ranges between 0.55 and 0.85.

184

C.-S. Lee et al.

Accuracy =

(T N + T P)
100%
(T P + T N + FP + FN)

(4)

TP
100%
(T P + FP)

(5)

Precision =
Recall =

TP
100%
(T P + FN)

(6)

Table 6 Classification of results


Prediction results

Actual 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 scheduling
process of an organizational meeting. Experimental results indicate that the proposed approach is feasible and practical for meeting scheduling. In the future, we
will add additional experimental data to further evaluate the performance of the
proposed approach and investigate the application of a genetic algorithm for automatically learning membership functions.
Acknowledgements. This work is supported by the National Science Council of Taiwan
under the grant NSC99-2911-I-024-004, NSC98-2221-E-024-009-MY3, and NSC99-2631S-011-002. The authors would like to thank National University of Tainan in Taiwan and
University of Essex in UK for their supporting this research project.

A Type-2 FML-Based Meeting Scheduling Support System

185

References
1. Acampora, G., Gaeta, M., Loia, V., Vasilakos, A.V.: Interoperable and adaptive fuzzy
services for ambient intelligence applications. ACM Transactions on Autonomous and
Adaptive Systems 5(2), 126 (2010)
2. Acampora, G., Loia, V.: Fuzzy control interoperability and scalability for adaptive domotic framework. IEEE Transactions on Industrial Informatics 1(2), 97111 (2005)
3. Acampora, G., Loia, V.: Using FML and fuzzy technology in adaptive ambient intelligence environments. International Journal of Computational Intelligence Research 1(3),
171182 (2005)
4. Acampora, G., Loia, V.: A proposal of ubiquitous fuzzy computing for Ambient Intelligence. Information Sciences 178(3), 631646 (2008)
5. Benhassine, A., Ho, T.B.: An agent-based approach to solve dynamic meeting scheduling problem with preferences. Engineering Applications of Artif. Intell. 20(6), 857873
(2007)
6. Buitelaar, P., Cimiano, P., Frank, A., Hartung, M., Racioppa, S.: Ontology-based information extraction and integration from heterogeneous data sources. International Journal
of Human-Computer Studies 66(11), 759788 (2008)
7. Chun, A., Wai, H., Wong, R.Y.M.: Optimizing agent-based meeting scheduling through
preference 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 meeting
scheduling system. Information Sciences 176(9), 11311155 (2006)
9. Lee, C.S., Jian, Z.W., Huang, L.K.: A fuzzy ontology and its application to news summarization. IEEE Transactions on Systems, Man, and Cybernetics, Part B: Cybernetics 35(5), 859880 (2005)
10. Lee, C.S., Pan, C.Y.: An intelligent fuzzy agent for meeting scheduling decision support
system. Fuzzy Sets and Systems 142(3), 467488 (2004)
11. Lee, C.S., Wang, M.H.: Ontology-based intelligent healthcare agent and its application
to respiratory waveform recognition. Expert Systems with Applications 33(3), 606619
(2007)
12. Lee, C.S., Wang, M.H., Hagras, H.: A type-2 fuzzy ontology and its application to personal 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 Intelligence Magazine 2(l), 2029 (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), 808821 (2006)
15. Miller, S., John, R.: An interval type-2 fuzzy multiple echelon supply chain model.
Knowledge-Based Systems 23(4), 363368 (2010)
16. Orgun, B., Vu, J.: HL7 ontology and mobile agents for interoperability in heterogeneous
medical information systems. Computers in Biology and Medicine 36(7-8), 817836
(2006)
17. Sabar, M., Montreuil, B., Frayret, J.M.: A multi-agent-based approach for personnel scheduling in assembly centers. Engineering Applications of Artificial Intelligence 22(7), 10801088 (2009)
18. Sanchez, F.G., Bejar, R.M., Contreras, L., Breis, J.T.F., Nieves, D.C.: An ontology-based
intelligent system for recruitment. Expert Systems with Applications 31(2), 248263
(2006)

186

C.-S. Lee et al.

19. Sourouni, A.M., Kourlimpinis, G., Mouzakitis, S., Askounis, D.: Towards the government transformation: An ontology-based government knowledge repository. Computer
Standards & Interfaces 32(1-2), 4443 (2009)
20. Yimin, L., Jing, H.: Type-2 fuzzy mathematical modeling and analysis of the dynamical behaviors of complex ecosystems. Simulation Modelling Practice and Theory 16(9),
13791391 (2008)
21. Wainer, J., Ferreira Jr, P.R.: Constantino Scheduling meetings through multi-agent negotiations. Decision Support Systems 44(1), 285297 (2007)
22. Zarandi, M.H.F., Rezaee, B., Turksen, I.B., Neshat, E.: A type-2 fuzzy rule-based expert
system model for stock price analysis. Expert Systems with Applications 36(1), 139154
(2009)
23. Zhang, W., Yoshida, T., Tang, X.: Using ontology to improve precision of terminology
extraction from documents. Expert Systems with Applications 36(5), 93339339 (2009)
24. Zhou, H., Chen, F., Yang, H.: Developing Application Specific Ontology for Program
Comprehension by Combining Domain Ontology with Code Ontology. In: Proceeding
of the 2008 Eighth International Conference on Quality Software (QSIC 2008), Oxford,
United Kingdom, pp. 225234 (2008)

Author Index

Acampora, Giovanni 17, 33, 51, 113


Chang, Jee-Gong 113
Chen, Yu-Jen 95
Chen, Zhi-Wei 149
Cheng, Hui-Hua 149

Lee, Chang-Shing 73, 95, 113, 133, 149,


169
Lin, Bort-Hung 73
Liu, Che-Hung 133
Loia, Vincenzo 33, 51, 113
Su, Ming-Kai 133, 169

Di Stefano, Bruno N. 3
Hagras, Hani 113, 133, 149, 169
Huang, Hsien-De 113
Hung, Pi-Hsia 73
Kao, Hung-Yu 113
Kuo, Hui-Ching 149
Kuo, Su-E 149
Kuo, Yi-Ling 73

Tseng, Yu-Yang 133


Vitiello, Autilia 33, 51
Wang, Hui-Min 73, 133
Wang, Mei-Hui 73, 95, 113, 133, 149, 169
Wang, Yuan-Liang 133
Wu, Min-Hsiang 169
Yen, Shi-Jim 95

Вам также может понравиться