Advances In Computer Science And Engineering Matthias Schmidt pdf download
Advances In Computer Science And Engineering Matthias Schmidt pdf download
https://ebookbell.com/product/advances-in-computer-science-and-
engineering-matthias-schmidt-2134212
https://ebookbell.com/product/advances-in-computer-science-and-
engineering-1st-edition-shi-ronghui-4195428
https://ebookbell.com/product/advances-in-computer-science-and-
engineering-13th-international-csi-computer-conference-
csicc-2008-kish-island-iran-march-911-2008-revised-selected-
papers-1st-edition-mohammad-taheri-4201550
https://ebookbell.com/product/advances-in-computer-science-and-
engineering-schmidt-matthias-232438336
https://ebookbell.com/product/advances-in-computer-science-and-
information-engineering-volume-2-1st-edition-zhengwei-zhu-4096694
https://ebookbell.com/product/advances-in-computer-science-and-
information-engineering-volume-1-1st-edition-guiping-dai-4635852
https://ebookbell.com/product/recent-advances-in-computer-science-and-
information-engineering-volume-2-1st-edition-yuekai-wang-4106874
https://ebookbell.com/product/recent-advances-in-computer-science-and-
information-engineering-volume-6-1st-edition-zhang-yanxiang-
auth-4106876
https://ebookbell.com/product/recent-advances-in-computer-science-and-
information-engineering-volume-5-1st-edition-wang-ning-4106878
ADVANCES IN COMPUTER
SCIENCE AND ENGINEERING
Edited by Matthias Schmidt
Advances in Computer Science and Engineering
Edited by Matthias Schmidt
Published by InTech
Janeza Trdine 9, 51000 Rijeka, Croatia
Statements and opinions expressed in the chapters are these of the individual contributors
and not necessarily those of the editors or publisher. No responsibility is accepted
for the accuracy of information contained in the published articles. The publisher
assumes no responsibility for any damage or injury to persons or property arising out
of the use of any materials, instructions, methods or ideas contained in the book.
Preface IX
The speed of technological, economical and societal change in the countries all over
the world has increased steadily in the last century. This trend continues in the new
millennium. Therefore, many challenges arise. To meet these challenges and to realize
the resulting potentials, new approaches and solutions have to be developed. There-
fore, research activities are becoming more and more important.
This book represents an international platform for scientists to show their advances in
research and development and the resulting applications of their work as well as and
opportunity to contribute to international scientific discussion.
The book Advances in Computer Science and Engineering constitutes the revised selec-
tion of 23 chapters written by scientists and researchers from all over the world. The
chapters are organized in four sections: Applied Computing Techniques, Innovations
in Mechanical Engineering, Electrical Engineering and Applications and Advances in
Applied Modeling.
The first section Applied Computing Techniques presents new findings in technical
approaches, programming and the transfer of computing techniques to other fields of
research. The second and the third section; Innovations in Mechanical Engineering
and Electrical Engineering and Applications; show the development, the application
and the analysis of selected topics in the field of mechanical and electrical engineer-
ing. The fourth section, Advances in Applied Modeling, demonstrates the develop-
ment and application of models in the areas of logistics, human-factor engineering and
problem solutions.
This book could be put together due to the dedication of many people. I would like to
thank the authors of this book for presenting their work in a form of interesting, well
written chapters, as well as the InTech publishing team and Prof. Lovrecic for their
great organizational and technical work.
China
1. Introduction
With the great progress of technologies, computers are embedded into everywhere to make
our daily life convenient, efficient and comfortable [10-12] in a pervasive computing
environment where services necessary for a user can be provided without demanding
intentionally. This trend also makes a big influence even on the education field to make
support methods for learning more effective than some traditional ways such as WBT (Web-
Based Training) and e-learning [13, 14]. For example, some WBT systems for educational
using in some universities [1, 2, 9], a system for teacher-learners’ interaction in learner
oriented education [3], and real e-learning programs for students [7, 8] had succeeded in the
field. However, a learner’s learning time is more abundant in the real world than in the
cyber space, and learning support based on individual situation is insufficient only with
WBT and e-learning. In addition, some researches show that it is difficult for almost all
learners to adopt a self-directed learning style and few of learners can effectively follow a
self-planned schedule [4]. Therefore, support in the real world is necessary for learners to
manage a learning schedule to study naturally and actively with a self-learning style.
Fortunately, with the rapid development of embedded technology, wireless networks, and
individual detecting technology, these pervasive computing technologies make it possible to
support a learner anytime and anywhere kindly, flexibly, and appropriately. Moreover, it
comes to be able to provide the support more individually as well as comfortable
surroundings for each learner through analyzing the context information (e.g. location, time,
actions, and so on) which can be acquired in the pervasive computing environment.
In this chapter, we address a next-generation self-learning style with the pervasive
computing and focus on two aspects: providing proper learning support to individuals and
making learning environments suitable for individuals. Especially, a support method is
proposed to encourage a learner to acquire his/her learning habit based on Behavior
Analysis through a scheduler system called a Ubiquitous Learning Scheduler (ULS). In our
design, the learner’s situations are collected by sensors and analyzed by comparing them to
his/her learning histories. Based on this information, supports are provided to the learner in
order to help him/her forming a good learning style. For providing comfortable
4 Advanced in Computer Science and Engineering
surroundings, we improve the ULS system by utilizing data sensed by environments like
room temperature and light for the system, which is called a Pervasive Learning Scheduler
(PLS). The PLS system adjusts each parameter automatically for individuals to make a
learning environment more comfortable. Our research results revealed that the ULS system
not only benefits learners to acquire their learning habits but also improved their self-
directed learning styles. In addition, experiment results show the PLS system get better
performance than the ULS system.
The rest of the chapter consists as follows. In the section 2, we propose the ULS system and
describe the design of the system in detail followed by showing implementation of the
system with experimental results. In section 3, the PLS system is proposed and we provide
an algorithm to find an optimum parameter to be used in the PLS system. The PLS system is
also implemented and evaluated comparing to the ULS system. Finally, section 4 concludes
this chapter.
schedule is made by the system. A learning schedule chart is displayed on the desk. The
learner follows the chart. The chart changes immediately and supports flexibly. The
guardian also can see the chart to perceive the learner’s state of achievement.
In this paper, we are focusing on the home area, especially learners’ self-learning at home.
We assume a learning environment is with the condition as same as Figure 1. To achieve the
goal, we have the following problems to be solved:
1. How to display an attractive schedule chart to motivate the learner?
2. How to give a support based on Behavior Analysis?
3. When to give a support?
4. How to avoid failure during learning?
In order to solve the above problems, at first, a method which can manage a learning
schedule is proposed. Its feature is to manage a learning schedule based on combination of
the teacher’s needs, the parent’s needs, and learner’s situation. Its advantage is that the
learner can determine what to study at the present time immediately. Secondly, the ULS is
implemented based on behavior analyzing method. Because behavioral psychology can
offer students more modern and empirically defensible theories to explain the details of
everyday life than can the other psychological theories [9].The function of the ULS is to use
different colors to advise the learner subjects whether to study or not.
generalization [9]. This principle also makes sense in the learning behavior. By referring to
Figure 3., this paper considers red grids as step 1, yellow ones as step 2, and green ones as
step 3. Step 1 is the lowest level. The ULS gives the learner different compliments based on
learning time according to each color. Learning time depends on a learner’s situation. Table
1 shows an example of that. Learning time of yellow and green are based on average of
elementary students’ learning time in home in Japan [4].
CV decides a color of the current grid and has some ranges for three colors such as red,
yellow, and green. The green range is from -2 to 0, the yellow one is from 0 to 2, and the red
one is from 2 to 4. Also, the value smaller than -2 will be considered as green and bigger
than 4 will be considered as red respectively. For example, when CV equals to 0.5, the color
is yellow. These ranges are not relative to RGB code and are assumed to be set by the teacher
in this research.
In the equation (4), TP and GP mean Teacher’s Priority and Guardian’s Priority respectively.
Guardian 5 4 2 3 1
Sum. 10 6 5 7 2
default value is 0. SAD has particular three values, -1, 0, and 1. These values means as
follows.
1. The learner has studied for no time.
2. The learner has studied for less than objective time.
3. The learner has studied for more than objective time.
Objective time depends on a grid’s color. This idea is based on Section 4.4. For example,
objective time is 10 minutes for red grids, 20 minutes for yellow ones, and 30 minutes for
green ones. At a subject on a red grid, we assume that a learner is not willing to study it.
Therefore, to compliment studying is important, even if the learner studies for only a
fraction of the time. That is why objective time of red grids is less than one of others. If the
learner takes 10 minutes to study a subject on a yellow grid, the SAD value equals to 0. In
this paper, objective time is initialized by the teacher based on the learner’s ability. Since the
learner starts to use the ULS, the ULS automatically has set objective time. The ULS analyzes
average learning time of the learner, and decides it as objective time for yellow grids. The
ULS also analyzes minimum learning time and maximum one, and decides each them as
objective time for red grids and green ones. Therefore, the objective time is flexibly changed
with the learner’s current ability.
Sometimes there are some relationships between the subjects. If the learner studies the
subjects in a meaningful order, it will result a better understanding. Otherwise, the learning
efficiency is down. For example, classical literature (Ancient writings or Chinese writing)
witch is told in traditional Japanese class might require some pre-knowledge about the
history to help learner understanding the contents and meaning well. In this case, it is clear
that the priority of study the subject History is higher than the subject Japanese. Also, it is a
common sense that rudimentary mathematics might be a prerequisites course before science
study. Considering this characteristics, we also define an equation to improve the system,
n
CV 'i = CVi + ( ∑ CVj ) * Pi (7)
j =1
Xi
where, Pi = n
∑Xj
j =1
We improve the CV’ to apply the shaping principle. P means the priority of each subject. In
this paper, we take the teacher’s priority into this formula. Because teachers are more
familiar with the relationships between each courses than guardian and it should has more
weighted to influence the learner.
5
CVJpn.' = 1.8 + (1.8 + 1.2 − 0.5 + 0.4 + 0.8) * = 3.03
(5 + 4 + 1 + 2 + 3)
4
CVMath.' = 1.2 + (1.8 + 1.2 − 0.5 + 0.4 + 0.8) * = 2.18
(5 + 4 + 1 + 2 + 3)
subjects, Color Value of each subject is initialized. After an examining period, they answered
some questionnaires for evaluating this system. Contents of the questionnaires are as
follows:
Q1: Did you feel this system makes your motivation increase for self-directed learning?
Q2: Did the system provide suitable visible-supports to you?
Q3: Do you think this system helps you to improve your learning habit at home?
Q4: Did you feel this system was easy to use?
Questionnaire Items
Q4 Quite Yes
Q3 Yes
No Opinion
Q2 No
Q1 Quite No
Q4 Quite Yes
Q3 Yes
No Opinion
Q2 No
Q1 Quite No
School
Teacher
PC Server
Internet
Home
Temperature
Thermoter light
Light sensor
Transfer data
Oxygen
Refer data
st Control Center
Input data q ue er Oxygen
PC Re sw
An sensor
Guardian ort, Read tags
pp
Su
Study Textbook
Leaner
n
E(t ) = n
(8)
∑ CV ' j (t )
j =1
Then, we can obtain the efficiency ratio comparing E(t) with E(t-1) which is the efficiency of
the previous study at time t-1 in a record with the following equation (9).
E(t )
Efficiency Ratio = (9)
E(t − 1)
set by the learner. We assume the learner sets it as A=2. According to our algorithm, we
compare the efficiency ratio of temperature of 28 and 26. We can see that the efficiency ratio
of 28 degree is lower than that of 26 degree. We decrease the step value and get a new step
value: A’=A/2=1. Then, we compare the efficiency ratio of 27 degree with that of 26 degree.
The efficiency ratio of 26 degree is still higher, so we decrease the step value again and get
another step value: A’’=A’/2=0.5. The efficiency ratio of 26.5 degree is higher than that of 26
degree. As a result of the first round, we find that the optimum temperature that is 26.5
degree. For simplicity, we generally stop when the step equals to 0.1. Then, we repeat the
phases to obtain another optimum temperature. As a result of the second round, we find the
optimum temperature that is 25.5 degree. Comparing the efficiency ratio of 25.5 degree to
that of 26.5 degree, we finally choose 25.5 degree as the optimum temperature because its
efficiency ratio is higher.
Each day, we only modify the temperature once, and we get the corresponding efficiency
ratio. After several days, we can finally get the optimum temperature. In the same way, the
control center finds an optimum value for each parameter.
(a) A snapshot of the control center (b) Back side of a special tile
Fig. 8. Implementation of the PLS system
We implement the PLS system based on the ULS system. Figure. 8(a) shows a screen capture
of the Control Center in the PLS system.
To improve performance of gathering sensory data, we develop special tiles as shown in
Figure. 8(b). The special tiles are embedded with an RFID antenna and pressure sensors,
which are spread all over the desk. Each book includes an RFID tag showing text
information (e.g., English textbook). The dynamic information of a book put on the tile is
acquired by the tile connected to a sensor network. We designed to solve the following
problems; passive RFID reader only has a narrow range of operation and sometimes it
works not well for gathering data of all books on the desk. We separated the antenna from
the reader and created a RF-ID antenna with coil to broad the operation range of it. As the
result, with a relay circuit 16 antennas can control by only one reader. The tile also has five
pressure sensors. By using the special tile, accuracy of gathering learning information was
increased.
Next Generation Self-learning Style in Pervasive Computing Environments 15
Fig. 9. Efficiency ratio comparison between the ULS and the PLS
We evaluate the PLS by involving 10 subjects of students. In order to evaluate learning
effectiveness with considering environmental factors, they answer the following
questionnaires, which is the same in subsection 2.4, after using the ULS system as well as the
PLS system for some periods respectively.
Q1: Did you feel this system makes your motivation increase for self-directed learning?
Q2: Did the system provide suitable visible-supports to you?
Q3: Do you think this system helps you to improve your learning habit at home?
Q4: Did you feel this system was easy to use?
Then, we compare feedback scores of the PLS system with that of the ULS system and
calculate efficiency ratio based on score averages. Figure. 9 shows every subject thinks that
the PLS system is more efficient to study than the ULS system. We can conclude PLS system
succeeds to provide comfortable learning environments to each learner with pervasive
computing technologies, which leads to efficient self-learning style.
4. Conclusion
We address a next-generation self-learning style utilizing pervasive computing technologies
for providing proper learning supports as well as comfortable learning environment for
individuals. Firstly, a support method for self-managing learning scheduler, called the PLS,
is proposed and analyzes context information obtained from sensors by Behavior Analysis.
In addition, we have involved the environment factors such as temperature and light into
the PLS for making a learner’s surroundings efficient for study. The sensory data from
environments is sent to a decision center which analyzes the data and makes the best
decision for the learner. The PLS has been evaluated by some examinees. According to the
results, we have revealed that improved PLS not only benefited learners to acquire their
learning habits but also improved their self-directed learning styles than the former one.
5. Acknowledgment
This work is supported in part by Japan Society for the Promotion of Science (JSPS) Research
Fellowships for Young Scientists Program, JSPS Excellent Young Researcher Overseas Visit
Program, National Natural Science Foundation of China (NSFC) Distinguished Young
Scholars Program (No. 60725208) and NSCF Grant No. 60811130528.
16 Advanced in Computer Science and Engineering
6. References
Lima, P.; Bonarini, A. & Mataric, M. (2004). Application of Machine Learning, InTech, ISBN
978-953-7619-34-3, Vienna, Austria
Li, B.; Xu, Y. & Choi, J. (1996). Applying Machine Learning Techniques, Proceedings of ASME
2010 4th International Conference on Energy Sustainability, pp. 14-17, ISBN 842-6508-
23-3, Phoenix, Arizona, USA, May 17-22, 2010
Siegwart, R. (2001). Indirect Manipulation of a Sphere on a Flat Disk Using Force
Information. International Journal of Advanced Robotic Systems, Vol.6, No.4,
(December 2009), pp. 12-16, ISSN 1729-8806
Arai, T. & Kragic, D. (1999). Variability of Wind and Wind Power, In: Wind Power, S.M.
Muyeen, (Ed.), 289-321, Scyio, ISBN 978-953-7619-81-7, Vukovar, Croatia
Van der Linden, S. (June 2010). Integrating Wind Turbine Generators (WTG’s) with
Energy Storage, In: Wind Power, 17.06.2010, Available from
http://sciyo.com/articles/show/title/wind-power-integrating-wind-turbine-
generators-wtg-s-with-energy-storage
Taniguchi, R. (2002). Development of a Web-based CAI System for Introductory Visual Basic
Programming Course, Japanese Society for Information and Systems in Education,
Vol.19 No.2, pp. 106-111
Fuwa, Y.; Nakamura, Y.; Yamazaki, H. & Oshita, S. (2003). Improving University Education
using a CAI System on the World Wide Web and its Evaluation, Japanese Society for
Information and Systems in Education, Vol.20 No.1, pp. 27-38
Nakamura, S.; Sato, K.; Fujimori, M.; Koyama, A. & Cheng, Z. (2002). A Support System for
Teacher-Learner interaction in Learner-oriented Education, Information Processing
Society of Japan, Vol.43 No.2, pp.671-682
Benesse Corporation. (2005). Home Educational Information of Grade-school Pupils,
Benesse Corporation, Japan
Baldwin, J.D & Baldwin, J.I.; (2001). Behavior Principles in Everyday Life, 4th ed., L.
Pearson, (Ed.), Prentice-Hall, Inc., New Jersey
Daiichi Tsushin Kogyo Ltd. (2003). Automatic Recognition System, Daiichi Tsushin Kogyo
Ltd., Available from http://zones.co.jp/mezam.html
School of Human Sciences, Waseda University. E-School, Available from http://e-
school.human.waseda.ac.jp/
Oklahoma State University. Online Courses, Available from http://oc.okstate.edu/
Barbosa, J.; Hahn, R.; Barbosa, D.N.F. & Geyer, C.F.R. (2007). Mobile and ubiquitous
computing in an innovative undergraduate course, In Proceedings of 38th SIGCSE
technical symposium on Computer science education, pp. 379–383
Satyanarayanan, M. (2001). Pervasive Computing: Vision and Challenges, IEEE Personal
Communication, pp. 10-17
Ponnekanti, S.R; et al. (2001). Icrafter: A service framework for ubiquitous computing
environments, In Proceedings of Ubicomp 2001, pp. 56–75
Stanford, V. (2002). Using Pervasive Computing to Deliver Elder Care, IEEE Pervasive
Computing, pp.10-13
Hinske, S. & Langheinrich, M. (2009). An infrastructure for interactive and playful learning
in augmented toy environments, In Proceedings of IEEE International Conference on
Pervasive Computing and Communications (PerCom 2009), pp. 1-6
Yu, Z.; Nakamura, Y.; Zhang, D.; Kajita, S. & Mase, K. (2008). Content Provisioning for
Ubiquitous Learning, IEEE Pervasive Computing, Vol. 7, Issue 4, pp. 62-70
2
1. Introduction
Automatic generation of program is definitely an alluring problem. Over the years many
approaches emerged, which try to smooth away parts of programmers’ work. One approach
already widely used today is colloquially known as code generation (or code generators). This
approach includes many methods and tools, therefore many different terms are used to
describe this concept. The very basic tools are included in various available Integrated
Development Environments (IDE). These include templates, automatic code completion,
macros and other tools. On a higher level, code generation is performed by tools, which
create program source code from metadata or data. Again, there are thousands of such tools
available both commercial and open source. Generally available are programs for generating
source code from relational or object database schema, object or class diagrams, test cases,
XML schema, XSD schema, design patterns or various formalized descriptions of the
problem domain.
These tools mainly focus on the generation of a template or skeleton for an application or
application module, which is then filled with actual algorithms by a programmer. The great
advantage of such tools is that they lower the amount of tedious, repetitive and boring (thus
error-prone) work. Commonly the output is some form of data access layer (or data access
objects) or object relational mapping (ORM) or some kind of skeleton for an application - for
example interface for creating, reading, updating and deleting objects in database (CRUD
operations). Further, this approach leads to generative programming domain, which
includes concepts such as aspect-oriented programming (Gunter & Mitchell, 1994), generic
programming, meta-programming etc. (Czarnecki & Eisenecker, 2000). These concepts are now
available for general use – for example the AspectJ extension to Java programming language
is considered stable since at least 2003 (Ladad, 2009). However, they are not still mainstream
form of programming according to TIOBE Index (TIOBE, 2010).
A completely different approach to the problem is an actual generation of algorithms of the
program. This is a more complex then code generation as described above, since it involves
actual creation of algorithms and procedures. This requires either extremely complex tools
or artificial intelligence. The former can be probably represented by two most successful
(albeit completely different) projects – Lyee project (Poli, 2002) and Specware project (Smith,
1999). Unfortunately, the Lyee project was terminated in 2004 and the latest version of
Specware is from 2007.
As mentioned above, another option is to leverage artificial intelligence methods
(particularly evolutionary algorithms) and use them to create code evolution. We use the term
18 Advances in Computer Science and Engineering
code evolution as an opposite concept to code generation (as described in previous paragraphs)
and later we will describe how these two concepts can be coupled. When using code
generation, we let the programmer specify program metadata and automatically generate
skeleton for his application, which he then fills with actual algorithms. When using code
evolution, we let the programmer specify sample inputs and outputs of the program and
automatically generate the actual algorithms fulfilling the requirements. We aim to create a
tool which will aid human programmers by generating working algorithms (not optimal
algorithms) in programming language of their choice.
In this chapter, we describe evolutionary methods usable for code evolution and results of
some experiments with these. Since most of the methods used are based on genetic
algorithms, we will first briefly describe this area of artificial intelligence. Then we will
move on to the actual algorithms for automatic generation of programs. Furthermore, we
will describe how these results can be beneficial to mainstream programming techniques.
The critical operation of genetic algorithm is crossover which requires that it is possible to
determine what a “better solution” is. This is determined by a fitness function (criterion
function or objective function). The fitness function is the key feature of genetic algorithm,
since the genetic algorithm performs the minimization of this function. The fitness function
is actually the transformation of the problem being solved into a state space which is
searched using genetic algorithm (Mitchell, 1999).
S = expr (3)
Automatic Generation of Programs 21
Backward Processing algorithm (Ošmera, Popelka & Pivoňka, 2006). The backward processing
algorithm just uses different order of processing the rules of the context free grammar than
the original GE algorithm. Although the change might seem subtle, the consequences are
very important. When using the original algorithm, the rules are read left-to-right and so is
the body of the individual scanned left-to-right for untranslated non-terminals.
The backward processing algorithm scans the solution string for non-terminals in right-to-
left direction. Figure 4 shows the translation process when this mode is used. Note that the
genes in the chromosome are the same; they just have been rearranged in order to create
same solution, so that the difference between both algorithms can be demonstrated. Figure 4
now contains two additional columns with rule type and gene mark.
Rule types are determined according to what non-terminals they translate. We define a T-
terminal as a terminal which can be translated only to terminals. By analogy N-terminal is a
terminal which can be translated only to non-terminals. T-rules (N-rules) are all rules
translating a given T-nonterminal (N-nonterminal). Mixed rules (or non-terminals) are not
Automatic Generation of Programs 23
allowed. Given the production rules shown on Figure 1, the only N-nonterminal is <expr>,
non-terminals <fnc>, <var> and <num> are all T-nonterminals (Ošmera, Popelka &
Pivoňka, 2006).
Fig. 4. Translation of an expression (equation (4)) using the backward processing algorithm
Now that we are able to determine type of the rule used, we can define gene marks. In step c)
at figure 4 a <expr> non-terminal is translated into a <fnc>(<num>, <expr>) expression.
This is further translated until step g), where it becomes 3 ⋅ x . In other words – in step c) we
knew that the solution will contain a function with two arguments; in step g) we realized
that it is multiplication with arguments 3 and x. The important feature of backward
processing algorithm that all genes which define this sub-expression including all its’
parameters are in a single uninterrupted block of genes. To explicitly mark this block we use
Block marking algorithm which marks:
- all genes used to select N-rule with mark B (Begin)
- all genes used to select T-rule except the last one with mark I (Inside)
- all genes used to select last T-rule of currently processed rule with mark E (End).
The B and E marks determine begin and end of logical blocks generated by the grammar. This
works independent of the structure generated provided that the grammar consists only of
N-nonterminals and T-nonterminals. These logical blocks can then be exchanged the same
way as in genetic programming (figure 5) (Francone et al, 1999).
Compared to genetic programing, all the genetic algorithm operations are still performed on
the genome (chromosome) and not on the actual solution. This solves the second problem
described in section 2.2 – the generation of syntactically incorrect solutions. Also the
24 Advances in Computer Science and Engineering
problem of lowered variability is solved since we can always insert or remove genes in case
we need to remove or add parts of the solution. This algorithm also solves analogical
problems existing in standard grammatical evolution (O’Neill et al, 2001).
42 B 42 B 42 B 42 B
37 B 37 B 37 B 37 B
7 B 7 B 7 B 7 B
16 B 16 B 16 B 38 B 16 B
27 E 27 E 27 E 8 B 27 E
63 I 63 I 78 E 63 I
19 E 19 E 22 I 19 E
13 E 13 E 45 E 13 E
17 B 17 B 63 I 17 B
38 B 38 B 38 B 19 E 16 B
8 B 8 B 8 B 13 E 27 E
78 E 78 E 78 E 17 B 11 E
22 I 22 I 22 I 38 B 23 E
45 E 45 E 45 E 8 B
11 E 11 E 78 E
23 E 23 E 22 I
45 E
2. parent part 11 E
2+x
23 E
the parse tree of the structure and use it in second level of optimization. For this second
level of optimization, a Differential evolution algorithm (Price, 1999) is used. This greatly
improves the performance of GE, especially when real numbers are required (Popelka &
Šťastný, 2007)
Initialization
Fitness computation
Apply to all
individuals
Differential evolution
Translate chromosome
No
Are there any variables to
be optimized ?
Initialization
Yes
Desired fitness
reached ? Fitness computation
No
Finish
Yes No
Mutation
Crossover +
Selection
Selection
not be classified into a given class because of its structural deformation. Further, there are
some methods which use structural description and are capable of recognizing randomly
deformed objects with good rate of classification and speed.
The solution to improve the rate of classification is to enhance the original grammar with
rules which describe errors – deformation rules, which cover up every possible random
deformation of object. Then the task is changed to finding a non-deformed string, which
distance from analysed string is minimal. Compared to the previous method, this is more
informed method because it uses all available knowledge about the classification targets – it
uses grammar. Original grammar may be regular or context-free, enhanced grammar is
always context-free and also ambiguous, so the syntactic analysis, according to the
enhanced grammar, will be more complex.
Enhanced deformation grammar is designed to reliably generate all possible deformations of
strings (objects) which can occur. Input is context-free or regular grammar G = (VN, VT, P,
S). Output of the processing is enhanced deformation grammar G’ = (VN’, VT’, P’, S’), where P’
is set of weighted rules. The generation process can be described using the following steps:
Step1:
VT ⊆ VT’ (6)
Step 2:
If holds:
input string, which is linked with the smallest sum of weight of deformation rules. G’ is
ambiguous grammar, i.e. its syntactic analysis is more complicated. A modified Earley
parser can be used for syntactic analyses with error correction. Moreover, this parser
accumulates appropriate weight of rules which were used in deformed string derivation
according to the grammar G’.
Output of the algorithm is lists I 0 , I 1 ,...I m for string w (equation 9) and distance d of input
string from a template string defined by the grammar.
Step 1 of the algorithm – create list I 0 . For every rule S ’ → α ∈ P ’ add into I 0 field:
[S ’ → ⋅α ,0, x ] (10)
Z
B → γ field [ B → ⋅γ ,0, z] (12)
into I 0 .
Step 2: Repeat for j = 1, 2,..., m the following sub-steps A – C:
a. for every field in I j − 1 in form of [ B → α ⋅ aβ , i , x ] such that a = b j , add the field
[B → α a ⋅ β , i, x] (13)
into I j . Then execute sub-steps B and C until no more fields can be added into I j .
b. If field [ A → α ⋅, i , x ] is in I j and field [ B → β ⋅ Aγ , k , y ] in I j , then
a. If exists a field in form of [ B → β A ⋅ γ , k , z] in I j , and then if x+y < z, do replace
the value z with value x + y in this field
b. If such field does not exist, then add new field [ B → β A ⋅ γ , k , x + y ]
c. For every field in form of [ A → α ⋅ Bβ , i , x ] in I j do add a field [ B → ⋅γ , j , z] for every
rule
Z
B→γ (14)
Step 3: If the field
[S ’ → α ⋅,0, x ] (15)
is in I m , then string w is accepted with distance weight x. String w (or its derivation tree) is
obtained by omitting all deformation rules from derivation of string w.
Automatic Generation of Programs 29
4. Experiments
The goal of automatic generation of programs is to create a valid source code of a program,
which will solve a given problem. Each individual of a genetic algorithm is therefore one
variant the program. Evaluation of an individual involves compilation (and building) of the
source code, running the program and inputting the test values. Fitness function then
compares the actual results of the running program with learning data and returns the
fitness value. It is obvious that the evaluation of fitness becomes very time intensive
operation. For the tests we have chosen the PHP language for several reasons. Firstly it is an
interpreted language which greatly simplifies the evaluation of a program since compiling
and building can be skipped. Secondly a PHP code can be interpreted easily as a string
using either command line or library API call, which simplified implementation of the
fitness function into our system. Last but not least, PHP is a very popular language with
many tools available for programmers.
The values intentionally do not correspond to the usual implementation of this function: c =
a − b. Also the fitness function checks only if c satisfies the conditions and not if the actual
value is equal, thus the search space is open for many possible solutions. An example
solution is:
function comparege($a, $b) {
$result = null;
if ((($a) - (($b) * (-(($result) / (1))))) <= ($result)) {{
$result = 0;
$result = $b;
}}
$result = ($b) - ($a);;
$result = -($result);;
return $result;
}
The environment was the same like in the first example; generation took 75.1 population
cycles on average. Although these tests are quite successful, it is obvious, that this is not
very practical.
For each simple automatically generated function a programmer would need to specify a
very specific test, function header, function footer. Tests for genetic algorithms need to be
specific in the values they return. A fitness function which would return just “yes” or “no”
is insufficient in navigating the genetic algorithm in the state space – such function cannot
be properly optimized. The exact granularity of the fitness function values is unknown, but
as little as 5 values can be sufficient if they are evenly distributed (as shown in the first
example in this section).
<class_declaration_statement> :==
“class BankAccount {“ <class_variable_declarations>
“public function depositMoney(“<variable_without_objects>”) {“
<statement_list>
“}
public function getBalance() {“
<statement_list>
“}
public function withdrawMoney(“<variable_without_objects>”) {“
<statement_list
“}
}”
This way we obtain the class declaration generated by the unit test, plus space for private
class members (only variables in this case) and function parameters. It is important to note
that the grammar used to generate a functional class needs at least about 20 production rules
Automatic Generation of Programs 33
5. Conclusion
In this chapter, we have presented several methods and concepts suitable for code evolution a
fully automated generation of working source code using evolutionary algorithms. In the
above paragraphs, we described how code evolution could work together with code
generation. Code generation tools can be used to create a skeleton or template for an
application, while code evolution can fill in the actual algorithms. This way, the actual
generated functions can be kept short enough, so that the code evolution is finished within
reasonable time.
Our long term goal is to create a tool which would be capable of generating some code from
unit tests. This can have two practical applications – creating application prototypes and
crosschecking the tests. This former is the case where the code quality is not an issue. What
matters most is that the code is created with as little effort (money) as possible. The latter is
the case where a programmer would like to know what additional possible errors might
arise from a class.
The method we focused on in this chapter is unique in that its’ output is completely
controlled by a context-free grammar. Therefore this method is very flexible and without
any problems or modifications it can be used to generate programs in mainstream
programing languages. We also tried to completely remove the fitness function of the
genetic algorithm and replace it with standardized unit-tests. This can then be thought of as
an extreme form of test-driven development.
34 Advances in Computer Science and Engineering
6. Acknowledgement
This work was supported by the grants: MSM 6215648904/03 and IG1100791 Research
design of Mendel Univeristy in Brno.
7. References
Ahluwalia, M. & Bull, L. (1998). Co-evolving functions in genetic programming: Dynamic
ADF creation using GliB, Proceedings of Evolutionary Programming VII - 7th
International Conference, EP98 San Diego. LNCS Volume 1447/1998, Springer, ISBN-
13: 978-3540648918, USA
Aycock, J. & Horspool, R.N. (2002). Practical Early Parsing, The Computer Journal, Vol. 45,
No. 6, British Computer Society, pp. 620-630, DOI: 45:6:620-630
Beck, K. (2002). Test Driven Development: By Example, Addison-Wesley Professional, 240
p., ISBN 978-0321146533, USA
Büchi, M., Weck, W. (1999). The Greybox Approach: When Blackbox Specifications Hide
Too Much, Technical Report: TUCS-TR-297, Turku Centre for Computer Science,
Finland
Cândida Ferreira (2006a). Automatically Defined Functions in Gene Expression
Programming in Genetic Systems Programming: Theory and Experiences, Studies in
Computational Intelligence, Vol. 13, pp. 21-56, Springer, USA
Cândida Ferreira (2006b). Gene Expression Programming: Mathematical Modelling by an
Artificial Intelligence (Studies in Computational Intelligence), Springer, ISBN 978-
3540327967, USA
Czarnecki, K. & Eisenecker, U. (2000). Generative Programming: Methods, Tools, and
Applications, Addison-Wesley Professional, ISBN 978-0201309775, Canada
Dempsey, I., O’Neill, M. & Brabazon, A. (2007). Constant creation in grammatical evolution,
Innovative Computing and Applications, Vol. 1, No.1, pp. 23–38
Francone, D. F, Conrads, M., Banzhaf, W. & Nordin, P. (1999). Homologous Crossover in
Genetic Programming, Proceedings of the Genetic and Evolutionary Computation
Conference (GECCO), pp. 1021–1026. ISBN 1-55860-611-4, Orlando, USA
Goldberg, D. E. (2002). The Design of Innovation: Lessons from and for Competent
Genetic Algorithms. Kluwer Academic Publishers, 272 p. ISBN 1-4020-7098-5,
Boston, USA
Gunter, C. A. & Mitchell, J. C. (1994). Theoretical Aspects of Object-Oriented Programming:
Types, Semantics, and Language Design, The MIT Press, ISBN 978-0262071550,
Cambridge, Massachusetts, USA
Gusfield, D. (1997). Gusfield, Dan (1997). Algorithms on strings, trees, and sequences: computer
science and computational biology, Cambridge University Press. ISBN 0-521-58519-8.
Cambridge, UK
Kasami, T. (1965). An efficient recognition and syntax-analysis algorithm for context-free
languages. Scientific report AFCRL-65-758, Air Force Cambridge Research Lab,
Bedford, MA, USA
Koza, J. R. (1992). Genetic Programming: On the Programming of Computers by Means of Natural
Selection, The MIT Press, ISBN 978-0262111706, Cambridge, Massachusetts, USA
Koza, J. R. (1994). Gene Duplication to Enable Genetic Programming to Concurrently Evolve
Both the Architecture and Work-Performing Steps of a Computer Program, IJCAI-
Automatic Generation of Programs 35
1. Introduction
At the moment, we are at the edge of a possible biological trouble. Some people say that the
19th century was the century of chemistry, the 20th was the century of physics, and they say
that the 21st will be the century of biology. If we think, the advances in the biological field in
the recent years have been incredible, and like the physics and its atomic bomb, with biology
could create global epidemics diseases. Also the climate change could produce a new virus
better than the existing virus, creating an atmosphere of panic, such as the influenza A (H1N1)
in recent years or Malaria who still killing people. To go a step further, we use computer
science in the improvement of disease prevention (Baker, 2007; Magal & Rouen, 2008).
For beginning, we mention quickly some plagues in history such as the Black Death as an
example of Bubonic plague, and we present from their basic concepts the most common
classical epidemic models.
We present a transmission malaria model with inhomogeneities in a human population,
which is proposed in terms of SIR coupled models for human and mosquitoes, which are
described by differential equations. The human population is considered divided into
several groups depending on genetics profiles, social condition, differentiation between
rural or urban people, etc. Within malaria model we consider that mosquitoes bite humans
in a differentiated way in accordance with the inhomogeneity. We use an algorithm for the
analysis from local stability of the infection-free equilibrium and that algorithm is
implemented on Maple™. This algorithm consists on determinate the characteristic
polynomial from Jacobian matrix of the model and the analysis of their eigenvalues using
Routh-Hurwitz theorem. As a result we obtain the basic reproductive number for malaria
(Ro) and the threshold condition for a malaria epidemic triggering (Ro>1). From this result
we can derivate effective control measures for avoiding malaria outbreaks and determinate
the minimum level of income for a community becomes free of malaria infection. This work
pretend to show the symbolic computing potential from CAS (Computer Algebra Systems),
in our case Maple™, for analysing automatically complex epidemic models and the
usefulness of them for designing and implementing public health politics.
plagues, but we just pretend to show some examples of diseases for that reason it is not all
the history of each plague, and the second one is a presentation of the most common models
used in epidemics problems such as SIS, SIR and SEIR models, trying to explain their
dynamics. This model models can be used in other sciences such as economics, biology, etc.
(Perthame, 2007)
to find the mathematical expressions, you can see the references (Brauer et al., 2008;
Capasso, 2008; Ma & Xia, 2009; Daley & Gani, 2005). All these models have been formulated
by great researchers who have contributed to the development of the techniques of diseases
dynamics treatment, also it’s important to note that the difficulty for the accuracy in these
models is the obtaining of the parameters (Bellomo, 2008).
• SIS Model
This model is the simplest model in epidemiology because it has only two population
groups the susceptible and the infected, which are related by λ and γ functions that could
depend on time or be just a constant, these functions are named: λ is the infectious rate
function and γ is the recovering rate function. Also, it is a model with a boucle or feedback.
It could easily model a pneumonia disease (Ma & Xia, 2009).
FURUYAMA MOROMASA
OKUMURA MASANOBU
One of the most eminent of the Ukiyoé artists. His drawings were
greatly admired for their rare combination of force and refinement,
and he exercised wide influence over his contemporaries and
successors to the end of the eighteenth century. He was the first
artist to use blocks from which prints were coloured in flat tints.
These were printed in the red known as beni, green, and black, and
were known as beni-yé. He was also the first artist to make the tall,
narrow pillar prints (ha-shira-yé), and was the inventor of the
perspective prints which he called ukiyé. His true name was
Okumura Genpachi, and he was commonly known as honya
(bookseller) Genpachi, from the fact that he was the proprietor of a
wholesale and retail book and print shop at the sign of the “red
gourd” in Tori-shio choÌ , Yedo.
LENT BY A COLLECTOR
LENT BY A COLLECTOR
TSUNEKAWA SHIGENOBU
LENT BY A COLLECTOR
NISHIMURA SHIGENAGA
[pg 35]
LENT BY THE ESTATE OF FRANCIS LATHROP, DECEASED
LENT BY A COLLECTOR
ISHIKAWA TOYONOBU
One of the most important of the Ukiyoé masters. Born in 1711, died
in 1785. Pupil of Shigenaga, and probably of Masanobu whose style
he closely assimilated.
LENT BY A COLLECTOR.
Ì
38Tall hand-coloured print. Segawa KikunojoÌ as a woman
reading a letter.
39Two sheets from a beni-yé triptych. Musume carrying
umbrellas.
[pg 36]
TORII KIYOHIRO
KIYONAGA. Picnic Party.
Pupil of Kiyomasu. His known works are exclusively beni-yé,
executed from about 1745 to about 1755.
TORII SHIRO
Known as Kiyonobu the second, all of his prints being signed Torii
Kiyonobu. He was the eldest son of Kiyomasu. Worked from about
1740 to about 1755, when it is probable that his death occurred.
Some of the most charming of the beni-yé prints are from his hand.
TORII KIYOMITSU
SUZUKI HARUNOBU
The central figure in Ukiyoé and the eminent master under whose
hand the art of colour-printing was brought to perfection in the
sixties of the eighteenth century. He was a draughtsman of extreme
elegance and power, and his works have a charm that is peculiarly
their own. He died on July 7, 1770, when, says Shiba Kokan in his
book “Kokan Kokai-ki,” he “had hardly passed his fortieth year.”
LENT BY A COLLECTOR.
LENT BY A COLLECTOR.
SHIBA KOKAN
SHOSHOKEN
KITAO SHIGEMASA
One of the noted artists of the school. Was famous for his skill as a
calligrapher, being reputed to have no superior in his day in either of
the “three capitals,” Yedo, Kyoto, or Osaka. His prints, which are
rare, are generally of much distinction. He was born in 1740, and
died in the second month of Bunsei 3 (February or March, 1820).
LENT BY A COLLECTOR.
85Two geishas.
ISODA KORYUSAI
The most important pupil of Harunobu, whose style he followed
closely in his early works. Later he developed a manner of his own.
As a designer of pillar prints and of prints of birds, he was especially
successful. He was a samurai and associated with samurai of the
superior class. The director of the mint was one of his most intimate
friends and patrons. About 1781 he gave up print-designing, devoted
himself to painting, and was given the honorary title of Hokyo. The
dates of his birth and death are not known.
LENT BY A COLLECTOR.
Ì
IPPITSUSAI BUNCHOÌ
An artist of samurai rank who, for a few years, designed actor prints
in the manner of Shunsho, which have great distinction of style and
colour. He was celebrated also as a writer of comic odes. He died on
May 18, 1796.
KATSUKAWA SHUNKOÌ
KATSUKAWA SHUNYEI
111A bijin.
UTAGAWA TOYOHARU
[pg 44]
TORII KIYONAGA
116The Writing-lesson.
117Fair travellers resting on a bench by the roadside.
LENT BY A COLLECTOR.
KATSUKAWA SHUNCHO
LENT BY A COLLECTOR.
HOSODA EISHI
LENT BY A COLLECTOR.
YEISHOSAI CHOKI
An artist of ability, though not quite of the first rank. His prints are
rare. He worked at first in the style of Kiyonaga. Later he imitated
Utamaro, and changed his “goÌ ,” or studio name, to Momokawa
Shiko.
LENT BY A COLLECTOR.
TOSHUSAI SHARAKU
This artist was by profession a performer of the stately and
aristocratic No dramas in the service of Hachisuka, Daimyo of Awa.
During the period from about 1790 to 1795 he designed a small
number of caricature portraits of actors, which have great force and
distinguished character.
Ì
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.
ebookbell.com