(Ebook) Principles of Soft Computing Using Python Programming by Gypsy Nandi ISBN 9781394173136, 139417313X All Chapter Instant Download
(Ebook) Principles of Soft Computing Using Python Programming by Gypsy Nandi ISBN 9781394173136, 139417313X All Chapter Instant Download
https://ebooknice.com/product/internet-of-things-using-single-board-
computers-principles-of-iot-and-python-programming-48978064
https://ebooknice.com/product/practical-numerical-computing-using-
python-38420516
https://ebooknice.com/product/learning-beaglebone-python-programming-
unleash-the-potential-of-beaglebone-using-python-55334008
https://ebooknice.com/product/the-practice-of-computing-using-
python-45334432
https://ebooknice.com/product/programming-and-scientific-computing-in-
python-51055746
https://ebooknice.com/product/intelligent-control-systems-using-soft-
computing-methodologies-1185592
https://ebooknice.com/product/the-practice-of-computing-using-
python-4339144
https://ebooknice.com/product/practical-quantum-computing-for-
developers-programming-quantum-rigs-in-the-cloud-using-python-quantum-
assembly-language-and-ibm-qexperience-7284138
Principles of Soft Computing Using Python Programming
1st Edition Gypsy Nandi Digital Instant Download
Author(s): Gypsy Nandi
ISBN(s): 9781394173136, 139417313X
Edition: 1
File Details: PDF, 8.34 MB
Year: 2023
Language: english
Principles of Soft Computing Using Python
Programming
IEEE Press
445 Hoes Lane
Piscataway, NJ 08854
IEEE Press Editorial Board
Sarah Spurgeon, Editor in Chief
Gypsy Nandi
Assam Don Bosco University
Guwahati, India
Copyright © 2024 by The Institute of Electrical and Electronics Engineers, Inc.
All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any
form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise,
except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without
either the prior written permission of the Publisher, or authorization through payment of the
appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers,
MA 01923, (978) 750-8400, fax (978) 750-4470, or on the web at www.copyright.com. Requests to
the Publisher for permission should be addressed to the Permissions Department, John Wiley &
Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at
http://www.wiley.com/go/permission.
Trademarks: Wiley and the Wiley logo are trademarks or registered trademarks of John Wiley &
Sons, Inc. and/or its affiliates in the United States and other countries and may not be used
without written permission. All other trademarks are the property of their respective owners.
John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book.
Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best
efforts in preparing this book, they make no representations or warranties with respect to the
accuracy or completeness of the contents of this book and specifically disclaim any implied
warranties of merchantability or fitness for a particular purpose. No warranty may be created or
extended by sales representatives or written sales materials. The advice and strategies contained
herein may not be suitable for your situation. You should consult with a professional where
appropriate. Neither the publisher nor author shall be liable for any loss of profit or any other
commercial damages, including but not limited to special, incidental, consequential, or other
damages.
For general information on our other products and services or for technical support, please
contact our Customer Care Department within the United States at (800) 762-2974, outside the
United States at (317) 572-3993 or fax (317) 572-4002.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in
print may not be available in electronic formats. For more information about Wiley products,
visit our web site at www.wiley.com.
Contents
2 Fuzzy Computing 35
2.1 Fuzzy Sets 37
2.1.1 Features of Fuzzy Membership Functions 38
2.2 Fuzzy Set Operations 41
2.3 Fuzzy Set Properties 42
2.4 Binary Fuzzy Relation 45
2.5 Fuzzy Membership Functions 46
2.6 Methods of Membership Value Assignments 49
2.7 Fuzzification vs. Defuzzification 58
2.8 Fuzzy c-Means 62
Exercises 71
vi Contents
Index 327
xi
Preface
Chapter 4 – Deep Learning delves into the realm of deep neural networks,
which have revolutionized fields such as computer vision, natural language
processing, and speech recognition. This chapter provides an overview of deep
learning techniques, including convolutional neural networks (CNNs), recur-
rent neural networks (RNNs), generative adversarial networks (GANs), and
autoencoders.
Chapter 5 – Probabilistic Reasoning explores the world of probability and
its applications in soft computing. You will delve into random experiments, ran-
dom variables, and different perspectives on probability. Bayesian inference, belief
networks, Markovian models, and their applications in machine learning are also
covered.
Chapter 6 – Population Based Algorithms introduces genetic algorithms and
swarm intelligence techniques. You will discover how genetic algorithms work
and explore their applications in optimization problems. Additionally, you will
dive into swarm intelligence methods, including ant colony optimization (ACO)
and particle swarm optimization (PSO), with practical Python code examples.
Chapter 7 – Rough Set Theory delves into the Pawlak Rough Set Model and its
applications in information systems, decision rules, and decision tables. You will
explore the use of rough sets in various domains such as classification, clustering,
medical diagnosis, image processing, and speech analysis.
Chapter 8 – Hybrid Systems concludes our journey by discussing hybrid sys-
tems that combine different soft computing techniques, including neuro-genetic
systems, fuzzy-neural systems, and fuzzy-genetic systems. You will also explore
their applications in medical devices.
Soft computing is a vital tool used for performing several computing operations.
It uses one or more computational models or techniques to generate optimum
outcomes. To understand this concept, let us first clarify our idea about computa-
tion. In any computation operation, inputs are fed into the computing model for
performing some operations based on which results are accordingly produced.
In the context of computing, the input provided for computation is called
an antecedent, and the output generated is called the consequence. Figure 1.1
illustrates the basics of any computing operation where computing is done using
a control action (series of steps or actions). Here, in this example, the control
action is stated as p = f (q), where “q” is the input, “p” is the output, and “f ” is
the mapping function, which can be any formal method or algorithm to solve a
problem.
Hence, it can be concluded that computing is nothing but a mapping function
that helps in solving a problem to produce an output based on the input provided.
The control action for computing should be precise and definite so as to provide
accurate solution for a given problem.
Principles of Soft Computing Using Python Programming: Learn How to Deploy Soft Computing Models
in Real World Applications, First Edition. Gypsy Nandi.
© 2024 The Institute of Electrical and Electronics Engineers, Inc. Published 2024 by John Wiley & Sons, Inc.
2 1 Fundamentals of Soft Computing
is “a collection of methodologies that aim to exploit the tolerance for imprecision and
uncertainty to achieve tractability, robustness, and low solution cost.” Prof. Zadeh
also emphasized that “soft computing is likely to play an increasingly important role
in many application areas, including software engineering. The role model for soft
computing is the human mind.” Soft computing mimics the notable ability of the
human mind to reason and make decisions in an environment of improbability
and imprecision. The principal components of soft computing include fuzzy logic,
neurocomputing, and probabilistic reasoning (PR).
If you are wondering in which areas soft computing is being used in our day-
to-day lives, the simplest and most common examples include kitchen appliances
(rice cookers, microwaves, etc.) and home appliances (washing machines, refrig-
erators, etc.). Soft computing also finds its dominance in gaming (chess, poker,
etc.), as well as in robotics work. Prominent research areas such as data compres-
sion, image/video recognition, speech processing, and handwriting recognition
are some of the popular applications of soft computing.
Case A: The car Ziva uses a software program to make movement decisions.
The path coordinates for movement decisions are already included in the soft-
ware program with the help of which Ziva can take a predefined path to arrive
at its destination. Now, suppose, while moving, Ziva encounters an obstacle in
the path. In such a case, the software program can direct it to move to either to
1.2 Soft Computing versus Hard Computing 3
the right, or to the left, or to take a back turn. In this case, the self-driving car
is not modeled to identify the nature and complexity of the obstacle to make a
meaningful and proper decision. In this situation, the computation model used
for the car is deterministic in nature, and the output is also concrete. Undoubtedly,
there is less complexity in solving the problem, but the output is always fixed due
to the rigidness of the computation method.
Case B: The car Ziva uses a software program to make movement decisions.
However, in this case, the complexity of the program is more compared to the
complexity of the program defined in Case A. This is so as the car is much more
involved in complex decision-making. Ziva can now mimic the human brain in
making decisions when any kind of obstacle is met in between its travel.
Ziva, first of all, assesses the type of the obstacle, then decides whether it can
overcome the obstacle by any means, and finally, it keeps track of if any other
alternate path can be chosen instead of overcoming the obstacle found in the
same path. The decision to be taken by Ziva is not very crisp and precise, as there
are many alternative solutions that can be followed to reach destination point B.
For example, if the obstacle is a small stone, Ziva can easily climb up the stone
and continue on the same path, as it will lead to a computationally less-expensive
solution. However, if the obstacle is a big rock, Ziva may choose an alternative to
choose another path to reach the destination point.
Case C: Now, let us consider Case C, in which the software program is written
to let the self-driving car reach its destination by initially listing out all the possible
paths available to reach from source A to destination B. For each path available,
the cost of traveling the path is calculated and accordingly sorted to reach at the
fastest time possible. Finally, the optimum path is chosen, considering the mini-
mum cost as well as considering avoidance of any major obstacle. It can be realized
that Case C appends both the cases of Case A and Case B to inherit approaches
from both cases. It also adds some functionalities to tackle complex scenarios by
choosing an optimum decision to finally reach destination point B.
The above three cases can be summarized (as listed in Figure 1.2) to check the
points of differences among each of these cases. From each of the above three
cases, it can be observed that the nature of computation in each of the three cases
is not similar.
Notice that emphasis is given on reaching the destination point in the first case.
As the result is precise and fixed, the computation of the Case A type is termed
hard computing. Now, in the second case, the interest is to arrive at an approximate
result, as a precise result is not guaranteed by this approach. The computation of
the Case B type is termed soft computing. The third case inherits the properties
of both Case A and Case B, and this part of computing is referred to as hybrid
computing. Thus, computing in perspective of computer science can be broadly
categorized, as shown in Figure 1.3.
4 1 Fundamentals of Soft Computing
As we understood that soft computing can deal with imprecision, partial truth,
and uncertainty, its applications are varied, ranging from day-to-day applications
to various applications related to science and engineering. Some of the dominant
1.3 Characteristics of Soft Computing 5
Table 1.1 Important points of differences between soft computing and hard computing.
characteristics of soft computing are listed in Figure 1.4, and a brief discussion on
each of these characteristics is given next:
(a) Human expertise: Soft computing utilizes human expertise by framing fuzzy
if–then rules as well as conventional knowledge representation for solving
real-world problems that may consist of some degree of truth or false. In short,
where a concrete decision fails to represent a solution, soft computing tech-
niques work best to provide human-like conditional solutions.
(b) Biologically inspired computational models: Computational learning
models that follow the neural model of the human brain have been studied
and framed for complex problem solving with approximation solutions. A few
such popular neural network models include the artificial neural network
(ANN)-, convolutional neural network (CNN)-, and the recurrent neural
network (RNN)-based models. These models are commonly used for solving
classification problems, pattern recognition, and sentiment analysis.
(c) Optimization techniques: Complex optimization problems that are
inspired by nature are often used as soft computing techniques. For example,
6 1 Fundamentals of Soft Computing
Human
expertise
1.0 Biologically
a) Applicable inspired
to real- computational
world models
problems 2.0
b) 7.0
Characteristics
of soft
computing Optimization
Model-free
techniques
learning
3.0
6.0
Goal-driven Fault
tolerant
5.0
4.0
genetic algorithms (GA) can be used to select top-N fit people out of a human
population of a hundred people. The selection of the most fit people is done
by using the mutation properties inspired by biological evolution of genes.
(d) Fault tolerant: Fault tolerance of a computational model indicates the
capacity of the model to continue operating without interruption, even if
any software or hardware failure occurs. That is, the normal computational
process is not affected even if any of the software or hardware components fail.
(e) Goal-driven: Soft computing techniques are considered to be goal-driven.
This indicates that emphasis is given more on reaching the goal or destina-
tion than on the path considered to be taken from the current state to reach
the goal. Simulated annealing and GA are good examples of goal-driven soft
computing techniques.
(f) Model-free learning: The training models used in soft computing need not
be already aware of all the states in the environment. Learning of a step takes
place in due course of actions taken in the present state. In other words, it can
be said that there is a teacher who specifies beforehand all the precise actions
to be taken per condition or state. The learning algorithm indirectly only has a
critic that provides feedback as to whether the action taken can be rewarded or
punished. The rewards or punishments given help in better decision-making
for future actions.
1.4 Components of Soft Computing 7
The three principal components of soft computing include fuzzy logic-based com-
puting, neurocomputing, and GA. These three components form the core of soft
computing. There are a few other components of soft computing often used for
problem solving, such as machine learning (ML), PR, evolutionary reasoning, and
chaos theory. A brief summary of all these components of soft computing tech-
niques is explained next, along with an illustrative diagram, as given in Figure 1.5.
While fuzzy computing involves understanding fuzzy logic and fuzzy sets,
neural networks include the study of several neural network systems such as
artificial neural network (ANN) and CNN. Evolutionary computing (EC) involves
a wide range of techniques such as GA and swarm intelligence. Techniques for
ML are categorized mainly as supervised learning (SL), unsupervised learning,
and reinforcement learning (RL). Soft computing also involves a wide variety of
techniques such as chaos theory, PR, and evolutionary reasoning.
Components of
soft computing
Fully profitable
Is the XYZ courier service profitable?
Moderately profitable
Yes
(Value: 0.75)
(Value: 1)
Neither profitable nor
unprofitable (Value: 0.5)
No
Moderately unprofitable
(Value: 0)
(Value: 0.25)
Fully unprofitable
(Value: 0)
Figure 1.6 (a) Boolean (nonfuzzy) and (b) fuzzy logic-based solutions for a problem.
Let us understand this simple concept with the help of an example. For instance,
if we consider the question, “Is the XYZ Courier Service Profitable?” the reply to
this question can be simply stated as either “Yes” or “No.” If only two close-ended
choices are provided for this question, it can be considered as value 1 if the answer
given is “Yes” or 0 if the answer given is “No.” However, what if the profit is not
remarkably well, and only a moderate profit is incurred from the courier service?
If we have a deeper look at the question, there is a possibility that the answer can
be within a range between 0 and 1, as the amount of profitability level may be not
totally 100% profitable or 100% unprofitable. Here, the role of fuzzy logic comes
into play where the values can be considered in percentages (say, neither profit
nor loss, i.e., 0.5). Thus, fuzzy logic tries to deal with real-world situations, which
consider partial truth as a possible solution for a problem.
Figure 1.6(a) illustrates the two outcomes provided for the question “Is the
XYZ Courier Service Profitable?” The solution provided for the question in
this case is Boolean logic based, as only two extreme choices are provided for
responses. On the other hand, Figure 1.6(b) illustrates the various possibilities of
answers that can be provided for the same question “Is the XYZ Courier Service
Profitable?” Here, the concept of fuzzy logic is applied to the given question by
providing a few possibilities of answers such as “fully unprofitable,” “moderately
unprofitable,” “neither profitable nor unprofitable,” “moderately profitable,” and
“fully profitable.” The class membership is determined by the fuzzy membership
function. As seen in Figure 1.6(b), the membership degree (e.g., 0, 0.25, 0.5, 0.75,
and 1) is taken as output value for each response given.
One common example of using fuzzy sets in computer science is in the field
of image processing, specifically in edge detection. Edge detection is the process
of identifying boundaries within an image, which are areas of rapid-intensity
1.4 Components of Soft Computing 9
changes. Fuzzy logic can be used to make edge detection more robust and
accurate, especially in cases where the edges are not clearly defined. Let us
consider a grayscale image where each pixel’s intensity value represents its
brightness. To detect edges using fuzzy logic, one might define a fuzzy set for
“edgeness” that includes membership functions like “definitely an edge,” “possibly
an edge,” and “not an edge”. In such a case, the membership functions can be
defined as follows:
(a) Definitely an edge: If the intensity difference is high, the pixel is more likely
to be on an edge.
(b) Possibly an edge: If the intensity difference is moderate, the pixel might be
on an edge.
(c) Not an edge: If the intensity difference is low, the pixel is unlikely to be on
an edge.
Using these membership functions, you can assign degrees of membership to
each pixel for each of these fuzzy sets. For instance, a pixel with a high-intensity
difference would have a high degree of membership in the “definitely an edge”
fuzzy set.
A crisp set, as you may know, is a set with fixed and well-defined boundaries.
For instance, if the universal set (U) is a set of all states of India, a crisp set may be
a set of all states of North-East India for the universal set (U). A crisp set (A) can
be represented in two ways, as shown in Equations (1.1) and (1.2)
A = {a1 , a2 , a3 , … , an } (1.1)
A = {x|P(x)} (1.2)
Here, in Equation (1.2), the crisp set “A” consists of a collection of elements
ranging from a1 to an . Equation (1.2) shows the other way of representing a crisp
set “A,” where “A” consists of a collection of values of “x” such that it has got the
property P(x).
Now, a crisp set can also be represented using a characteristic function, as shown
in Equation (1.3):
{
1, if x belongs to A
𝜇A′ (x) = (1.3)
x, if x does not belong to A
A fuzzy set is a more general concept of the crisp set. It is a potential tool to
deal with uncertainty and imprecision. It is usually represented by an ordered pair
where the first element of the ordered pair represents the element belonging to a
set, and the second element represents the degree of membership of the element
to the set. The membership function value may vary from 0 to 1. Mathematically,
′
a fuzzy set A is represented as shown in Equation (1.4).
{
A′ = x, 𝜇A′ (x)|| xX} (1.4)
10 1 Fundamentals of Soft Computing
Here, the membership function value indicates the degree of belongingness and is
denoted by 𝜇A′ (x). Here, in Equation (1.4), “X” indicates the universal set, which
consists of a set of elements “x.” A membership function can either be any stan-
dard function (for example, the Gaussian function) or any user-defined function
in requirement to the problem domain. As this membership function is used to
represent the degree of truth in fuzzy logic, its value on the universe of discourse
“X” is defined as:
𝜇A′ (x) = [0, 1] (1.5)
Here, in Equation (1.5), each value of “X” represents an element that is mapped
to a value between 0 and 1.
The above explanations lead us to the understanding that a fuzzy set does
not have a crisp, clearly defined boundary; rather it contains elements with
only a partial degree of membership. Some of the standard properties of fuzzy
sets include commutative property, associative property, distributive property,
transitivity, and idempotent property. There are few other properties of fuzzy sets
that will be elaborately discussed in Chapter 2.
Also, there are three standard fuzzy set operators used in fuzzy logic – fuzzy
union, fuzzy intersection, and fuzzy complement. In case of complement oper-
ation, while a crisp set determines “Who do not belong to the set?,” a fuzzy set
determines “How many elements do not belong to the set?” Again, in case of union
operation, while a crisp set determines “Which element belongs to either of the set?,”
a fuzzy set determines “How much of the element is in either of the set?” Lastly, in
case of intersection operation, while a crisp set determines “Which element belongs
to both the sets?,” a fuzzy set determines “How much of the element is in both the
sets?” These fuzzy operations will also be elaborately discussed in Chapter 2.
Fuzzy logic systems have proved to be extremely helpful in dealing with
situations that involve decision-making. As some problems cannot be solved by
simply determining whether it is True/Yes or False/No, fuzzy logic is used to
offer flexibility in reasoning in order to deal with uncertainty in such a situation.
The applications of fuzzy logic are varied, ranging from domestic appliances to
automobiles, aviation industries to robotics.
Dendrites
Synapse
Axon
interconnection of one neuron with other neurons). The different parts of a neuron
are illustrated in Figure 1.7. A neuron gets fired only if certain conditions are met.
The signals received on each synapse may be of excitatory or inhibitory type.
When the excitatory signals exceed the inhibitory signals by certain quantified
threshold value, the neuron gets fired. Accordingly, either positive or negative
weights are assigned to signals – a positive weight is assigned to excitatory signals,
whereas a negative weight is assigned to inhibitory signals. This weight value indi-
cates the amount of impact of a signal on excitation of the neuron. The signals
multiplied by the weight in all the incoming synapse is summed up to get a final
cumulative value. If this value exceeds the threshold, then the neuron is excited.
This biological model has been mathematically formulated to accomplish optimal
solutions to different problems and is technically termed as “Artificial Neural Net-
work (ANN).” ANN has been applied in a large number of applications such as pat-
tern matching, pattern completion, classification, optimization, and time-series
modeling.
A simple example of an ANN is given in Figure 1.8. The nodes in ANN are orga-
nized in a layered structure (input layer, hidden layer, and output layer) in which
each signal is derived from an input and passes via nodes to reach the output.
Each black circular structure in Figure 1.8 represents a single neuron. The sim-
plest artificial neuron can be considered to be the threshold logic unit (TLU). The
TLU operation performs a weighted sum of its inputs and then outputs either a “0”
or “1.” An output of “1” occurs if the sum value exceeds a threshold value and a
“0” otherwise. TLU thus models the basic “integrate-and-fire” mechanism of real
neurons.
The basic building block of every ANN is the artificial neuron. At the entrance
section of an artificial neuron, inputs are assigned weights. For this, every input
value is multiplied by an individual weight (Figure 1.9). In the middle section of
the artificial neuron, a sum function is evaluated to find the sum of all the weighted
12 1 Fundamentals of Soft Computing
Input 1
Input 2 Output
Input 3
Input 1 x
Bias
inputs and bias. Next, toward the exit of the artificial neuron, the calculated sum
value is passed through an activation function, also called a transfer function.
ANN provides a simplified model of the network of neurons that occur in the
human or animal brain. ANN was initially found with the sole purpose of solving
problems in the same way that a human or animal brain does. However, more
and more research on ANN has led to the deviation of ANN from biology to solve
several challenging tasks such as speech recognition, medical diagnosis, computer
vision, and social network filtering.
Crossover Mutation
over time, and each variant is suitable for more specific types of problems and
data structures. At times, two or more evolutionary algorithms (EA) are applied
together for problem solving in order to generate better results. This makes EC
very popular in computer science, and a lot of research is explored in this area.
In general, EA mimic the behavior of biological species based on Darwin’s theory
of evolution and natural selection mechanism. The four main steps involved in EA
include – initialization, selection, use of genetic operators (crossover and mutation),
and termination. Each of these chronological steps makes an important contribu-
tion to the process of natural selection and also provides easy ways to modularize
implementations of EA. The four basic steps of EA are illustrated in Figure 1.10,
which begins with the initialization process and ends with the termination process.
The initialization step of EA helps in creating an initial population of solutions.
The initial population is either created randomly or created considering the ideal
condition(s). Once the population is created in the first step, the selection step is
carried out to select the top-N population members. This is done using a fitness
function that can accurately select the right members of the population. The next
step involves use of two genetic operators – crossover and mutation – to create
the next generation of population. Simply stated, these two genetic operators help
in creating new offspring from the given population by introducing new genetic
material into the new generation. Lastly, the EA involve the termination step to end
the process. The termination step occurs in either of the cases – the algorithm has
reached some maximum runtime, or the algorithm has reached some threshold
value based on performance.
Independent research work on EA led to the development of five main streams
of EA, namely, the evolutionary programming (EP), the evolution strategies
(ES), swarm intelligence, the GA, and the differential evolution (DE) (as shown
in Figure 1.11). A brief discussion on each of these subareas of EA is discussed in
the later part of this section.
● Evolutionary programming: The concept of EP was originally conceived by
Lawrence J. Fogel in the early 1960s. It is a stochastic optimization strategy
14 1 Fundamentals of Soft Computing
Evolutionary
programming
Evolutionary algorithms
Artificial bee
Swarm intelligence colony
Particle swarm
Genetic algorithms
optimization
Differential evolution
similar to GA. However, a study is made on the behavioral linkage of parents and
offspring in EP, while genetic operators (such as crossover operators) are applied
to produce better offspring from given parents in GA. EP usually involves four
main steps, as mentioned below. Step 1 involves choosing an initial population
of trial solutions. Step 2 and Step 3 are repeated either until a threshold value
for iteration exceeds or an adequate solution for the given problem is obtained:
⚬ Step 1: An initial population of trial solutions is chosen at random.
⚬ Step 2: Each solution is replicated into a new population. Each of these off-
spring solutions is mutated.
⚬ Step 3: Each offspring solution is assessed by computing its fitness.
⚬ Step 4: Terminate.
The three common variations of EP include the Classical EP (uses Gaussian
mutation for mutating the genome), the Fast EP (uses the Cauchy distribution
for mutating the genome), and the Exponential EP (uses the double exponential
distribution as the mutation operator). A few of the common application areas
of EP include path planning, traffic routing, game learning, cancer detection,
military planning, combinatorial optimization, and hierarchical system design.
● Evolution strategies: Evolution strategies (ES) is yet another optimization
Obstacle
Food
Nest
to the optimization problem, and the amount of nectar in the food sources
decides the quality or fitness of the given solution. In fact, the quality of
a food source depends on many factors, such as the amount of food source
available, the ease of extracting its nectar, and also its distance from the nest.
Depending on the number of food sources, the same number of employed
bees is chosen to solve a problem. It is the role of employed bees to carry on
the information about the quality of the food source and share this informa-
tion with the other bees.
The unemployed bees also play an active role in the food hunt. One type
of unemployed bee is the scout, which explores the environment near the
nest in search of food. The other type of unemployed bee is the onlooker,
which waits in the nest to get information about the quality of food sources
from the employed bees and establish the better food sources. Communica-
tion among bees related to the quality of food sources takes place through
the famous “waggle dance” of honey bees. This exchange of information
among the three types of bees is the most vital occurrence in the formation
of collective knowledge.
● Genetic algorithms: The concept of genetic algorithms (GA) was proposed by
John Holland in the 1960s. Later, Holland along with his colleagues and stu-
dents developed the concepts of GA at the University of Michigan in the 1960s
and 1970s as well. A genetic algorithm is a metaheuristic that is inspired by
Charles Darwin’s theory of natural evolution. GA are a part of the larger class of
EA that emphasize on selecting the fittest individuals for reproduction in order
to produce offspring. The generated offspring inherit the characteristics of their
parents and is therefore expected to have better fitness if the parents do have
good fitness values. Such offspring, in turn, will have a better chance of sur-
vival. If this process continues to repeat multiple times, at some point in time, a
generation of the fittest individuals will be formed.
There are basically five main phases of GA (as illustrated in Figure 1.13): pop-
ulation initialization, fitness function calculation, parent selection, crossover,
and mutation. Initially, a random population of size “n” consisting of several
individual chromosomes is chosen. Next, the fitness value of each of the indi-
vidual chromosomes is calculated based on a fitness function. The fitness value
plays a vital role in the decision-making of the selection of chromosomes for
crossover.
In the crossover phase, every two individual chromosomes selected are repro-
duced using a standard crossover operator. This results in the generation of two
offspring from each pair of chromosomes. The new offspring generated are then
mutated to produce a better set of individual chromosomes in the newly gener-
ated population. These entire five phases of GA are repeated until a termination
condition is met. Each iteration of the GA is called a generation, and the entire
18 1 Fundamentals of Soft Computing
Crossover
Mutation
set of generations is called a run. The final output (result) is the generation of
the fittest individuals that have the greatest chance of survival.
● Differential evolution: Differential evolution (DE) is a common evolutionary
algorithm stimulated by Darwin’s theory of evolution and has been studied
widely to solve diverse areas of optimization applications since its inception
by Storn and Price in the 1990s. The various steps involved in DE include
population initialization, mutation, crossover, selection, and result generation
(illustrated in Figure 1.14). Prior to applying these basic steps, the parameters
of DE need to be defined, such as the population size, the selection method,
the crossover method, and the perturbation rate (the weight applied to random
differential).
There are various popular variants of DE, some of which are mentioned below:
● The standard differential evolution (DE)
● The self-adaptive control parameters differential evolution (JDE)
● The adaptive differential evolution with optional external archive (JADE)
● The composite differential evolution (CODE)
● The self-adaptive differential evolution (SADE)
The applications of DE are varied, including synthesis and optimization of
heat-integrated distillation system, optimization of an alkylation reaction, digital
Population Fitness
initialization evaluation Mutation
Result Crossover
(fittest solution) Selection
Cluster 1
Cluster 2
Machine learning
algorithm
Cluster 3
Cluster 4
Figure 1.15 Machine learning algorithm used for training data to form clusters.
20 1 Fundamentals of Soft Computing
Machine learning
algorithm
Figure 1.16 Machine learning algorithm used for classifying email as spam or
legitimate.
or not spam. Once the algorithm gets fully trained and shows high accuracy in
prediction, this algorithm is now all ready to be used for such similar predictions
for the future.
The contribution of ML right from solving day-to-day tasks to solving complex
real-life problems is tremendous. In fact, many home appliances, health care
monitoring systems, mobile apps, and internet services heavily rely on using
ML. Also, popular virtual personal assistants such as Alexa, Siri, and Google Now
rely dominantly on the techniques of ML. These popular virtual assistants are a
perfect example of the usage of advanced ML, as it has a number of capabilities
that include voice interaction, playing audio, answering the door, dimming the
lights of a room, and reading the latest headlines. Again, traffic predictions using
GPS navigation services use ML techniques to provide live data to users regarding
traffic congestion while traveling. ML algorithms also help companies develop
chatboxes to solve user queries. It is expected that the contribution of ML in the
near future will continue exceeding, and researchers have to extensively depend
on such ML algorithms to build innovative tools and techniques.
There are mainly four types of ML – SL, unsupervised learning, semi-supervised
learning, and RL. Under the umbrella of SL are classification and regression,
which use a dataset having known inputs and outputs. Unsupervised learning, on
the other hand, uses a dataset to identify hidden patterns. Under the umbrella of
unsupervised learning falls clustering and association analysis. Semi-supervised
learning lies between SL and unsupervised learning and handles the drawbacks
of both these types of ML techniques.
Figure 1.17 illustrates the various types of ML used for different variety of data
and problems. All these types of ML have a special role to perform, which is
explained in brief next. Let us now try to understand these four types of ML in brief.
● Supervised learning (SL): Most of the ML techniques are based on SL, which
works on the basis of supervision. Basically, supervised learning techniques
train machines using “labeled” datasets. Such datasets have input variables
that are used by a mapping function to derive the output variable(s). This can
be mathematically expressed as P = f (Q), where Q is the input data, and P is the
1.4 Components of Soft Computing 21
Types of
machine learning
Classification Clustering
Regression Association
analysis
output. SL thus uses the input variables and the corresponding output having
“labeled” data to train machines by approximating the mapping function.
The training is carried out accurately to an extent such that when a new input
data (q1) is fed, a perfect prediction can be made to display the output variable
(P) for that data (q1).
To clear the idea of SL, let us consider a simple example. Let us assume that a
dataset that consists of images of three varying animals – say, dog, goat, and cat,
which are provided as input to the machine. The output variable, also called
the labeled variable, stores the values as either “dog,” “goat,” or “cat.” Now, a
SL model is trained with this labeled dataset that can differentiate among these
three animals and correctly predict the output. This learning model is illustrated
in Figure 1.18, in which the labeled data are trained, and the model is tested with
a test dataset (unlabeled data) to check the accuracy of the predicted output once
the training is completed. If the accuracy of prediction is very high, the model
can be set to be trained and ready for use for future predictions.
There are two main notable techniques of supervised ML – classification and
regression. Both these techniques have a similar goal of predicting the output
(dependent attribute) based on the series of input data provided. Classification
deals with prediction of discrete class label(s), whereas regression deals with
prediction of continuous quantity. Also, a classification problem is mainly eval-
uated using accuracy as the evaluation metric, whereas a regression problem is
usually evaluated using root mean square error (RSME).
(a) Classification: Classification is a type of supervised ML as it considers
“labeled” data to perform the task of prediction of output. The “labeled”
22 1 Fundamentals of Soft Computing
Prediction
Dog
Cat
Training Goat
Goat model
Dog
Cat
Dog
Goat
Dog Predicted output
Labeled data Test data
variables are termed as classifiers, which play a major role in training the
algorithm. It approximates a mapping function (f ) from input variables (Q)
to discrete output variables (P). For a given observation, the primary task of
classification is to predict the value of class. The technique of classification
is applied in many significant areas where new observations are needed to
be categorized, such as spam filtering, face detection, credit approval, fraud
detection, optical character recognition, market segmentation, and so on.
For a given observation, the primary task of classification is to predict the
value of class.
As shown in Figure 1.18, the problem given is of classification in which
the output to be obtained belongs to any of the three classes – cat, dog, or
goat. Another example of a problem of classification would be if the output
to be predicted is either Yes or No, such as “Diabetes” or “No Diabetes,” “Pro-
vide Loan” or “Do not Provide Loan,” “Spam Mail” or “Legitimate Mail,”
and so on.
Classification techniques are further classified under two models – the
lazy learners and the eager learners. In the case of lazy learning model, the
training time taken is comparatively less; however, the prediction time
is more compared to the eager learning model. Examples of lazy learners
include the k-Nearest Neighbor (kNN) classification model, and case-based
learning model. Eager learners construct the classification model from the
given training data even before receiving any test data. Examples of eager
learners include decision trees, Naïve Bayes, and ANNs.
(b) Regression: In regression, the main task is to approximate a mapping
function ( f ) from input variables (X) to a continuous output variable (Y ).
The continuous output variable (Y ) should denote a quantity and has to
be a real value, such as an integer or floating-point value. Given a new
set of input values, regression can make a prediction of the corresponding
quantitative output (y), based on the study of previous corresponding (x, y)
1.4 Components of Soft Computing 23
Standard regression
techniques
Cluster 1
Train
Generate
model
clusters
Cluster 2
Dataset
(without labels) Cluster 3
Predicted output
Actions
Reward
and RL is that SL makes a decision based on the initial input provided, whereas
RL makes a decision sequentially by considering the inputs generated at every
new phase of RL. The decisions made in RL at each level are independent of
each other, whereas the decisions made in SL rely on the decisions made at the
previous level.
This is called Bayes rule and is often used for updating a belief about a hypothesis
Q in the light of new evidence R.
Bayesian networks provide a natural representation of (casually induced)
conditional independence. It has replaced many rule-based systems by being less
rigorous and more robust. However, one major limitation of a Bayesian network
is that it typically requires initial knowledge of many probabilities. Another issue
is that the output is also largely dependent on the quality and extent of prior
knowledge.
● Chaos theory: Chaos theory is well-suited to be used for problems that are
highly sensitive to initial conditions. In such a case, a slight difference in ini-
tial conditions (for example, a change in initial value in the second place after
the decimal point) leads to highly diverging outcome. The chaotic behavior can
be experienced in our nature, such as changes in weather. Robert L. Devaney has
classified a dynamic system as chaotic based on the following three properties:
– It must be sensitive to initial conditions (the “butterfly effect”): The data points
in a chaotic system are arbitrarily in close approximation to each other with
significantly different future paths.
– It must be topologically mixing: The topological transitivity or topological mix-
ing relates to the evolution of the system over time such that any given region
may eventually overlap with another region.
– It must have dense periodic orbits: Every point in the space is approached arbi-
trarily closely by periodic orbits.
To sum up, chaos theory as defined by Kellert is “the qualitative study of
unstable aperiodic behavior in deterministic nonlinear systems” (Kellert 1993,
p. 2). As understood, a chaotic system is nonlinear and sensitive to initial
conditions. There is also no periodic behavior in such systems, and the motion
remains random. Considering these characteristics, a few applications based on
chaos theory include observation of weather patterns, stock market predictions,
algorithmic trading, bird migration patterns, observation of social phenomena,
robotics, and study of brain waves.
● Evidential reasoning: Evidential reasoning (ER) is a recent approach that
has been developed mainly on the basis of AI, decision theory, statistical
analysis, and computer technology. In decision theory, ER approach is a
generic evidence-based multi criteria decision analysis (MCDA) approach
and can deal with problems having uncertainties that include randomness
and ignorance. ER supports assessments, decision analysis, and evaluation
activities. For instance, ER contributes to the environmental impact assessment
for developing a proposal or a project related to the environment.
The ER approach constitutes the modeling framework of multi-criteria
decision-making (MCDM) problems using the following concepts:
Exploring the Variety of Random
Documents with Different Content
philanthrope doit avoir passé par là. Ce ne sont qu’écoles publiques,
hôpitaux, maisons d’orphelins, d’enfants trouvés et d’ouvriers,
sociétés bibliques et fondations de charité. Et tout cela ressemble à
des palais : la douane même et les usines qui entourent le port
présentent les mêmes proportions monumentales. Ce sont bien, en
effet, les palais de cette ville commerçante, grandie par la pêche du
hareng et le négoce avec les Indes, trop jeune et trop souvent
rebâtie, à la suite de ses désastres, pour avoir des édifices
historiques, et faisant de sa richesse l’usage intelligent et pratique de
ces grands industriels qui achètent rarement un tableau, et n’ont
point le sens artistique ou pittoresque aussi développé qu’on le
souhaiterait peut-être, mais qui fondent autour d’eux des crèches,
des ouvroirs, des asiles et des hospices.
Cependant Gotheborg a un musée, mais là encore le caractère
pratique et positif apparaît. On l’a installé dans l’ancien bâtiment de
la Compagnie des Indes, — un spécimen curieux des vieilles maisons
en briques de la ville primitive — côte à côte avec les bureaux du
télégraphe et l’école des arts et métiers ; et ce musée universel, qui
est l’établissement favori des Gothembourgeois, celui qu’ils montrent
avec le plus de complaisance et dont ils parlent avec le plus
d’orgueil, a fait à l’histoire et à la science une plus large place qu’à
l’art.
La galerie de tableaux, composée presque exclusivement de
noms scandinaves et contemporains, serait d’un attrait fort médiocre
sans un chef-d’œuvre sui generis dont le souvenir me charme encore
aujourd’hui. C’est une toile d’assez grande dimension, datée de 1864
et signée du nom d’Ekman, un artiste finnois de quelque renommée
en son pays. Sur le premier plan, un marin anglais présente une
Bible à un Italien en chemise rouge, qui avance la main droite pour
la prendre, tout en serrant de la gauche le drapeau national sur son
cœur. Au second plan, le pape, coiffé de sa tiare, s’interpose d’un air
farouche entre l’Italien et l’Anglais, et s’efforce d’écarter le bras de
l’hérétique. Mais celui-ci persiste avec énergie, et, dans le fond,
Notre-Seigneur descend du haut des cieux, en tendant une palme au
courageux marin anglais, pour le consoler des mauvais traitements
du pape. Cette simple esquisse suffira, je l’espère, à faire
comprendre l’hilarité douce dont je fus saisi tout à coup, et que mes
guides partagèrent d’ailleurs de très-bonne grâce.
Pic de la Mirandole eût pu trouver dans le Musée de Gotheborg
un ample sujet à ses dissertations de omni re scibili et quibusdam
aliis. A côté des tableaux et des plâtres d’après l’antique, on y voit
une précieuse collection d’objets de l’âge de pierre, de l’âge de fer et
de l’âge de bronze, de haches en silex, d’épées scandinaves, de
monuments runiques ; des hommes fossiles et des oiseaux
empaillés, des monstres qui font reculer la nature d’horreur et des
fœtus confits dans de l’esprit-de-vin ; un cabinet de médailles et une
galerie d’histoire naturelle, dont le morceau principal est la carcasse
d’une énorme baleine, échouée jadis sur la plage de Gotheborg, où
elle resta prise dans la vase, et qui exhale encore, après bien des
années, une odeur presque suffocante.
C’est ainsi que toujours, dans la seconde ville de Suède, se mêle
le grave au doux et l’aimable à l’utile. Les commerçants qui l’ont
fondée et qui l’administrent n’y ont point oublié l’agrément. Partout
s’ouvrent des squares, s’étendent des parcs et de belles
promenades. Le petit lac sur lequel elle est bâtie s’y distribue en
canaux ombragés qui parcourent la ville en tous sens. Gotheborg a
été construit suivant le système hollandais, et ce n’est pas seulement
par ses nombreux canaux, mais par ses maisons en briques et le
caractère général de son architecture, plus solide qu’élégante, par le
nombre de ses établissements charitables, par l’amour de la vie
confortable et du chez soi, par le climat humide et le sol
marécageux, par le développement de son commerce maritime et
jusque par le flegme de ses habitants, que ce coin de la Suède
rappelle les Pays-Bas.
Les temples de Gotheborg sont coiffés à peu près uniformément
de ce clocher rococo, sans style et sans caractère, qu’on rencontre si
souvent en Suède. Le plus beau et le plus grand est la cathédrale de
Gustave, comme la plus grande et la plus belle place de la ville est
celle de Gustave-Adolphe, décorée d’une statue en bronze du roi
conquérant. Parmi les monuments qui l’entourent, celui qui l’emporte
par son luxe architectural, même sur l’hôtel de ville et la Bourse, est
la maison d’un simple particulier. Beaucoup de commerçants
gothembourgeois sont puissamment riches, mais le peuple, qui
profite de leurs richesses, ne songe pas à les leur reprocher : « Ceci,
me disait mon guide, en m’arrêtant devant un édifice de belle
apparence, est un hôpital, et ceci une école fondée par le commerce
de la ville. — Vous avez vu le château et le parc de la famille
Dickson, la plus riche de Gotheborg ; allons voir maintenant les
maisons qu’elle a élevées pour les ouvriers. — Regardez notre port,
me disait-il aussi, en s’asseyant à côté de moi sur une colline d’où
l’on dominait la mer, l’embouchure du Gotha, la ville entière avec ses
monuments, ses quais, ses ponts, ses canaux, ses promenades et sa
large rue de Sodra Hamngatan, bordée de maisons opulentes. Tous
ces bateaux sont à nous. La flotte marchande de Gotheborg
l’emporte aujourd’hui sur celle de Stockholm. Et voici là-bas les
vaisseaux que nous faisons équiper à nos frais pour une expédition
scientifique au pôle Nord. »
Le soir, avant de partir, nos amis nous entraînèrent au beau
théâtre de Gotheborg. En Suède, comme dans le reste de l’Europe,
la littérature de Scribe et la musique d’Offenbach ont conquis leur
droit de cité : d’étape en étape, la Belle Hélène est arrivée jusqu’au
pôle. Mais, ce soir-là, j’eus l’heureuse chance de voir jouer par des
acteurs indigènes un drame national. C’était, autant qu’il m’en
souvienne, le Sigurd Ring de Stagnelius. Sigurd, roi de Suède, a
rencontré dans une fête la jeune et belle Norvégienne Alfsol ; il est
frappé au cœur par le trait parti des yeux bleus de l’enfant, et il
demande sa main. Mais Sigurd a la barbe blanche, et les frères
d’Alfsol le repoussent avec mépris. Alors le vieux roi fait appel à ses
soldats et marche à leur tête pour enlever celle qu’il aime. Il
s’avance, répandant la terreur sur son passage ; les Norvégiens
tremblent à l’approche du héros, et, se sentant vaincus d’avance, ils
empoisonnent Alfsol au moment du combat, pour dérober à leur
ennemi le prix du triomphe. Sigurd se bat comme un lion, met
l’armée norvégienne en déroute et se précipite aussitôt vers la tente
de la jeune fille. Il ne trouve que son cadavre inanimé. Le chœur,
comme une nourrice qui berce son enfant malade pour l’endormir,
chante doucement le calme du tombeau et le repos bienheureux
qu’on trouve dans le sommeil de la mort. Alors le vieux viking, sans
pousser une plainte, sans verser une larme, soulève la blonde Alfsol
dans ses bras nerveux, l’emporte sur son vaisseau et va se faire
engloutir avec elle par la tempête dans le sein de la mer. Un souffle
profond de mélancolie traverse cette légende des temps héroïques
et barbares, qui me remit vivement sous les yeux, au moment de
quitter la Suède, l’image de la vieille Scandinavie trop longtemps
oubliée.
Une demi-heure après, nous montions sur le bateau la Freya, où
nous avaient précédés nos bagages. La mer était admirablement
tranquille. Jusqu’à trois heures du matin, je restai accoudé sur le
pont, regardant le sillage étincelant de la roue à la surface du flot
sombre et, derrière nous, les lumières et les phares de la côte de
Suède ; rêvant à la mythologie primitive, à Niord et aux dieux Vanes,
nés de cette mer que nous traversons. Presque au sortir du port, la
Freya effleure dans l’ombre un petit bateau qui ne s’est point rangé
assez vite et qu’il manque de couper en deux : la malheureuse
barque tournoie éperdue dans le remous des vagues, et se
cramponne de toutes ses rames à l’entrée du tourbillon qui voudrait
l’avaler. Entre trois et quatre heures, la houle commence à se faire
sentir. Nous pénétrons dans le Cattégat, redoutable aux passagers
novices, et il semble vouloir rester fidèle à sa mauvaise renommée.
Après une résistance de quelques minutes, je jugeai prudent d’aller
chercher un asile et une protection dans les bras du sommeil.
Je m’insinuai donc péniblement en l’un de ces cadres étroits qui
ressemblent aux tiroirs d’une commode. A peine avais-je fermé l’œil,
qu’un rêve bizarre et pénible, vrai cauchemar scandinave, formé par
la triple collaboration du bruit et du mouvement de la machine, du
trouble naissant de mon estomac et des impressions toutes fraîches
que j’avais emportées du théâtre de Gotheborg, vint s’abattre sur
moi.
Je rêvais que je montais de la terre au ciel sur le pont Baffrost,
que garde le géant Heimdal. J’arrivais au pied du chêne Yggdrasil,
dont les rameaux recouvrent l’univers entier, et dont les racines
traversent l’abîme. Sur le chêne était perché l’aigle qui sait tout, et
sous le chêne était assis Odin, avec ses deux corbeaux et son cheval
à huit pieds, entouré des nombreux enfants qu’il doit à la fécondité
de son épouse, la belle Freya. Dans mon rêve, Odin, borgne, roux et
farouche, rappelait, à s’y méprendre, la physionomie du célèbre
directeur d’une grande revue parisienne, qu’il est inutile de nommer.
Freya, la déesse de beauté, m’apparaissait sous les traits d’une
sybille à hélice et à roulettes, où se confondaient, en un horrible
amalgame, la figure de la Vénus septentrionale et celle du bateau
qui portait son nom. Odin fixait sur moi son œil unique, autour
duquel rayonnaient les prunelles immobiles et flamboyantes de
l’aigle et des corbeaux, et sous l’action de ces fauves regards, qui
me dévoraient comme le feu, je me sentais maigrir et fondre
d’épouvante. Mon corps s’évaporait en fumée, et se trouvait réduit
peu à peu à l’état d’une tige flexible, plus mince qu’une branche de
bouleau. Tout à coup, des racines du chêne où elles se tenaient
couchées, s’élançaient trois déesses redoutables, les Nornes
scandinaves : armées de longs ciseaux, comme la Parque classique,
elles voltigeaient autour de moi, marmottant les syllabes des runes
sacrées, et s’efforçant à l’envi de couper le fil qui composait mon
corps. Situation horrible et pleine d’angoisses ! Saisi de vertige, ivre
de terreur, je bondissais pour échapper au tranchant fatal, poursuivi
par le tourbillon vivant qui se rapprochait toujours. Les corbeaux
croassaient des ricanements sinistres ; l’œil d’Odin pétillait d’une joie
sauvage ; l’aigle lui-même poussait des cris d’anthropophage en
gaieté, et aiguisait son bec comme pour se préparer à un bon repas.
Un coup violent me réveilla en sursaut. Dans l’élan de cette
danse désordonnée, j’avais cogné du front contre la paroi supérieure
de mon cadre. Je sautai à bas du lit, heureux d’en être quitte pour
une bosse. Le soleil se levait, à demi plongé encore dans les flots de
la mer. Au loin, à travers un rideau de brume, cinq ou six voiles
apparaissaient çà et là, les unes immobiles, pareilles à des maisons
blanches sur la côte ; les autres rasant les flots, avec un mouvement
onduleux et doux, comme l’aile d’une mouette ou d’un albatros. Puis
Helsingborg éleva sur la gauche la haute tour quadrangulaire de son
église et le formidable bastion en ruines, seul débris qui reste de ses
vieilles fortifications. Vers dix heures, les flèches élancées et évidées
de Kronsborg jaillirent de l’autre côté du Sund, et presque aussitôt
on aperçut Elseneur, développant sur la plage ses lignes de maisons
peintes, entre deux moulins à vent qui égayaient encore ce riant
tableau, aussi peu shakespearien que possible, malgré le souvenir
d’Hamlet. A midi, nous débarquions à Copenhague, et, après avoir
serré la main à nos amis danois, nous repartions le soir vers la
France.
DE PARIS
A L’EXPOSITION DE VIENNE
JOURNAL D’UN CHRONIQUEUR EN VOYAGE
1873.
Strasbourg, 5 et 6 juillet.
Baden-Baden, 7 et 8 juillet.
Carlsruhe, 10 juillet.
LE DRAME D’OTTERSWEYER.
C’était mercredi dernier, par une de ces journées meurtrières où
le soleil change les wagons en rôtissoires. Il faisait un temps à ne
pas mettre un Cafre dehors. J’avais pris un billet pour Carlsruhe, et
je cuisais consciencieusement dans mon coin. A Oos, le train s’arrête
et tout le monde descend. Je fais comme tout le monde. Rivé à mes
deux valises ainsi qu’un forçat à ses fers, la gibecière et la jumelle se
croisant en bandoulière sur ma poitrine, le parapluie sous le bras, le
paletot jeté sur l’épaule, je cherche sur le quai l’ombre d’un poteau,
comme l’Arabe cherche au désert l’ombre d’un palmier.
Tandis que je souffle et m’éponge, un autre train arrive en gare.
Tout le monde se précipite et l’envahit en un clin d’œil ; mon premier
mouvement est de faire encore comme tout le monde. Néanmoins,
en homme prudent et qui ne donne rien au hasard, j’interroge un
employé qui passe : « Carlsruhe ? — Ia. » Je ressaisis vaillamment les
deux valises, la gibecière, la jumelle, le parapluie, le par-dessus, le
Livret-Chaix, le Guide-Joanne, et je m’insinue, en me faisant hisser
par cet employé complaisant, dans un wagon déjà presque plein, où
mon entrée parmi d’autres compagnons de voyage non moins
fournis en colis que moi produit l’effet de la tête de Méduse.
« Carlsruhe ? » redemandé-je encore d’un air aimable, avant
même de m’asseoir. Six de mes compagnons restent muets : ils
n’ont pas compris, malgré toute mon application à bien donner
l’accent germanique. Le septième n’a pas compris davantage, mais il
ne veut pas l’avouer, même par son silence. « Ia », répond-il. Là-
dessus, ma conscience est en repos : je fourre une valise entre mes
jambes, j’installe l’autre sur mes genoux, — la seule place qui reste
disponible, — et je me rasseois, avec un soupir de soulagement,
dans l’éternel rayon de soleil qui recommence aussitôt mon
ébullition.
Une station se passe, puis une deuxième, puis une autre encore.
A la gare de Bühl, le train se livre, avec la placidité germanique, à
une interminable et incompréhensible manœuvre qui dure près de
trois quarts d’heure. Je trouve le temps long, le soleil chaud et ma
valise lourde. Vers la fin de la manœuvre, un employé se montre à la
portière et demande les billets. C’est le même que j’ai consulté à
Oos, et qui m’a répondu par un ia si coupable. Il me reconnaît et
donne des signes d’agitation à ma vue. Puis il se répand en
explications verbeuses, qu’il éclaire d’un geste éloquent, en me tirant
par le bouton de mon habit. J’ai compris, je me lève ; mais à peine
ai-je saisi une faible partie de mon arsenal de voyage qu’il se ravise,
me repousse, s’échappe, court consulter le chef de gare sur le fait
insolite qui s’est produit. J’attends anxieux. Il revient et me saisit par
le bras. Cette fois, la chose est définitive : il faut descendre. Je
rassemble autour de moi le parapluie, la gibecière, les valises,
comme une poule fait de ses poussins, et j’allonge la jambe. Tout à
coup, le train s’ébranle, l’employé me rejette en arrière, nous voilà
partis !
Mais une minute après, son honnête face éplorée se remontre à
la portière. Là il recommence des explications que j’écoute avec le
calme du désespoir et de l’ahurissement. Pas un de mes
compagnons ne comprend le français. Enfin, il se trouve dans le
compartiment voisin un jeune homme qui s’offre pour interprète
avec la plus cruelle obligeance : il me traduit péniblement les paroles
de l’employé dans un idiome informe qui tient de l’auvergnat et du
sanscrit plus que du français, et il embrouille si bien les choses, que
je finis par n’y plus rien comprendre du tout.
Le train s’arrête et l’on me pousse sur la voie : c’est le plus clair.
Mélancoliquement assis sur mes valises, comme Marius sur les
ruines de Carthage, je regarde autour de moi, et ne vois que les
champs qui verdoient et le chemin qui poudroie. Solitude absolue.
J’éprouve le sentiment de Robinson dans son île déserte, car je
n’aperçois même pas la cabane servant de gare qui s’élève du côté
opposé de la voie. Mais quand l’immense convoi a défilé, en ayant
l’air de me saluer d’un coup de sifflet ironique, alors il dévoile à mes
yeux la station et, sur le seuil, un vieux gardien à figure placide, en
manches de chemise, fumant dans une superbe pipe de porcelaine,
et fort intrigué de voir descendre à Ottersweyer un voyageur en
chapeau, chargé de plus de colis qu’il n’en a vus depuis
l’établissement du chemin de fer. Avec l’aide un peu gouailleuse
d’une bande d’étudiants qui vint à passer tout à point, sac au dos, je
parvins à faire comprendre mon cas au brave homme, et à
comprendre moi-même qu’il me fallait attendre quatre heures dans
ces solitudes avant de pouvoir revenir sur mes pas !
Pour mettre à son comble l’intérêt du drame, le tonnerre grondait
sourdement depuis quelques minutes, et l’orage éclata tout à coup
avec la violence d’une tempête des tropiques. Impossible de rester
dans l’étroite station, que mes colis encombraient et dont l’air
semblait n’avoir pas été renouvelé depuis le printemps dernier. Je ne
pouvais songer à rouvrir, pour en extraire du moins un volume, mes
malles, ficelées et bouclées avec luxe, et que j’avais eu mille peines
à fermer le matin. Mais tandis que je ruminais ces choses avec
accablement, j’aperçus à cinquante pas une maisonnette sur laquelle
s’étalait, en lettres qui me parurent rayonnantes, l’enseigne :
Bierwirthschaft. Robinson ne fut pas plus heureux quand il découvrit
dans son île la marque du pied de Vendredi.
Il faut être condamné à un séjour forcé de quatre heures à
Ottersweyer pour savoir tout le plaisir qu’on peut éprouver à boire la
liqueur du houblon. Je n’aurais jamais cru que ce breuvage amer pût
devenir si doux. O grand roi Gambrinus, sois béni ! Ce qui s’est bu de
choppes dans le Bierwirthschaft d’Ottersweyer le mercredi 9 juillet,
entre une heure et quatre heures de l’après-midi, est un secret entre
ma conscience et moi. L’orage s’était déchaîné dans toute sa
violence, comme si la nature eût voulu s’associer au trouble de mon
âme. La grêle et la pluie faisaient rage ; les éclairs embrasaient le
ciel ; le tonnerre roulait en un grondement continu et tombait à
coups précipités. On eût dit un drame de Werner. Et je buvais d’un
front serein, entre une demi-douzaine de poules qui gloussaient,
deux enfants qui pleurnichaient, quatre charretiers en manches de
chemises dont les gros rires ébranlaient les vitres, et une hôtesse
compatissante et bavarde, qui, flairant une catastrophe, s’obstinait à
me prodiguer des consolations dont je n’entendais pas un mot.
Mais tout s’épuise en ce monde, même la soif d’un voyageur
altéré par 40 degrés de chaleur à jet continu. Au bout d’une heure,
j’avais examiné à fond le paysage, — je le sais encore par cœur
aujourd’hui et le peindrais les yeux fermés, — compté les tas de
fumier, noté toutes les faneuses et les voitures de foin attelées de
bœufs qui passaient sur la route. Au bout de deux heures, j’en étais
réduit à compter les taches de mouches sur les vitres : cette
excellente idée m’occupa longtemps, mais enfin je trouvai le total, et
il fallut passer à un autre exercice. Ma montre, que je tirais à chaque
minute par une sorte de tic nerveux, marchait avec une lenteur
prodigieuse, comme si elle eût été enchaînée par un enchanteur.
Enfin j’avise les cadres de la salle. Un à un, avec la conscience d’un
expert examinant un Hobbema, je les contemple et les savoure. Au-
dessus de ma tête, une lithographie porte cette inscription en
français : Vue de Saint-Malo, prise du Tallard par un beau temps et
par un changement de vent. Qu’est-ce que le Tallard ? Je me creuse
la tête et fouille mes plus lointains souvenirs. Je connais bien le
maréchal de Tallard, sous Louis XIV, mais évidemment ce n’est pas
lui qui a été pris par un beau temps et par un changement de vent !
Il faudra que je m’informe. — Ah ! décidément, nous n’apprenons
pas assez l’histoire de France !
Un nouveau coup de tonnerre ébranle la maisonnette. La porte
s’ouvre, et livre passage à un cinquième charretier, ruisselant comme
un fleuve. Il s’assied à une table voisine, et demande du fromage,
qu’il mange avec appétit. Cet homme paraît heureux : les éclairs et
la foudre l’environnent ; il n’y fait pas attention. Je l’envie ;
malheureusement je n’aime pas le fromage.
Je finis par découvrir, à une centaine de pas en arrière, le village
caché derrière les arbres. Pendant une demi-heure, le parapluie en
main, je me suis promené à travers les rues d’Ottersweyer, inondées
par l’orage, qui, en nettoyant les étables et leurs appendices, avait
empli les rigoles d’un liquide épais et jaunâtre, où piétinait avec
bonheur la jeunesse aux pieds nus des deux sexes. On voyait rentrer
précipitamment les charrettes de foin escortées de faneuses le
râteau sur l’épaule, et l’on entendait les mugissements des bœufs au
fond des écuries. Partout des arbres, de la verdure, des jardins et du
fumier. Comment vous dire le saisissement des indigènes devant ce
touriste en chapeau noir, la gibecière au cou, qui se promenait avec
gravité par leurs rues ? Ils s’appelaient les uns les autres pour se
montrer ce noble visiteur d’Ottersweyer, et je voyais à chaque pas
les figures se coller aux vitres et les habitants apparaître au seuil de
leurs maisons. Après m’avoir contemplé les yeux écarquillés et la
bouche béante, deux adorables bambines aux cheveux blonds se
rapprochent en sautillant, et m’éclaboussent en me demandant un
trinkgeld. Un rayon de soleil qui perce les nuages éclaire cette idylle
encrottée, ce lied naïf traduit par Champfleury, cette pastorale de
Gœthe peinte par Courbet.
J’ai trouvé au cabaret d’Ottersweyer un exemple singulier du
rayonnement de la France jusque dans les villages de l’Allemagne. La
grande salle est décorée de six lithographies représentant les sujets
suivants : Jean Bart à l’abordage du Prince-de-Frise ; Vue de Saint-
Malo, prise du Tallard par un beau temps et par un changement de
vent ; Bataille de Solférino ; portraits du grand-duc Frédéric, de S. M.
Guillaume, empereur d’Allemagne, et de Napoléon Ier.
Le temps et l’espace me défendent de prolonger davantage cette
sombre histoire et de vous expliquer comment, après avoir attendu
quatre heures, je faillis manquer le train pour n’avoir pas su attendre
trois minutes de plus. Mais le récit de ce nouvel incident et de
quelques autres nous mènerait trop loin. Il suffira d’ajouter que le
drame d’Ottersweyer eut pour heureux dénoûment, vers la nuit
tombante, la conquête d’un lit bien mérité dans une des branches de
ce grand phalanstère bâti par un marchand d’éventails, qu’on appelle
Carlsruhe.
Moralité du drame : se défier des lignes à embranchements
lorsqu’on ne sait pas la langue du pays. Cette morale est courte,
simple, claire et pratique. On fera bien de la suivre en voyage.
Sans ce fâcheux incident, je comptais ne faire à Carlsruhe qu’une
promenade entre deux trains. Il n’en faut pas davantage, en effet,
pour voir cette ville monotone, qui serait, je crois, la plus triste et la
plus ennuyeuse de l’Allemagne, si Manheim n’existait pas. Carlsruhe
l’emporte sur Manheim de toute la supériorité pittoresque d’un
éventail sur un échiquier. C’est une maladie particulière au grand-
duché de construire ainsi ses villes sur des plans mathématiques, à
la façon des pénitenciers.
Les habitants de Carlsruhe ne comprennent rien au dédain de la
plupart des voyageurs : ils se croient victimes d’un préjugé, d’une
injustice ou du mauvais goût. Ceux avec qui j’ai causé m’ont paru
persuadés qu’ils habitaient la plus belle ville de l’Europe. Et, en effet,
la capitale du grand-duché est le type idéal du style que M.
Haussmann et ses imitateurs ont voulu mettre à la mode dans ces
derniers temps, aux applaudissements des esprits éclairés ; le
modèle accompli de la ville neuve, propre et rectiligne. Elle marie la
ligne droite à la ligne courbe dans un ensemble d’une régularité
absolue. Rien n’y est laissé au hasard ; rien n’est abandonné à
l’initiative individuelle : les maisons sont bâties par le grand-duc et
par la ville sur un modèle uniforme, pour être louées aux
particuliers. Dans ma promenade à travers Carlsruhe, je suis tombé
sur un quartier monumental qu’on est en train de construire, vis-à-
vis d’un nouvel édifice destiné à réunir la Bibliothèque et les Musées,
et qui est fermé d’une grille. Les locataires seront là encasernés dans
des palais.
Ce grand éventail, dont une quinzaine de rues, rayonnant autour
du château ducal, forment les lames, reliées entre elles par d’autres
rues semi-circulaires, avec de petites places triangulaires dans les
intervalles, est charmant sur le papier, mais insupportable dans la
réalité. Au fond, il n’y a qu’une seule rue dans la capitale du grand-
duché : la Karl-Friederichs-Strasse, qui conduit en droite ligne de la
gare au château. Joignez-y, si vous voulez, la Lange-Strasse, qui la
coupe à angle droit. C’est dans la première qu’on a accumulé tous
les hôtels et tous les monuments : le buste colossal du grand-duc
Charles, la statue du grand-duc Louis, la lourde pyramide de grès
rouge, d’un effet si bizarre, élevée en l’honneur du margrave
Charles-Guillaume, l’hôtel de ville, l’église protestante avec sa
colonnade corinthienne, la statue de Charles-Frédéric sur la place du
château, ornée de parterres et de pelouses qui ressemblent à des
figures de géométrie. C’est dans cette rue centrale que s’est réfugié
aussi le peu de mouvement et de commerce d’une ville qui semble
presque exclusivement habitée par des fonctionnaires et des
rentiers. Les autres voies ne mènent à rien, et comme, tout en
partant du même point que la précédente, elles s’éloignent dans les
directions les plus divergentes, elles ne sont fréquentées que par
leurs habitants. Il m’a pris fantaisie d’en suivre une, et, après dix
minutes de marche, pendant lesquelles j’avais été épié, dévisagé,
scruté et retourné sous toutes les faces, comme une proie envoyée
par la Providence, à l’aide des miroirs placés à toutes les fenêtres, je
dus faire un circuit d’une demi-lieue pour rejoindre le centre.
C’est une imagination qui donne certainement l’idée la plus
avantageuse des sentiments monarchiques des Badois que d’avoir
pris ainsi le palais ducal pour point de départ de leur capitale et d’y
avoir rattaché toutes leurs rues comme au but et à la fin dernière de
la ville. Il en résulte que, de sa chambre à coucher, le grand-duc
peut surveiller ce qui se passe autour de lui et faire sa police lui-
même, absolument comme le gardien de Mazas embrasse d’un coup
d’œil tous les couloirs qui viennent aboutir à son poste central. Je ne
saurais trouver de comparaison plus juste. Carlsruhe tient à la fois
de la prison, de la caserne, du couvent et du phalanstère. On dirait
un chef-lieu des Frères Moraves. De flegmatiques Allemands peuvent
seuls habiter cette capitale cellulaire sans y être poussés au spleen
et au suicide.
Une ville est l’œuvre du temps, comme une forêt. Il faut que les
rues poussent, que les maisons se groupent, que les édifices sortent
de terre au gré des besoins et par la lente et naturelle floraison des
siècles. Les fondateurs qui croient se ménager toutes les chances en
bâtissant une cité comme un monument, d’un seul jet et sur un plan
tracé par un ingénieur, n’ont jamais réussi qu’à faire des nécropoles
comme Versailles, ou des capitales d’une régularité glaciale et d’une
vie factice comme celle du grand-duché.
Heidelberg, 11 juillet.
Stuttgard, 12 juillet.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebooknice.com