0% found this document useful (0 votes)
21 views65 pages

Intelligent Systems for Engineers and Scientists: A Practical Guide to Artificial Intelligence, 4th Edition Adrian A. Hopgood - Instantly access the full ebook content in just a few seconds

The document provides information about various eBooks available for download at ebookmeta.com, including titles related to artificial intelligence, optical measurements, and leadership for engineers and scientists. It highlights the fourth edition of 'Intelligent Systems for Engineers and Scientists' by Adrian A. Hopgood, along with other recommended digital products. Users can access these resources instantly through the provided links.

Uploaded by

ayikoehaimov
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views65 pages

Intelligent Systems for Engineers and Scientists: A Practical Guide to Artificial Intelligence, 4th Edition Adrian A. Hopgood - Instantly access the full ebook content in just a few seconds

The document provides information about various eBooks available for download at ebookmeta.com, including titles related to artificial intelligence, optical measurements, and leadership for engineers and scientists. It highlights the fourth edition of 'Intelligent Systems for Engineers and Scientists' by Adrian A. Hopgood, along with other recommended digital products. Users can access these resources instantly through the provided links.

Uploaded by

ayikoehaimov
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 65

Read Anytime Anywhere Easy Ebook Downloads at ebookmeta.

com

Intelligent Systems for Engineers and Scientists:


A Practical Guide to Artificial Intelligence, 4th
Edition Adrian A. Hopgood

https://ebookmeta.com/product/intelligent-systems-for-
engineers-and-scientists-a-practical-guide-to-artificial-
intelligence-4th-edition-adrian-a-hopgood/

OR CLICK HERE

DOWLOAD EBOOK

Visit and Get More Ebook Downloads Instantly at https://ebookmeta.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Optical Measurements for Scientists and Engineers A


Practical Guide 1st Edition Arthur Mcclelland

https://ebookmeta.com/product/optical-measurements-for-scientists-and-
engineers-a-practical-guide-1st-edition-arthur-mcclelland/

ebookmeta.com

Explainable Artificial Intelligence for Intelligent


Transportation Systems Ethics and Applications Loveleen
Gaur
https://ebookmeta.com/product/explainable-artificial-intelligence-for-
intelligent-transportation-systems-ethics-and-applications-loveleen-
gaur/
ebookmeta.com

Everyone a Leader A Guide to Leading High Performance


Organizations for Engineers and Scientists Colcleugh David

https://ebookmeta.com/product/everyone-a-leader-a-guide-to-leading-
high-performance-organizations-for-engineers-and-scientists-colcleugh-
david/
ebookmeta.com

Dark Pleasures Fated Souls 1st Edition Alyna Lochlan

https://ebookmeta.com/product/dark-pleasures-fated-souls-1st-edition-
alyna-lochlan/

ebookmeta.com
Steele (Shadowridge Guardians MC Book 1) 1st Edition
Pepper North

https://ebookmeta.com/product/steele-shadowridge-guardians-mc-
book-1-1st-edition-pepper-north/

ebookmeta.com

The World from 1000 BCE to 300 CE Burstein Stanley M

https://ebookmeta.com/product/the-world-from-1000-bce-to-300-ce-
burstein-stanley-m/

ebookmeta.com

Rising Up Living On Re Existences Sowings and Decolonial


Cracks 1st Edition Catherine E. Walsh

https://ebookmeta.com/product/rising-up-living-on-re-existences-
sowings-and-decolonial-cracks-1st-edition-catherine-e-walsh/

ebookmeta.com

Evolving Learner Shifting From Professional Development to


Professional Learning From Kids Peers and the World 1st
Edition Lainie Rowell
https://ebookmeta.com/product/evolving-learner-shifting-from-
professional-development-to-professional-learning-from-kids-peers-and-
the-world-1st-edition-lainie-rowell/
ebookmeta.com

From Central Planning to the Market Transformation of the


Czech Economy 1989 2004 1st Edition Libor Zidek

https://ebookmeta.com/product/from-central-planning-to-the-market-
transformation-of-the-czech-economy-1989-2004-1st-edition-libor-zidek/

ebookmeta.com
Impact of the Global Medical Supply Chain on SNS
Operations and Communications Proceedings of a Workshop
1st Edition And Medicine Engineering National Academies Of
Sciences
https://ebookmeta.com/product/impact-of-the-global-medical-supply-
chain-on-sns-operations-and-communications-proceedings-of-a-
workshop-1st-edition-and-medicine-engineering-national-academies-of-
sciences/
ebookmeta.com
Intelligent Systems for
Engineers and Scientists

A Practical Guide to Artificial


Intelligence
Intelligent Systems for
Engineers and Scientists

A Practical Guide to Artificial


Intelligence

Fourth edition

Adrian A. Hopgood
Cover image provided by The Open University and used with its permission.
Flex, Flint, and VisiRule are trademarks of Logic programming Associates Ltd. http://lpa.co.uk
Fourth edition published 2022
by CRC Press
6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487-2742
and by CRC Press
2 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN
© 2022 Taylor & Francis Group, LLC
First edition published by CRC Press 1993
CRC Press is an imprint of Taylor & Francis Group, LLC
Reasonable efforts have been made to publish reliable data and information, but the author and
publisher cannot assume responsibility for the validity of all materials or the consequences of
their use. The authors and publishers have attempted to trace the copyright holders of all material
reproduced in this publication and apologize to copyright holders if permission to publish in this
form has not been obtained. If any copyright material has not been acknowledged please write and
let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, repro-
duced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now
known or hereafter invented, including photocopying, microfilming, and recording, or in any
information storage or retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, access www.copyright.
com or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA
01923, 978-750-8400. For works that are not available on CCC please contact mpkbookspermis-
[email protected]
Trademark notice: Product or corporate names may be trademarks or registered trademarks and are
used only for identification and explanation without intent to infringe.
ISBN: 978-0-367-33616-5 (hbk)
ISBN: 978-1-032-12676-0 (pbk)
ISBN: 978-1-003-22627-7 (ebk)
DOI: 10.1201/9781003226277
Typeset in Garamond
by SPi Technologies India Pvt Ltd (Straive)
For my family
Contents

Preface........................................................................................................... xix
Acknowledgements........................................................................................ xxi
Author.........................................................................................................xxiii
1 Introduction.........................................................................1
1.1 Artificial Intelligence and Intelligent Systems......................................1
1.2 A Spectrum of Intelligent Behavior.....................................................3
1.3 Knowledge-Based Systems (KBSs)......................................................4
1.4 The Knowledge Base...........................................................................6
1.4.1 Rules and Facts.......................................................................6
1.4.2 Inference Networks................................................................7
1.4.3 Semantic Networks................................................................8
1.5 Deduction, Abduction, and Induction..............................................10
1.6 The Inference Engine........................................................................11
1.7 Declarative and Procedural Programming.........................................12
1.8 Expert Systems..................................................................................14
1.9 Knowledge Acquisition.....................................................................15
1.10 Search...............................................................................................15
1.11 Computational Intelligence (CI).......................................................17
1.12 Integration with Other Software.......................................................19
Further Reading..........................................................................................19
2 Rule-Based Systems............................................................ 21
2.1 Rules and Facts.................................................................................21
2.2 A Rule-Based System for Boiler Control...........................................22
2.3 Rule Examination and Rule Firing....................................................24
2.4 Maintaining Consistency..................................................................25
2.5 The Closed-World Assumption.........................................................27
2.6 Use of Local Variables within Rules...................................................28
2.7 Forward Chaining (a Data-Driven Strategy).....................................30
2.7.1 Single and Multiple Instantiation of Local Variables.............31
2.7.2 Rete Algorithm.....................................................................33

vii
viii ◾ Contents

2.8 Conflict Resolution...........................................................................35


2.8.1 First Come, First Served.......................................................35
2.8.2 Priority Values......................................................................36
2.8.3 Metarules.............................................................................37
2.9 Backward Chaining (a Goal-Driven Strategy)...................................38
2.9.1 The Backward-Chaining Mechanism....................................38
2.9.2 Implementation of Backward Chaining................................39
2.9.3 Variations of Backward Chaining.........................................41
2.9.4 Format of Backward-Chaining Rules....................................43
2.10 A Hybrid Strategy.............................................................................44
2.11 Explanation Facilities........................................................................48
2.12 Summary..........................................................................................49
Further Reading..........................................................................................49
3 Handling Uncertainty: Probability and Fuzzy Logic........... 51
3.1 Sources of Uncertainty......................................................................51
3.2 Bayesian Updating............................................................................52
3.2.1 Representing Uncertainty by Probability..............................52
3.2.2 Direct Application of Bayes’ Theorem..................................53
3.2.3 Likelihood Ratios.................................................................55
3.2.4 Using the Likelihood Ratios.................................................56
3.2.5 Dealing with Uncertain Evidence.........................................58
3.2.6 Combining Evidence............................................................59
3.2.7 Combining Bayesian Rules with Production Rules...............62
3.2.8 A Worked Example of Bayesian Updating............................63
3.2.9 Discussion of the Worked Example......................................65
3.2.10 Advantages and Disadvantages of Bayesian Updating...........66
3.3 Certainty Theory..............................................................................68
3.3.1 Introduction.........................................................................68
3.3.2 Making Uncertain Hypotheses.............................................68
3.3.3 Logical Combinations of Evidence.......................................70
3.3.3.1 Conjunction..........................................................71
3.3.3.2 Disjunction...........................................................71
3.3.3.3 Negation...............................................................71
3.3.4 A Worked Example of Certainty Theory...............................72
3.3.5 Discussion of the Worked Example......................................73
3.3.6 Relating Certainty Factors to Probabilities............................74
3.4 Fuzzy Logic: Type-1..........................................................................75
3.4.1 Crisp Sets and Fuzzy Sets.....................................................76
3.4.2 Fuzzy Rules..........................................................................78
3.4.3 Defuzzification.....................................................................80
3.4.3.1 Stage 1: Scaling the Membership Functions...........81
3.4.3.2 Stage 2: Finding the Centroid................................82
3.4.3.3 Defuzzifying at the Extremes.................................83
Contents ◾ ix

3.4.3.4 Sugeno Defuzzification..........................................84


3.4.3.5 A Defuzzification Anomaly....................................85
3.5 Fuzzy Control Systems......................................................................86
3.5.1 Crisp and Fuzzy Control......................................................86
3.5.2 Fuzzy Control Rules.............................................................87
3.5.3 Defuzzification in Control Systems......................................89
3.6 Fuzzy Logic: Type-2..........................................................................90
3.7 Other Techniques.............................................................................93
3.7.1 Dempster–Shafer Theory of Evidence...................................94
3.7.2 Inferno.................................................................................95
3.8 Summary..........................................................................................95
Further Reading..........................................................................................96
4 Agents, Objects, and Frames.............................................. 97
4.1 Birds of a Feather: Agents, Objects, and Frames................................97
4.2 Intelligent Agents..............................................................................98
4.3 Agent Architectures...........................................................................99
4.3.1 Logic-Based Architectures..................................................100
4.3.2 Emergent Behavior Architectures.......................................100
4.3.3 Knowledge-Level Architectures...........................................100
4.3.4 Layered Architectures.........................................................101
4.4 Multiagent Systems (MASs)............................................................102
4.4.1 Benefits of a Multiagent System.........................................103
4.4.2 Building a Multiagent System............................................104
4.4.3 Contract Nets.....................................................................105
4.4.4 Cooperative Problem-Solving (CPS)..................................106
4.4.5 Shifting Matrix Management (SMM).................................107
4.4.6 Comparison of Cooperative Models...................................108
4.4.7 Communication between Agents........................................109
4.5 Swarm Intelligence..........................................................................111
4.6 Object-Oriented Systems................................................................112
4.6.1 Introducing Object-Oriented Programming (OOP)...........112
4.6.2 An Illustrative Example......................................................113
4.6.3 Data Abstraction................................................................114
4.6.3.1 Classes.................................................................114
4.6.3.2 Instances..............................................................115
4.6.3.3 Attributes (or Data Members).............................116
4.6.3.4 Operations (or Methods or Member
Functions)...........................................................116
4.6.3.5 Creation and Deletion of Instances......................117
4.6.4 Inheritance.........................................................................119
4.6.4.1 Single Inheritance................................................119
4.6.4.2 Multiple and Repeated Inheritance......................120
4.6.4.3 Specialization of Methods....................................124
x ◾ Contents

4.6.4.4 Class Browsers.....................................................124


4.6.5 Encapsulation.....................................................................125
4.6.6 Unified Modeling Language (UML)...................................126
4.6.7 Dynamic (or Late) Binding................................................128
4.6.8 Message Passing and Function Calls...................................130
4.6.9 Metaclasses.........................................................................131
4.6.10 Type Checking...................................................................132
4.6.11 Persistence..........................................................................133
4.6.12 Concurrency......................................................................133
4.6.13 Active Values and Daemons................................................134
4.6.14 Summary of Object-Oriented Systems...............................135
4.7 Objects and Agents.........................................................................136
4.8 Frame-Based Systems......................................................................137
4.9 Summary: Agents, Objects, and Frames..........................................139
Further Reading........................................................................................139
5 Symbolic Learning........................................................... 141
5.1 Introduction...................................................................................141
5.2 Learning by Induction....................................................................143
5.2.1 Overview............................................................................143
5.2.2 Learning Viewed as a Search Problem.................................145
5.2.3 Techniques for Generalization and Specialization...............146
5.2.3.1 Universalization...................................................147
5.2.3.2 Replacing Constants with Variables.....................147
5.2.3.3 Using Conjunctions and Disjunctions.................148
5.2.3.4 Moving Up or Down a Hierarchy........................149
5.2.3.5 Chunking............................................................149
5.3 Case-Based Reasoning (CBR).........................................................150
5.3.1 Storing Cases......................................................................151
5.3.1.1 Abstraction Links and Index Links......................151
5.3.1.2 Instance-Of Links................................................152
5.3.1.3 Scene Links.........................................................152
5.3.1.4 Exemplar Links...................................................153
5.3.1.5 Failure Links........................................................153
5.3.2 Retrieving Cases.................................................................153
5.3.3 Adapting Case Histories.....................................................153
5.3.3.1 Null Adaptation..................................................154
5.3.3.2 Parameterization..................................................154
5.3.3.3 Reasoning by Analogy.........................................154
5.3.3.4 Critics.................................................................155
5.3.3.5 Reinstantiation....................................................155
5.3.4 Dealing with Mistaken Conclusions...................................156
5.4 Summary........................................................................................156
Further Reading........................................................................................157
Contents ◾ xi

6 Single-Candidate Optimization Algorithms...................... 159


6.1 Optimization..................................................................................159
6.2 The Search Space............................................................................160
6.3 Searching the Parameter Space........................................................162
6.4 Hill-Climbing and Gradient-Descent Algorithms...........................162
6.4.1 Hill-Climbing....................................................................162
6.4.2 Steepest Gradient Descent or Ascent..................................163
6.4.3 Gradient-Proportional Descent or Ascent...........................163
6.4.4 Conjugate Gradient Descent or Ascent...............................163
6.4.5 Tabu Search........................................................................164
6.5 Simulated Annealing.......................................................................164
6.6 Summary........................................................................................168
Further Reading........................................................................................169

7 Genetic Algorithms for Optimization.............................. 171


7.1 Introduction: Evolutionary Algorithms...........................................171
7.2 The Basic Genetic Algorithm..........................................................172
7.2.1 Chromosomes....................................................................172
7.2.2 Algorithm Outline.............................................................173
7.2.3 Crossover...........................................................................173
7.2.4 Mutation............................................................................175
7.2.5 Validity Check....................................................................175
7.3 Selection.........................................................................................176
7.3.1 Selection Pitfalls.................................................................176
7.3.2 Fitness-Proportionate Selection..........................................177
7.3.3 Fitness Scaling for Improved Selection................................180
7.3.3.1 Linear Fitness Scaling..........................................180
7.3.3.2 Sigma Scaling......................................................181
7.3.3.3 Boltzmann Fitness Scaling...................................182
7.3.3.4 Linear Rank Scaling............................................183
7.3.3.5 Nonlinear Rank Scaling.......................................184
7.3.3.6 Probabilistic Nonlinear Rank Scaling...................184
7.3.3.7 Truncation Selection............................................185
7.3.3.8 Transform Ranking.............................................185
7.3.4 Tournament Selection........................................................186
7.3.5 Comparison of Selection Methods......................................186
7.4 Elitism............................................................................................187
7.5 Multiobjective Optimization...........................................................187
7.6 Gray Code......................................................................................188
7.7 Variable-Length Chromosomes.......................................................189
7.8 Building Block Hypothesis..............................................................191
7.8.1 Schema Theorem................................................................191
7.8.2 Inversion............................................................................191
xii ◾ Contents

7.9 Selecting GA Parameters.................................................................192


7.10 Monitoring Evolution.....................................................................192
7.11 Finding Multiple Optima...............................................................193
7.12 Genetic Programming (GP)............................................................193
7.13 Other Forms of Population-Based Optimization.............................194
7.14 Summary........................................................................................194
Further Reading........................................................................................195
8 Shallow Neural Networks................................................ 197
8.1 Introduction...................................................................................197
8.2 Neural Network Applications..........................................................198
8.2.1 Classification......................................................................199
8.2.2 Nonlinear Estimation and Prediction.................................199
8.2.3 Clustering..........................................................................200
8.2.4 Memory and Recall............................................................200
8.3 Nodes and Interconnections...........................................................201
8.4 Single and Multilayer Perceptrons (SLPs and MLPs).......................203
8.4.1 Network Topology.............................................................203
8.4.2 Perceptrons as Classifiers....................................................204
8.4.3 Training a Perceptron.........................................................208
8.4.4 Hierarchical Perceptrons.....................................................211
8.4.5 Buffered Perceptrons..........................................................212
8.4.6 Some Practical Considerations............................................212
8.4.6.1 Overtraining........................................................212
8.4.6.2 Leave-One-Out and K-Fold Cross-Validation......213
8.4.6.3 Data Scaling........................................................214
8.5 Recurrent Networks........................................................................215
8.5.1 Simple Recurrent Network (SRN)......................................215
8.5.2 Hopfield Network..............................................................216
8.5.3 Maxnet...............................................................................218
8.5.4 The Hamming Network.....................................................219
8.6 Unsupervised Networks..................................................................220
8.6.1 Adaptive Resonance Theory (ART) Networks....................220
8.6.2 Kohonen Self-Organizing Networks...................................222
8.6.3 Radial Basis Function (RBF) Networks..............................223
8.7 Spiking Neural Networks (SNNs)...................................................226
8.8 Summary........................................................................................227
Further Reading........................................................................................228
9 Deep Neural Networks.................................................... 229
9.1 Deep Learning................................................................................229
9.2 Convolutional Neural Networks (CNNs) for Image
Recognition....................................................................................230
Contents ◾ xiii

9.2.1Origins...............................................................................230
9.2.2Motivation for Convolutional Networks............................230
9.2.3CNN Structure..................................................................233
9.2.3.1 Input Layer.........................................................233
9.2.3.2 Feature Maps.......................................................235
9.2.3.3 Pooling and Classification Layers.........................237
9.2.4 Pretrained Networks and Transfer Learning........................238
9.2.5 CNNs in Context..............................................................239
9.3 Generative Networks......................................................................239
9.3.1 Generative versus Discriminative Algorithms.....................239
9.3.2 Autoencoder Networks.......................................................240
9.3.3 Generative Adversarial Networks (GANs)..........................241
9.4 Long Short-Term Memory (LSTM) Networks................................242
9.5 Summary........................................................................................245
Further Reading........................................................................................245
10 Hybrid Systems................................................................ 247
10.1 Convergence of Techniques.............................................................247
10.2 Blackboard Systems for Multifaceted Problems...............................248
10.3 Parameter Setting............................................................................250
10.3.1 Genetic–Neural Systems.....................................................250
10.3.2 Genetic–Fuzzy Systems......................................................251
10.3.3 Fuzzy–Genetic Systems......................................................252
10.4 Capability Enhancement.................................................................253
10.4.1 Neuro–Fuzzy Systems.........................................................253
10.4.2 Memetic Algorithms: Genetic Algorithms with
Local Search.......................................................................255
10.4.3 Learning Classifier Systems (LCSs).....................................257
10.5 Clarification and Verification of Neural Network Outputs..............257
10.6 Summary........................................................................................258
Further Reading........................................................................................258
11 AI Programming Languages and Tools.............................. 259
11.1 A Range of Intelligent Systems Tools...............................................259
11.2 Features of AI Languages................................................................261
11.2.1 Lists...................................................................................261
11.2.2 Other Data Types...............................................................262
11.2.3 Programming Environments..............................................264
11.3 Lisp.................................................................................................264
11.3.1 Background........................................................................264
11.3.2 Lisp Functions....................................................................265
11.3.3 A Worked Example............................................................268
11.4 Prolog.............................................................................................276
xiv ◾ Contents

11.4.1 Background........................................................................276
11.4.2 A Worked Example............................................................277
11.4.3 Backtracking in Prolog.......................................................283
11.5 Python............................................................................................287
11.5.1 Background........................................................................287
11.5.2 A Worked Example............................................................288
11.6 Comparison of AI Languages..........................................................295
11.7 Summary........................................................................................295
Further Reading........................................................................................296
12 Systems for Interpretation and Diagnosis........................ 297
12.1 Introduction...................................................................................297
12.2 Deduction and Abduction for Diagnosis.........................................299
12.2.1 Exhaustive Testing..............................................................300
12.2.2 Explicit Modeling of Uncertainty.......................................301
12.2.3 Hypothesize-and-Test.........................................................301
12.3 Depth of Knowledge.......................................................................302
12.3.1 Shallow Knowledge............................................................302
12.3.2 Deep Knowledge................................................................303
12.3.3 Combining Shallow and Deep Knowledge.........................305
12.4 Model-Based Reasoning..................................................................305
12.4.1 The Limitations of Rules....................................................305
12.4.2 Modeling Function, Structure, and State............................306
12.4.2.1 Function..............................................................307
12.4.2.2 Structure.............................................................308
12.4.2.3 State....................................................................310
12.4.3 Using the Model................................................................312
12.4.4 Monitoring........................................................................314
12.4.5 Tentative Diagnosis............................................................315
12.4.5.1 The Shotgun Approach........................................315
12.4.5.2 Structural Isolation..............................................316
12.4.5.3 The Heuristic Approach......................................316
12.4.6 Fault Simulation.................................................................316
12.4.7 Fault Repair........................................................................317
12.4.8 Using Problem Trees...........................................................317
12.4.9 Summary of Model-Based Reasoning.................................318
12.5 Case Study: A Blackboard System for Interpreting Ultrasonic
Images............................................................................................319
12.5.1 Ultrasonic Imaging.............................................................319
12.5.2 Agents in DARBS..............................................................321
12.5.3 Rules in DARBS................................................................323
12.5.4 The Stages of Image Interpretation.....................................325
12.5.4.1 Arc Detection Using the Hough Transform.........325
Contents ◾ xv

12.5.4.2 Gathering the Evidence.......................................326


12.5.4.3 Defect Classification............................................328
12.5.5 The Use of Neural Networks..............................................328
12.5.5.1 Defect Classification Using a Neural
Network..............................................................328
12.5.5.2 Echodynamic Classification Using a Neural
Network..............................................................330
12.5.5.3 Combining the Two Applications of Neural
Networks.............................................................330
12.5.6 Rules for Verifying Neural Networks..................................330
12.6 Summary........................................................................................331
Further Reading........................................................................................332
13 Systems for Design and Selection.................................... 333
13.1 The Design Process.........................................................................333
13.2 Design as a Search Problem.............................................................336
13.3 Computer-Aided Design.................................................................338
13.4 The Product Design Specification (PDS): A
Telecommunications Case Study.....................................................339
13.4.1 Background........................................................................339
13.4.2 Alternative Views of a Network..........................................339
13.4.3 Implementation.................................................................340
13.4.4 The Classes.........................................................................340
13.4.4.1 Network..............................................................342
13.4.4.2 Link....................................................................342
13.4.4.3 Information Stream.............................................342
13.4.4.4 Site......................................................................342
13.4.4.5 Equipment..........................................................343
13.4.5 Summary of PDS Case Study.............................................343
13.5 Conceptual Design.........................................................................343
13.6 Constraint Propagation and Truth Maintenance.............................346
13.7 Case Study: The Design of a Lightweight Beam..............................350
13.7.1 Conceptual Design.............................................................350
13.7.2 Optimization and Evaluation.............................................352
13.7.3 Detailed Design.................................................................356
13.8 Design as a Selection Exercise.........................................................356
13.8.1 Overview............................................................................356
13.8.2 Merit Indices......................................................................357
13.8.3 The Polymer Selection Example..........................................358
13.8.4 Two-Stage Selection...........................................................358
13.8.5 Constraint Relaxation........................................................360
13.8.6 A Naive Approach to Scoring.............................................364
13.8.7 A Better Approach to Scoring.............................................366
xvi ◾ Contents

13.8.8 Case Study: The Design of a Kettle.....................................367


13.8.9 Reducing the Search Space by Classification.......................368
13.9 Failure Mode and Effects Analysis (FMEA).....................................370
13.10 Summary........................................................................................372
Further Reading........................................................................................373
14 Systems for Planning........................................................ 375
14.1 Introduction...................................................................................375
14.2 Classical Planning Systems..............................................................376
14.3 Stanford Research Institute Problem Solver (STRIPS).....................378
14.3.1 General Description...........................................................378
14.3.2 An Example Problem.........................................................379
14.3.3 A Simple Planning System in Prolog..................................382
14.4 Considering the Side Effects of Actions...........................................387
14.4.1 Maintaining a World Model...............................................387
14.4.2 Deductive Rules.................................................................387
14.5 Hierarchical Planning.....................................................................389
14.5.1 Description........................................................................389
14.5.2 Benefits of Hierarchical Planning.......................................390
14.5.3 Hierarchical Planning with ABSTRIPS..............................392
14.6 Postponement of Commitment......................................................397
14.6.1 Partial Ordering of Plans....................................................397
14.6.2 The Use of Planning Variables............................................399
14.7 Job-Shop Scheduling......................................................................400
14.7.1 The Problem.......................................................................400
14.7.2 Some Approaches to Scheduling.........................................401
14.8 Constraint-Based Analysis (CBA)...................................................402
14.8.1 Constraints and Preferences................................................402
14.8.2 Formalizing the Constraints...............................................403
14.8.3 Identifying the Critical Sets of Operations..........................405
14.8.4 Sequencing in the Disjunctive Case....................................406
14.8.5 Sequencing in the Nondisjunctive Case..............................406
14.8.6 Updating Earliest Start Times and Latest Finish Times.......409
14.8.7 Applying Preferences..........................................................411
14.8.8 Using Constraints and Preferences......................................413
14.9 Replanning and Reactive Planning..................................................414
14.10 Summary........................................................................................415
Further Reading........................................................................................417
15 Systems for Control......................................................... 419
15.1 Introduction...................................................................................419
15.2 Low-Level Control..........................................................................420
15.2.1 Open-Loop Control...........................................................420
Contents ◾ xvii

15.2.2 Feedforward Control..........................................................421


15.2.3 Feedback Control...............................................................422
15.2.4 First- and Second-Order Models........................................422
15.2.5 Algorithmic Control: The PID Controller..........................423
15.2.6 Bang-Bang Control............................................................425
15.3 Requirements of High-Level (Supervisory) Control........................425
15.4 Blackboard Maintenance.................................................................427
15.5 Time-Constrained Reasoning..........................................................428
15.5.1 Prioritization of Processes...................................................429
15.5.2 Approximation...................................................................429
15.5.2.1 Approximate Search.............................................430
15.5.2.2 Data Approximations..........................................431
15.5.2.3 Knowledge Approximations................................431
15.5.3 Single and Multiple Instantiation.......................................432
15.6 Fuzzy Control.................................................................................433
15.7 The BOXES Controller...................................................................435
15.7.1 The Conventional BOXES Algorithm................................435
15.7.2 Fuzzy BOXES....................................................................441
15.8 Neural Network Controllers...........................................................442
15.8.1 Direct Association of State Variables with Action
Variables.............................................................................443
15.8.2 Estimation of Critical State Variables..................................444
15.9 Statistical Process Control (SPC)....................................................447
15.9.1 Applications.......................................................................447
15.9.2 Collecting the Data............................................................447
15.9.3 Using the Data...................................................................449
15.10 Summary........................................................................................449
Further Reading........................................................................................451
16 The Future of Intelligent Systems..................................... 453
16.1 Benefits...........................................................................................453
16.2 Trends in Implementation..............................................................454
16.3 Intelligent Systems and the Internet................................................455
16.4 Computational Power.....................................................................456
16.5 Ubiquitous Intelligent Systems.......................................................456
16.6 Ethics..............................................................................................458
16.7 Conclusions....................................................................................459
References.....................................................................................................461
Index.............................................................................................................479
Preface

About This Book


The term intelligent systems is broad, covering a range of artificial intelligence (AI)
techniques and the ways in which they can be put into practice. It includes symbolic
approaches—in which knowledge is explicitly expressed in words and symbols—and
numerical approaches such as neural networks and genetic algorithms. Fuzzy logic
can be considered to have a foot in both camps. In fact, many practical intelligent
systems are a hybrid of different approaches. Whether any of these systems is really
capable of displaying human-like intelligent behavior is a moot point. Nevertheless,
they are extremely useful, and they have enabled elegant solutions to a wide variety
of difficult problems.
There are plenty of other books available on artificial intelligence and related
technologies, but I hope this one is substantially different. It takes a practical view,
showing the issues encountered in the development of applied systems. I have delib-
erately described a wide range of intelligent systems techniques, with the help of
realistic problems in engineering and science. The examples included here have been
specifically selected for the details of the techniques that they illustrate, rather than
merely to survey current practice.
The book can be roughly divided into two parts. Chapters 1 to 11 describe the
techniques of artificial intelligence, while Chapters 12 to 15 look at four broad cat-
egories of applications. These latter chapters explore in depth the design and imple-
mentation issues of applied intelligent systems, together with their advantages and
difficulties. The four application areas have much in common, as they all concern
automated decision-making, while making the best use of the available information.
Chapter 16 rounds off the book by looking at some of the trends and likely future
directions for AI.

xix
xx ◾ Preface

The Fourth Edition


This new edition is intended to retain the strengths of the earlier editions and to
build upon them. The book has been updated throughout, with many new refer-
ences, while retaining seminal sources wherever their influence remains intact. The
biggest single change has been the inclusion of a new chapter on deep neural net-
works, reflecting the growth of machine learning as the dominant technique for AI
in the 2020s. There is also a new section on the use of the Python language, which
has become the de facto standard language.
As in the third edition, all the rule-based examples, including those that use
uncertainty, are presented in the format of a standard artificial intelligence toolkit.
The chosen toolkit comprises Flex™ and Flint™ from Logic Programming Associates
Ltd., but the rules can be readily translated for other systems. All the examples have
been tested and are available for download from my website.
I hope the book will appeal to a wide readership. In particular, I hope that
students will be drawn toward this fascinating area from all scientific and engineer-
ing subjects, not just from the computer sciences. Beyond academia, the book will
appeal to engineers and scientists who are either building intelligent systems or sim-
ply keen to know more about them.

Earlier Editions
The first edition of this book was narrower in focus and was entitled Knowledge-
Based Systems for Engineers and Scientists. The scope of the second edition was wid-
ened to include new chapters on intelligent agents, neural networks, optimization
algorithms (especially genetic algorithms), and hybrid systems. The revised title of
Intelligent Systems for Engineers and Scientists reflected the inclusion of computa-
tional intelligence techniques alongside knowledge-based systems.
The first two editions were adopted by the Open University for its course T396:
Artificial Intelligence for Technology, which ran successfully for 12 years. It gives me
great pleasure to think of the large number of students who have been introduced
to the world of intelligent systems through the book and the associated Open
University course. Partly through having such a keen group of critical readers, I
received a lot of useful feedback that helped remove minor errors and clarify the
explanations.
The third edition was an evolution to reflect intelligent systems practice. Some
of the areas that had grown in importance and were expanded included intelligent
agents, fuzzy logic, genetic algorithms, and neural networks. Indeed, genetic algo-
rithms were given their own chapter, separated from single-candidate optimization
techniques. For the first time, the book was supported by a website with download-
able code.
Acknowledgements

Many people have helped me, either with this edition or the earlier ones, and I
am grateful to them all. The list of people who have helped, directly or indirectly,
grows with each edition and includes (in alphabetical order): Mike Brayshaw,
David Carpenter, Michele Dimont, Carole Gustafson, Jon Hall, Nicholas Hallam,
Jo Herbert, Tony Hirst, David Hopgood, Sue Hopgood, Adam Kowalzyk, Dawn
Mesa, Priyanka Mundada, Lars Nolle, Sean Ogden, Obinwa Ozonze, Sara Parkin,
Phil Picton, Chris Price, Peter Richardson, Philip Sargent, Navin Sullivan, Joy
Watts, Patrick Wong, Neil Woodcock, John Wyzalek, and John Zucker.
As with the previous editions, I remain indebted to my wife for letting me get
on with it.

Adrian A. Hopgood
Updates and downloads are available from adrianhopgood.com

xxi
Author

Dr. Adrian Hopgood is Professor of Intelligent Systems and Director of Future &
Emerging Technologies at the University of Portsmouth in the UK. He earned his
BSc from the University of Bristol, PhD from the University of Oxford, and MBA
from the Open University. After completing his PhD, he joined the AI team of
Systems Designers PLC. That experience set the direction of his career toward the
investigation of intelligent systems and their practical applications. After leaving
Systems Designers, he spent 14 years at the Open University and remains attached
as a visiting professor. During that period, he also spent two years at Telstra Research
Laboratories in Australia, investigating the role of intelligent systems in telecom-
munications. He has subsequently worked for Nottingham Trent University, De
Montfort University, Sheffield Hallam University, and the University of Liège,
before joining the University of Portsmouth. Despite assuming several senior man-
agement positions during his career, he has never lost his passion for intelligent
systems. His website is adrianhopgood.com.

xxiii
Chapter 1

Introduction

1.1 Artificial Intelligence and Intelligent Systems


Over many centuries, tools of increasing sophistication have been developed to serve
the human race. Physical tools such as chisels, hammers, spears, arrows, guns, carts,
cars, and aircraft all have their place in the history of civilization. Humanity has also
developed tools of communication: spoken language, written language, and the lan-
guage of mathematics. These tools have not only enabled the exchange and storage
of information, but they have also allowed the expression of concepts that simply
could not exist outside of language.
The last century saw the arrival of a new tool—the digital computer. Computers
are able to perform the same sort of numerical and symbolic manipulations that an
ordinary person can, but faster and more reliably. They have therefore been able to
remove the tedium from many tasks that were previously performed manually and
have allowed the achievement of new feats. Such feats range from huge scientific
models to the more familiar online banking facilities.
Although these developments are impressive, the computer is actually only per-
forming quite simple operations, albeit rapidly. In such applications, the computer
is still only a complex calculating machine. The intriguing idea now is whether we
can build a computer (or a computer program) that can think (Turing 1950). As
Penrose (1999) has pointed out, most of us are quite happy with machines that
enable us to do physical things more easily or more quickly, such as digging a hole
or traveling along a freeway. We are also happy to use machines that enable us to
do physical things that would otherwise be impossible, such as flying. However, the
idea of a machine that can think for us is a huge leap forward in our ambitions, and
one that raises many ethical and philosophical questions.
Research in artificial intelligence (or simply AI) is directed toward build-
ing such a machine and improving our understanding of intelligence. Here is a

DOI: 10.1201/9781003226277-1 1
2 ◾ Intelligent Systems for Engineers and Scientists

simple definition, adapted from Hopgood (2005) by the insertion of the phrase in
parenthesis:

Artificial intelligence is the science of mimicking (or exceeding) human


mental faculties in a computer.

The ultimate achievement in this field would be to construct a machine that can
mimic or exceed all human mental capabilities, including reasoning, understanding,
imagination, recognition, creativity, and emotions. We are a long way from achiev-
ing that ambition, but some successes have been achieved in mimicking specific
areas of human mental activity. For instance, machines are now able to play chess at
the highest level, to interpret spoken sentences, to translate foreign languages, and to
diagnose medical complaints. An objection to these claimed successes might be that
the machine does not tackle these problems in the same way that a human would.
A further objection might be that the field of AI should not be limited to human
intelligence, but it should include other animal species too. These objections will not
be addressed in this book, which is intended as a guide to practical systems and not
a philosophical thesis.
In some specialized fields, like interpreting astronomical images, AI can already
exceed human capabilities (Hausen and Robertson 2020). In some other fields, the
aim is not to produce the best possible form of AI, but rather to mimic human
behavior or capabilities. Some examples include an AI opponent in video games, or
a model of human responses in cybersecurity development.
In achieving its successes, research into AI, together with other branches of com-
puter science, has resulted in the development of several useful computing tools that
form the basis of this book. These tools have a range of potential applications, but
this book emphasizes their use in engineering and science. The tools of particular
interest can be roughly divided between knowledge-based systems (KBSs), computa-
tional intelligence (CI), and hybrid systems. KBSs include expert and rule-based sys-
tems, frame-based systems, intelligent agents, and case-based reasoning. CI includes
neural networks, genetic algorithms, and other optimization algorithms. Techniques
for handling uncertainty, such as fuzzy logic, fit into both categories.
Machine learning describes intelligent systems that improve their performance
through experience. Typically, this phrase refers to CI and specifically to complex
neural networks that learn to recognize patterns from enormous volumes of data
(so-called big data), as described in Chapter 9: Deep Neural Networks. However,
there are many other forms of data-driven machine learning, described in Chapters
6–8. Furthermore, some KBSs also have the ability to grow their knowledge, and
these techniques are covered in Chapter 5: Symbolic Learning.
Intelligent systems is a broad term, covering a range of AI techniques and the ways
in which they can be put into practice. They include applied KBSs, CI, machine
learning, and their hybrids. Intelligent systems have not solved the problem of
building an artificial mind. Indeed, some would argue that they show little, if any,
Introduction ◾ 3

real intelligence. Nevertheless, they have enabled a range of problems to be tackled


that were previously considered too difficult, and they have enabled a large number
of other problems to be tackled more effectively. From a pragmatic point of view,
these successes alone make intelligent systems interesting and useful.

1.2 A Spectrum of Intelligent Behavior


The definition of AI presented earlier leaves the notion of intelligence rather vague.
To explore this further, a spectrum of intelligent behaviors can be drawn based on
the level of understanding involved (Hopgood 2003, 2005), as shown in Figure 1.1.
The lowest-level behaviors include instinctive reactions, such as withdrawing a hand
from a hot object or dodging a projectile. The mid-level behaviors include vision
and perception, language and interaction, and common-sense responses to unex-
pected events. These are capabilities that come naturally to humans, with little con-
scious thought. High-level behaviors demand specialist expertise such as in the legal
requirements of company takeovers or the interpretation of radiological images.
Such a spectrum of intelligent behaviors is useful for charting the progress of AI,
although it has been criticized for oversimplifying the many dimensions of intel-
ligence (Holmes 2003).
Conventional computing techniques have been developed to handle the low-
level decision-making and control needed at the low end of the spectrum. Extremely
effective computer systems have been developed for monitoring and controlling a
variety of equipment. An example of the close regulation and coordination that is
possible is demonstrated by various humanoid robots that show human-like mobility
(Sakagami et al. 2002; Firth 2007; Gouaillier et al. 2009; Niemüller et al. 2010). As
their capabilities for autonomous thought and understanding are improved through
technological development, their behaviors can be expected to expand upward from
the lower end of the spectrum.
Early AI research, in contrast, began with problems at the high-level end of
the spectrum. Two early applications, for example, concerned the specialist areas of
mass spectrometry (Buchanan et al. 1969) and bacterial blood infections (Shortliffe
1976). These early triumphs generated great optimism. If a computer could deal
with difficult problems that are beyond the capabilities of most ordinary people,
it was assumed that more modest human reasoning would be straightforward.
Unfortunately, this assumption is false.

regulation – reaction – coordination – perception – common sense – interaction – planning – expertise

level of understanding

Figure 1.1 A spectrum of intelligent behavior.


4 ◾ Intelligent Systems for Engineers and Scientists

Figure 1.2 The challenges of image recognition and interpretation.

The behaviors in the middle of the spectrum, that humans perform with barely
a conscious thought, have proven to be the most difficult to emulate in a com-
puter. Consider the photograph in Figure 1.2. Although most of us can recognize
the three rabbits in the picture (one of which is a stone statue), the perception
involved is an extremely complex behavior. First, recognizing the boundary between
objects is difficult. Once an object has been delineated, recognition is far from
straightforward. For instance, rabbits come in different shapes, sizes, and colors.
They can assume different postures, and they may be partially occluded, like the
one in the cage in Figure 1.2. Yet a fully sighted human can perform this perception
in an instant, without considering it a particular mark of intelligence. The task’s
astonishing complexity is revealed by attempting to perform it with a computer
(Hopgood 2003, 2005).

1.3 Knowledge-Based Systems (KBSs)


The principal difference between a KBS and a conventional program lies in its struc-
ture. In a conventional program, domain knowledge is intimately intertwined with
software for controlling the application of that knowledge. In a KBS, the two roles
are explicitly separated. In the simplest case, there are two modules: the knowledge
module is called the knowledge base, and the control module is called the inference
engine (Figure 1.3). In more complex systems, the inference engine itself may be
Introduction ◾ 5

Extra frills,
Knowledge Explanation
common in
acquisition module module
expert systems

Knowledge base Inference engine


Essential
components
Interface to the outside world

Humans Hardware Data Other software

Figure 1.3 The main components of a knowledge-based system.

a KBS containing metaknowledge, that is, knowledge of how to apply the domain
knowledge.
The explicit separation of knowledge from control of its application makes it
easier to add new knowledge, either during program development or in the light
of experience during the program’s lifetime. There is an analogy with the brain, the
control processes of which are approximately unchanging in their nature, like the
inference engine. On the other hand, individual behavior is continually modified by
new knowledge and experience, like updating the knowledge base.
Suppose that a professional engineer uses a conventional program to support his
or her everyday work. Altering the behavior of the program would require him or
her to become immersed in the details of the program’s implementation. Typically,
this would involve altering the control structures of the form:

if...then...else...

or

for x from a to b do...

To achieve these changes, the engineer needs to be a proficient programmer. Even


if he or she does have this skill, modifications of the kind described are unwieldy and
are difficult to make without unwittingly altering some other aspect of the program’s
behavior.
The KBS approach is more straightforward. The knowledge is represented explic-
itly in the knowledge base, not implicitly within the structure of a program. Thus,
the knowledge can be altered with relative ease. The inference engine uses the knowl-
edge base to tackle a particular task in a manner that is analogous to a conventional
program using a data file.
6 ◾ Intelligent Systems for Engineers and Scientists

1.4 The Knowledge Base


1.4.1 Rules and Facts
The knowledge base may be rich with diverse forms of knowledge. Rules and facts are
among the most straightforward means of representing knowledge in a knowledge
base. Nevertheless, the rules may be complex, and the facts may include sequences,
structured entities, attributes of such entities, and the relationships between them.
The simplest type of rule is called a production rule and takes the form:

if <condition> then <conclusion>

The details of the representation used vary from system to system. Using the syntax
of the Flex™ KBS toolkit (Melioli et al. 2014; Mutawa and Alzuwawi 2019) and
its VisiRule™ visual programming interface (Spenser 2007; Muraina et al. 2016),
an example production rule for dealing with the payroll of ACME, Inc., might be:

rule r1_1
if the employer of Person is acme
then the salary of Person becomes large.

Part of the attraction of using production rules is that they can often be written in
a form that closely resembles natural language, as opposed to a computer language.
The use of capitalization indicates that Person is a local variable that can be replaced
by a constant value, such as joe_bloggs or mary_smith, through the process of
pattern matching. A fact in this KBS might be as follows, where the symbols /* and
*/ delineate comments that are ignored by the computer:

/* fact f1_1 */
the employer of joe_bloggs is acme.

Facts such as this one may be made available to the KBS at the outset, in which case
it is a static fact, or while the system is running, in which case it is a transient fact. In
each case, these are known as given facts, as they are given to the KBS. One or more
given facts may satisfy the condition of a rule, resulting in the generation of a new fact,
known as a derived fact. For example, by applying rule r1_1 to fact f1_1, we can derive:
/* derived fact f1_2 */
the salary of joe_bloggs is large.

Here, the name joe_bloggs from fact f1_1 has been pattern-matched to the vari-
able Person from rule r1_1 to produce the new derived fact. The derived fact may
satisfy, or partially satisfy, another rule, such as:

rule r1_2
if the salary of Person is large
Introduction ◾ 7

or the job_satisfaction of Person is true


t
hen the professional_contentment of Person becomes true.

This rule, in turn, may lead to the generation of a new derived fact. Rules r1_1 and
r1_2 are interdependent, since the conclusion of one can satisfy the condition of
the other.

1.4.2 Inference Networks
The interdependencies among rules, such as r1_1 and r1_2 given in the previous
subsection, define a network. Such a network is shown in Figure 1.4 and is known
as an inference network. The example inference network of Figure 1.4 illustrates the
way in which facts can be logically combined to form new facts or conclusions. The
facts can be combined logically using and and or. For example, and is used where
happiness is concerned. For happiness to be true, both conditions, namely, domestic
bliss and professional contentment, have to be true. In the inference network, this
relationship is shown as a pair of arrows from the two facts to the conclusion hap-
piness, with the arrows linked by and. Professional contentment looks similar, arrows
from facts meeting at this conclusion, but they are linked by or. Thus professional
contentment is true, if either job satisfaction or large salary is true (or both are true).
Another type of connection is not. According to Figure 1.4, job satisfaction is
achieved through flexibility, responsibility, and the absence of stress. The negative
relationship with stress is shown by a dashed line labeled not.
An inference network can be constructed by taking facts, and by working out
what conditions have to be met for those facts to be true. After these conditions are
found, they can be added to the diagram and linked by a logical expression (such

Happiness
and

Domestic bliss Professional contentment

or

Stable relationship Job satisfaction Large salary


not
and
Flexibility Stress
Works for ACME
Responsibility

Figure 1.4 An inference network.


8 ◾ Intelligent Systems for Engineers and Scientists

as and, or, not). This analysis usually involves breaking down a complex logical
expression into smaller parts.
Let us now consider how we might represent these facts and the rules that link
them in a conventional program. We might start by creating a data record (a data
structure for grouping together different data types) for each employee. Rule r1_1
could be expressed easily enough as a conditional statement (if...then...), but
it would need to be carefully positioned within the program so that:

◾ the statement is applied whenever it is needed;


◾ all relevant variables are in scope (the scope of a variable is that part of the
program to which the declaration of the variable applies);
◾ any values that are assigned to variables remain active for as long as they are
needed; and
◾ the rest of the program is not disrupted.

In effect, the facts and rules are “hard-wired,” so that they become an intrinsic part
of the program. As many systems need hundreds or thousands of facts and rules,
slotting them into a conventional program is a difficult task. This difficulty can be
contrasted with a KBS, in which the rule and the fact are represented explicitly and
can be changed at will.
Rules such as rule r1_1 are a useful way of expressing many types of knowledge
and they are discussed in more detail in Chapter 2. It has been assumed so far that
we are dealing with certain knowledge. This is not always the case, and Chapter 3
discusses the use of uncertainty in rules. In the case of rule r1_1, uncertainty may
arise from three distinct sources:

◾ Uncertain evidence.
(Perhaps we are not certain that Joe Bloggs works for ACME.)
◾ Uncertain link between evidence and conclusion.
(We cannot be certain that a randomly selected ACME employee earns a large
salary, we just know that it is likely.)
◾ Vague rule.
(What is a “large” salary anyway?)

The first two sources of uncertainty can be handled by Bayesian updating of


probabilities or variants of this idea. The last source of uncertainty can be handled
by fuzzy sets and fuzzy logic. Special types of inference networks can be constructed
in which these uncertainties are attached to the inference linkages. Bayesian inference
networks are an example that will be introduced in Chapter 3.

1.4.3 Semantic Networks
Let us now consider facts in more detail. Facts may be static, in which case they
can be written into the knowledge base. Fact f1_1 falls into this category. Note
Introduction ◾ 9

that static facts need not be permanent, but they change sufficiently infrequently
that changes can be accommodated by updating the knowledge base when neces-
sary. In contrast, some facts may be transient. Transient facts (e.g., “Oil pressure is
3000 Nm−2,” “the user of this program is Adrian”) apply at a specific instance only,
or for a single run of the system. The knowledge base may contain defaults that can
be used as facts in the absence of transient facts to the contrary. Here is a collection
of English-language facts about my car:

◾ My car is a car (static relationship)


◾ A car is a vehicle (static relationship)
◾ A car has four wheels (static attribute)
◾ A car’s speed is 0 mph (default attribute)
◾ My car is red (static attribute)
◾ My car is in my garage (default relationship)
◾ My garage is a garage (static relationship)
◾ A garage is a building (static relationship)
◾ My garage is made from brick (static attribute)
◾ My car is in the High Street (transient relationship)
◾ The High Street is a street (static relationship)
◾ A street is a road (static relationship)

Notice that, in this list, we have distinguished between attributes and relation-
ships. Attributes are properties of object instances (such as my car) or object classes
(such as cars and vehicles). Relationships exist among instances of objects and classes
of objects. In this way, we can begin to build a model of the subject area of inter-
est, and this reliance on a model will be a recurring topic throughout this book.
Attributes and relationships can be represented as a network, known as an associative
network or semantic network, as shown in Figure 1.5.
The semantic network shown in Figure 1.5 illustrates a set of facts. The ovals
contain object instances (such as my_car), classes of objects (such as Vehicle), or
values of attributes (such as red). Class names such as Vehicle are convention-
ally capitalized in several computer languages, a convention that has been adopted
in Figure 1.5. (It is a separate convention from the capitalization of local variable
names in the Flex-format rules presented earlier.) The arrows between objects rep-
resent relationships between them and are labeled according to their type, such as
“is in.” Arrows are also used to link objects to their class and to the values of their
attributes. So, the attribute color labels the link between my_car (an object) and
red (an attribute value). Two ovals joined by a labeled arrow constitute a fact,
such as “my car is red.”
10 ◾ Intelligent Systems for Engineers and Scientists

four Vehicle Building

nu wh
of
m eel
is-a is-a

be s
r
Car Garage

ef ed
lt)
(d spe
instance of instance of

au
is-in my_garage
0 mph my_car
(default)
material

is-
r
lo

in
co
Brick
red high_street
instance of

is-a
Street Road

Figure 1.5 A semantic network with an overridden default. Class names are
capitalized.

It is important to understand the distinction between object instances and


classes of objects:

(a) Car and Vehicle are both classes of object. They are linked in Figure 1.5
by the relation “is a,” which could be expanded to “is a sub-class of.” The direc-
tion of the arrow is important, indicating that “Car is a Vehicle” and not
“Vehicle is a Car.”
(b) On the other hand, my_car is a unique entity. There may be an identical car
somewhere, but they are distinct instances. So, the relationship between my_
car and Car takes the form “is an instance of.”

At this stage, the semantic network is an unstructured collection of object instances,


classes, and attributes. In this representation, attributes are treated in the same way
as relationships. In Chapter 4 we will explore agents, objects, and frames, in which
relationships and attributes are represented explicitly in a formalized manner. This
more structured approach turns these ideas into a powerful programming technique.

1.5 Deduction, Abduction, and Induction


The rules that make up the inference network in Figure 1.4, and the network taken
as a whole, are used to link causes and effects:

if <cause> then <effect>

Using the inference network, we can infer that if Joe Bloggs works for ACME and
is in a stable relationship (the causes), then he is happy (the effect). This inference is
Introduction ◾ 11

the process of deduction. Many problems, such as diagnosis, involve reasoning in the
reverse direction, that is, we wish to ascertain a cause, given an effect. This process is
abduction. Given the observation that Joe Bloggs is happy, we can infer by abduction
that Joe Bloggs enjoys domestic bliss and professional contentment. However, this
conclusion is only valid if the inference network shows all of the ways in which a
person can find happiness. This limitation is the closed-world assumption, the impli-
cations of which are discussed in Chapters 2 and 13.
The inference network therefore represents a closed world, where nothing is
known beyond its boundaries. As each node represents a possible state of some
aspect of the world, a model of the current overall state of the world can be main-
tained. Such a model is dependent on the extent of the relationships between the
nodes in the inference network. In particular, if a change occurs in one aspect of
the world, many other nodes could be affected. Determining what else is changed
in the world model as a consequence of changing one particular thing is known as
the frame problem. In the description of Joe Bloggs’ world represented in Figure 1.4,
this problem is equivalent to determining the extent of the relationships between
the nodes. For example, if Joe Bloggs gets a new job, Figure 1.4 suggests that the
only direct change is his salary, which could change his professional contentment
and happiness. However, in a more complex model of Joe Bloggs’ world, many other
nodes could also be affected.
If we have many examples of causes and effects, we can infer the rule (or infer-
ence network) that links them. For instance, if every employee of ACME that we
have met earns a large salary, then we might infer rule r1_1:

rule r1_1
if the employer of Person is acme
then the salary of Person becomes large.

Inferring a rule from a set of example cases of cause and effect is termed induction.
We can summarize deduction, abduction, and induction as follows:

◾ deduction: cause + rule ⇒ effect


◾ abduction: effect + rule ⇒ cause
◾ induction: cause + effect ⇒ rule

1.6 The Inference Engine


Inference engines vary greatly according to the type and complexity of knowledge
with which they deal. Two important types of inference engines can be distinguished:
forward chaining and backward chaining. These may also be known as data driven
and goal driven, respectively. A KBS working in data-driven mode takes the available
information (the “given” facts) and generates as many derived facts as it can. The
output is therefore unpredictable. This approach may have either the advantage of
12 ◾ Intelligent Systems for Engineers and Scientists

leading to novel or innovative solutions to a problem or the disadvantage of wasting


time generating irrelevant information. The data-driven approach might typically be
used for problems of interpretation, where we wish to know whatever the system can
tell us about some data. A goal-driven strategy is appropriate when a more tightly
focused solution is required. For instance, a planning system may be required to
generate a plan for manufacturing a consumer product. Any other plans are irrel-
evant. A backward-chaining system might be presented with this proposition: “a
plan exists for manufacturing a widget.” It will then attempt to ascertain the truth
of this proposition by generating the plan, or it may conclude that the proposition
is false and that no plan is possible. Forward and backward chaining are discussed in
more detail in Chapter 2. Planning is discussed in Chapter 14.

1.7 Declarative and Procedural Programming


We have already seen that a distinctive characteristic of a KBS is that knowledge is
separated from reasoning. Within the knowledge base, the programmer expresses
information about the problem to be solved. Often this information is declara-
tive, that is, the programmer states some facts, rules, or relationships without hav-
ing to be concerned with the detail of how and when that information is applied.
Procedural programming involves telling the computer what to do, but declarative
programming involves telling the computer what it needs to know. The following
are three examples of declarative programming:

rule r1_3
if pressure > threshold
then valve becomes shut.

/* declare a simple fact */


do valve_A becomes shut.

/* declare a fact in the form of a relation */


relation connected (valve_B, tank_3).

Each example represents a piece of knowledge that could form part of a knowledge
base. The declarative programmer does not necessarily need to state explicitly how,
when, and if the knowledge should be used. These details are implicit in the infer-
ence engine. An inference engine is normally programmed procedurally; a set of
sequential commands is obeyed, which involves extracting and using information
from the knowledge base. This task can be made explicit by using metaknowledge
(knowledge about knowledge), for example,

metarule r1_4 /* not Flex format */


examine rules about valves before rules about pipes.
Introduction ◾ 13

Most conventional programming is procedural. Consider, for example, the follow-


ing Python program for reading integers from a file and printing them out:

# open the file to read integers from a file


# and print them out
filename = input("Please enter file name: ")
file = open(filename, 'r')
try:
# read the lines of the file
for line in file:
# break each line into a list of words
mylist = line.split()
for word in mylist:
try:
# convert each word to integer format and print
myinteger = int(word)
print(myinteger)
except ValueError:
# move on if a non-integer is found
pass
finally:
# close the file
file.close()

More compact programs could be written, but this version emphasizes that there
are explicit step-by-step instructions telling the computer to perform the following
actions:

1. Open a data file.


2. Read each line of data from the file in turn.
3. Split each line of data into a list of words.
4. For each word in the list that is a number, convert it to integer format and
store it in the variable myinteger.
5. Print out the value of myinteger.
6. If a word encountered in the list is not a number, move on.
7. Close the data file.

The data file, on the other hand, contains no instructions for the computer at all but
just information in the form of a set of integers. The procedural instructions for deter-
mining what the computer should do with the integers resides in the program. The
data file is therefore declarative, while the program is procedural. The data file is analo-
gous to a trivial knowledge base, and the program is analogous to the corresponding
inference engine. Of course, a proper knowledge base would be richer in content, per-
haps containing a combination of rules, facts, relations, and data. The corresponding
inference engine would be expected to interpret the knowledge, to combine it to form
an overall view, to apply the knowledge to data, and to make decisions.
14 ◾ Intelligent Systems for Engineers and Scientists

It would be an oversimplification to think that all knowledge bases are writ-


ten declaratively and that all inference engines are written procedurally. In real sys-
tems, a collection of declarative information, such as a rule set, often needs to be
embellished by some procedural information. Similarly, there are some inference
engines that have been programmed declaratively, notably those implemented in
Prolog (described in Chapter 11). Nevertheless, the declarative instructions must
eventually be translated into procedural ones, as the computer can only understand
procedural instructions at the machine-code level.

1.8 Expert Systems
Expert systems are a type of KBS designed to embody expertise in a particu-
lar specialized domain. Example domains might be configuring computer net-
works, diagnosing faults in machinery, or mineral prospecting. An expert system
is intended to act as a human expert who can be consulted on a range of problems
that fall within his or her domain of expertise. Typically, the user of an expert
system will enter into a dialogue in which he or she describes the problem, such
as the symptoms of a fault, and the expert system offers advice, suggestions, or
recommendations. The dialogue may be led by the expert system, so that the user
responds to a series of questions or enters information into a structured data-entry
form. Alternatively, the expert system may allow the user to take the initiative in
the consultation by allowing him or her to supply information without necessarily
being asked for it.
Since an expert system is a KBS that acts as a specialist consultant, it is often
proposed that an expert system must offer certain capabilities that mirror those of a
human consultant. In particular, it is often claimed that an expert system must be
capable of justifying its current line of inquiry and explaining its reasoning in arriv-
ing at a conclusion. This is the purpose of the explanation module in Figure 1.3.
As the knowledge in an expert system is explicitly represented, the system can, at
the very least, produce a trace of the facts and rules that have been used. The ability
of a system to explain its decisions is closely linked to trust in that system. It is an
advantage that KBSs have over computational intelligence, where the reasoning is
more opaque.
An expert system shell is an expert system with an empty knowledge base. These
shells are sold as software packages of varying complexity. In principle, it should
be possible to buy an expert system shell, build up a knowledge base, and thereby
produce an expert system. However, all domains are different, and it is difficult for a
software supplier to build a shell that adequately handles them all. The best shells are
flexible in their ability to represent and apply knowledge. Without this flexibility, it
may be necessary to generate rules and facts in a convoluted style in order to fit the
syntax or to force a certain kind of behavior from the system. This situation is not
much better than building a conventional program.
Introduction ◾ 15

1.9 Knowledge Acquisition
The representation of knowledge in a knowledge base can only be addressed once
the knowledge is known. There are three distinct approaches to acquiring the rel-
evant knowledge for a particular domain:

◾ The knowledge is teased out of a domain expert.


◾ The builder of the KBS is a domain expert.
◾ The system learns automatically from examples.

The first approach is commonly used, but it is fraught with difficulties. The
person who extracts the knowledge from the expert and encodes it in the knowl-
edge base is termed the knowledge engineer. Typically, the knowledge engineer inter-
views one or more domain experts and tries to make them articulate their in-depth
knowledge in a manner that the knowledge engineer can understand. The inevitable
communication difficulties can be avoided by the second approach, in which the
domain expert becomes a knowledge engineer, or the knowledge engineer becomes
a domain expert.
Finally, there are many circumstances in which the knowledge is either unknown
or cannot be expressed explicitly. In these circumstances it may be preferable to have
the system generate its own knowledge base from a set of examples. Techniques for
automatic learning are discussed in Chapters 5–10.

1.10 Search
Search is the key to practically all problem-solving tasks and has been a major focus
of research in intelligent systems. Problem-solving concerns the search for a solu-
tion. The detailed engineering applications discussed in this book include the search
for a design, plan, control action, or diagnosis of a fault. All of these applications
involve searching through the possible solutions, which comprise the search space,
to find one or more that are optimal or satisfactory. Search is also a key issue for the
internal workings of a KBS. The knowledge base may contain hundreds or thou-
sands of rules and facts. The principal role of the inference engine is to search for the
most appropriate item of knowledge to apply at any given moment (see Chapter 2).
In the case of searching the knowledge base, it is feasible (although not very
efficient) to test all of the alternatives before selecting one. This approach is known
as exhaustive search. In the search space of an application such as design or diagnosis,
exhaustive search is likely to be impractical since the number of candidate solutions
is so vast. A practical search therefore has to be selective. To this end, the candidate
solutions that make up the search space can be organized as a search tree.
The expression search tree indicates that solutions can be categorized in some fashion,
so that similar solutions are clustered together on the same branch of the tree. Figure 1.6
Other documents randomly have
different content
più modo al furore che dal popolo passò ai soldati. Erano questi in
grosso numero in Torino o nelle vicinanze; perciocchè il re, per non
essere del tutto a discrezione dei repubblicani, aveva raccolto i suoi
intorno alla sua regia sede; il che come disegno gli fu poscia
imputato dai repubblicani. Udironsi in questo mentre archibusate,
prima rare, poi moltiplicate: il popolo spaventato con una calca
incredibile fuggiva; i soldati piemontesi, cui niun comandamento
poteva più frenare, accorrevano a furore; alcuni soldati franzesi
restarono uccisi. Lo spavento, il furore, la vendetta occupavano le
menti d'ognuno. I Franzesi, che alloggiavano nella cittadella, udito il
romore delle armi e dai fuggenti il pericolo dei compagni,
precipitosamente già uscivano armati e pronti a far battaglia contro i
regi. Una estrema ruina sovrastava, presente il re, alla reale Torino.
In questo punto il generale Menard, che non per ufficio, ma per
accidente si trovava in Torino, veduto che se più si procedesse, vi
andava la salute dei Franzesi, la salute dei Piemontesi, correva in
mezzo a' suoi, comandava a Collin che non si movesse, e con le sue
esortazioni, con le sue minaccie, con l'autorità del suo grado tanto
operava, che fece fermare e tornare in cittadella i repubblicani,
impedì che traessero, soppresse i suoni concitatori, e frenò un
impeto, il cui fine, s'ei non fosse stato presente, sarebbe stato
funestissimo. Il governatore non tralasciò uffizio, perchè il furore
improvviso dei soldati piemontesi si raffrenasse, e diede ordine
perchè se ne tornassero alle loro stanze. Così fu salvata la capitale
del Piemonte dalla generosità di Menard e dalla moderazione di
Thaon di Sant'Andrea.
L'ambasciatore di Francia, che nell'ora del tumulto se ne stava
villeggiando sopra la collina di Torino, ebbe subito avviso
dell'accidente, e pregato dal ministro Priocca, della sicurtà di lui e di
tutta la sua famiglia promettendo, tornava la sera del medesimo
giorno. Da quell'uomo diritto e dabbene ch'egli era, quando non
isviato dai soldati fanatici, si dimostrò molto sdegnato contro Collin,
condannando con forti parole la sua condotta e la schifosa
mascherata. Poi per opera di lui fu Collin rimosso dal governo della
cittadella e surrogato Menard, non senza grande contentezza del
governo piemontese. Queste cose faceva Ginguenè sano; ma
aggirato di nuovo dai novatori, tornò nel suo male, ed ingannandosi
novellamente, incolpava il governo regio di congiura per ammazzare
tutti i Franzesi il giorno stesso che si era fatta la mascherata; e,
troppo facilmente condiscendendo ai desiderii di Brune, di nuovo
tormentava Priocca: addomandava con insolente istanza che il re
licenziasse tutti i suoi ministri e nuovi ne creasse in luogo loro;
intorno a che molti furono i contrasti, i quali finalmente però
terminarono con la dichiarazione che il re non voleva fare
cambiamenti, poichè non li poteva fare con giustizia.
Dalle precedenti narrazioni si raccoglie che le cose tra
l'ambasciatore di Francia ed il governo del Piemonte erano giunte al
punto estremo, nè alcun termine di concordia si vedeva possibile.
Continuamente instava Ginguenè presso al direttorio per la
rimozione del conte Balbo. Da un'altra parte il conte presso al
direttorio medesimo continuamente instava acciocchè chiamasse
Ginguenè. Questi chiamava Balbo spargitor d'oro, seminatore di
corruttele, agente operosissimo e pericoloso di tutta la lega europea
contro la Francia. Balbo chiamava Ginguenè uomo buono e stimabile
per le sue qualità private, ma cervello pieno di fantasmi lontani dal
vero, corrivo al prestar fede alle follie ed alle calunnie dei novatori,
accademico importuno, ambasciatore di penna intemperante e di
natura tale che non lasciasse pur respirare un momento quel
governo che avesse a fare con lui. Arrivarono in questo mentre le
novelle della mascherata e della domanda fatta da Ginguenè della
espulsione dei ministri. Si prevalse destramente e con molta istanza
Balbo de' due accidenti, come già si era prevalso della domanda
della cittadella. Per la qual cosa, giuntovi eziandio che Taleyrand
sapeva che la nuova confederazione contro la Francia si preparava,
ma non era ancora matura, e però voleva allontanar le cagioni di
nuovi scandali, prevalse l'ambasciator piemontese. Fu Ginguenè per
decreto del direttorio del 24 settembre richiamato dalla sua carica di
ambasciatore. Gli fu sostituito d'Eymar, uomo piuttosto non senza
lettere che letterato, amatore dei letterati e di natura dolcissima, ma
non d'animo tale che si potesse maneggiare con la fermezza
necessaria in tempi tanto tempestosi.
Gli altri fatti si apprestavano all'Italia. Mentre con maggiori
dimostrazioni di fede e di amicizia era l'ambasciatore Balbo
accarezzato da tutti i ministri e massimamente da Taleyrand in
Parigi, mandava il direttorio il generale Joubert, surrogato a Brune,
in Italia, con ordine di spegnere la potenza della casa di Savoia e di
far rivoluzione in Piemonte. Joubert sul suo primo arrivare, vedendo
che i tempi stringevano, non frappose indugio a mandar ad effetto
ciò che gli era stato commesso. Ma prima di venire ad una
deliberazione del tutto ostile, mandava a Torino l'aiutante generale
Munier con ordine di richiedere il re che desse incontanente i dieci
mila soldati, a' quali era obbligato per trattato d'alleanza, e li
mandasse a congiungersi coi Franzesi, ed, oltre a ciò, che rimettesse
in mano di lui l'arsenale di Torino, domanda di estremo momento,
per essere l'arsenale situato nella città stessa e vicino alla cittadella.
Rispose che darebbe incontanente i dieci mila soldati: mandò il
giorno stesso della richiesta gli ordini perchè si adunassero; spedì un
ufficiale a Milano, perchè consultasse col generalissimo intorno al
modo del marciare dell'esercito piemontese verso il franzese, e del
servire insieme l'uno con l'altro. Quanto all'arsenale, si espresse non
poterlo consegnare, perchè la domanda non era conforme al trattato
d'alleanza; avere spacciato a Parigi un uomo apposta affinchè questo
emergente si accordasse col direttorio.
Non contentandosi Joubert delle risposte, e di quali si sarebbe
contentato non si vede, si risolveva a mandar ad esecuzione quello
che gli era stato comandato. L'importanza del fatto in ciò consisteva
che la possessione della cittadella si rendesse sicura in mano dei
repubblicani. Perlochè il generalissimo vi mandava a governarla il dì
27 novembre il generale Grouchy in iscambio di Menard, ch'era
stimato od aborrente per natura da sì gravi ingiurie o non alieno dal
favorire gl'interessi del re. Mirava il direttorio a far rinunziare il re di
per sè stesso senza che si venisse all'esperimento dell'armi. Ma
dubitando che l'apparato della forza non bastasse a muover l'animo
di Carlo Emmanuele, si usò anche la astuzia. Per la qual cosa non sì
tosto era Grouchy giunto a Torino, che con tutte le arti procurava di
sapere per mezzo dei democrati del paese e di quanti altri potesse
adescare, quali fossero le intenzioni del re e dei ministri, e
soprattutto quali mezzi di difesa avessero. Nè abborrirono gli agenti
del direttorio sapendo quanto Carlo Emmanuele fosse dedito alla
religione, dal tentar mezzi insoliti di sedizione con volersi insinuare
presso al suo confessore, affinchè l'esortasse alla rinunzia. Nè solo
l'abdicazione procuravano, ma volevano che il re per l'atto stesso
della sua rinunzia ordinasse ai Piemontesi ed a' suoi soldati che non
si muovessero ed obbedissero al governo temporaneo che sarebbe
instituito. Riuscì il generale di Francia, che sul primo giungere si era
tenuto nascosto, a procurarsi segrete intelligenze con uomini
d'importanza; ma il tentativo della confessione non ebbe effetto per
la rettitudine del confessore. Moltiplicavansi intanto le bocche da
fuoco contro la città: il terrore cresceva; chiamava il governo i
reggimenti sparsi a difendere Torino, ed eglino con presti passi
accorrevano: i fati sovrastavano e chiamavano a rovina e la reggia e
i popoli e il Piemonte. Già i repubblicani ordinati da Jubert
marciavano a distruggere un re tante volte assalito con ingiurie, di
cui con fraude avevano occupato la fortezza difenditrice de' suoi tetti
e de' suoi penetrali stessi, ed al quale altro fondamento non restava
consolativo ma insufficiente, che la fede dei soldati e la devozione
dei popoli. Pubblicava Joubert il dì 5 dicembre queste parole.
«La corte di Torino ha colmo la misura ed ha mandato giù la
visiera: da lungo tempo gran delitti ha commesso; sangue di
repubblicani piemontesi fu versato in copia da questa corte perfida:
sperava il governo franzese, amatore della pace, con mezzi di
conciliazione rappacificarla, sperava ristorar i mali di una lunga
guerra, sperava dar quiete al Piemonte con istringere ogni giorno più
la sua alleanza con lui: ma fu Francia vilmente ingannata delle sue
speranze da una corte infedele ai trattati. Per la qual cosa ella
comanda oggi al suo generale di non più prestar fede a gente
perfida, di vendicar l'onore della grande nazione, e di portar pace e
felicità al Piemonte: per questi motivi l'esercito repubblicano corre ad
occupare i dominii piemontesi.»
Nel mentre che Joubert così parlava, Victor e Desoles, raunatisi
con le schiere loro nelle vicinanze di Pavia, ad Abbiategrasso ed a
Buffalora, passato il Ticino, si avviavano a Novara, nella quale
entrarono per uno stratagemma militare di soldati nascosti in certe
carrette. Presa Novara, spingevano le prime squadre insino a
Vercelli. L'aiutante generale Louis s'impadroniva di Susa, Casabianca
di Cuneo, Montrichard di Alessandria, sorprendendo in ogni luogo i
soldati regi, facendone prigionieri i governatori. Avuta Alessandria,
Montrichard s'incamminava ad Asti, donde, spingendosi più avanti,
andò a piantare gli alloggiamenti sulla collina di Superga, che da
levante signoreggia la capitale del regno. In questo mezzo tempo
ordinava Grouchy, che gli ambasciatori di Francia e della Cisalpina si
ricovrassero nella cittadella, il che tostamente eseguirono, tolte
prima dalle loro case le insegne delle loro repubbliche. Poi
penuriando la cittadella di munizioni, massimamente di proietti
poichè intenzione dei repubblicani era di voltar sotto sopra e
d'incendiar Torino se l'esercito francese fosse obbligato di
rendersene padrone per forza, operarono di modo che si
trasportasse di nascosto dall'arsenale nella fortezza armi e munizioni
d'ogni genere, procurandosi in tale modo le armi del re per
combatterlo e distruggerlo. Era di non poca importanza pei
repubblicani che in loro potere recassero Chivasso terra munita di un
forte presidio e per cui Victor doveva passare per venirsene da
Vercelli a Torino. A questo fine e per obbedire al generalissimo
mandava Grouchy segretamente una colonna di buoni soldati, i quali
arrivati inopinatamente sopra Chivasso ed aiutati dai soldati di nuova
leva, che qui per accidente alloggiavano, l'occuparono facilmente.
Rovinava tutto ad un tratto e per ogni parte lo stato del re, usando i
repubblicani per sorpresa contro di lui gli estremi della guerra,
quantunque ancora il governo loro non l'avesse dichiarata.
Intanto si continuava nelle dissimulazioni. Scrivevano al
governator di Torino assicurandolo che quanto si faceva solo si
faceva per modo di cautela e che se per questo si attentasse di por
le mani addosso ad un solo amatore di libertà o francese o
piemontese che si fosse, incendierebbero la città e farebbero che di
lei pietra sopra pietra non rimanesse. Il governo pubblicava un
manifesto con cui esortava gli abitatori a restarsene quieti, chiamava
i Franzesi gli alleati più fedeli che si avesse, affermava che niuno
nissuna cosa aveva a temere da loro. Mentre si appiccava questo
manifesto sui muri, ecco giungere le novelle, che già erano prese
Novara, Susa, Chivasso, Alessandria, che già Torino era stretto da
ogni parte da gente nemica, che già le truppe regie sorprese ed
assaltate all'impensato erano state disarmate e poste in condizione
di prigioniere. Vide allora il re che ogni speranza era spenta, che i
fati repubblicani prevalevano, ch'era perduto il regno, che mille anni
di dominio della sua reale casa erano giunti al fine. Restava, poichè
perdeva la potenza, che non perdesse l'onore; volle che i posteri
sapessero che periva innocente. Pubblicava adunque Priocca il 7
decembre le sue ultime parole; ma anche le sue generose, le giuste
sue difese gli vennero poco dopo interdette ed anzi imputate a
delitto da chi non solo abusava della forza propria, ma ancora si
sdegnava dalle ragioni altrui.
Intanto perchè si venisse a conclusione si moltiplicavano le arti e
gli spaventi; si parlava che a nissun'altra condizione sarebbero i
Franzesi contenti che all'abdicazione. Cedesse al fato, nè v'era modo
da ostare, giacchè Carlo Emmanuele era chiamato a distruzione dal
suo alleato. L'atto di abdicazione fu accordato e stipulato il dì 9 di
dicembre in Torino, per parte della repubblica dal generale Clauzel, e
per parte del re da Raimondo di San Germano, personaggio di molta,
anzi di unica autorità appresso di lui. Non si soddisfecero i
repubblicani di torgli lo stato, ma vollero anche amareggiarlo
obbligandolo a ritrattarsi pubblicamente del manifesto del giorno 7,
ed a mandar Priocca in mano loro alla cittadella, come sigurtà di non
resistenza e come testimonio di ritrattazione. Vollero eziandio,
essendosi persuasi che il duca d'Aosta fosse mosso da avversioni
eccessive contro di loro e capace di venire a qualche tentativo
d'importanza, che anch'esso sottoscrivesse l'abdicazione. Per questa
cagione si vede sul fine dell'atto, dopo il nome di Carlo Emmanuele
quello di Vittorio Emmanuele con queste parole: Io prometto di non
dare impedimento all'esecuzione di questo trattato.
Fu in buon punto pel re e per tutta la sua famiglia, che Grouchy e
Clauzel con tanta pressa lo avessero sforzato alla rinunzia;
conciossiacosachè aveva il direttorio comandato che fossero condotti
in Francia, compiacendosi nel pensiero di mostrare ai repubblicani,
come a guisa di trionfo, un re e molti principi debellati e cattivi. Ma
Taleyrand, al quale se piacevano le opere astute non piacevano le
giacobiniche, aveva mandato a Joubert, innanzi che spedisse gli
ordini del direttorio, che sforzasse presto il re alla rinunzia, non
imponendo la condizione della cattività dei reali. Da che ne seguitò
che avevano già fatta la rinunzia e già erano arrivati a Parma,
quando pervenne a Joubert gli spacci per la cattività loro. Clauzel,
che aveva richiesto sui primi negoziati la persona del duca d'Aosta
come ostaggio per la osservanza dei patti e qualche timore del suo
nome, udite le rimostranze del re e della regina, facilmente se ne
rimase: il che fu cagione che il re il presentasse della celebre tavola
di Gerardo Dow, in cui è dipinta con tanta maestria la idropica.
Accordossi nell'atto dell'abdicazione che il re rinunziava alla sua
potestà, e comandava ai Piemontesi che obbedissero al governo
temporaneo da instituirsi dal generale di Francia; comandava altresì
a' suoi soldati che come parte dell'esercito franzese si
sottomettessero al generale medesimo; disdiceva il manifesto del
giorno 7 e mandava il suo ministro Damiano di Priocca nella
cittadella: che il governatore della città si conformasse alla volontà
del comandante della cittadella; che fosse sicura la religione, sicure
parimente le persone e le proprietà; che i Piemontesi che
desiderassero spatriarsi, il potessero fare liberamente con facoltà di
portarsene il loro mobile e di vendere gli stabili, e che i Piemontesi
fuorusciti che volessero ripatriarsi, medesimamente il potessero fare
e ricuperassero tutti i diritti loro; potesse liberamente il re con tutta
la sua famiglia ritirarsi in Sardegna; finchè in Piemonte fosse, si
conservassero i suoi palazzi e le sue ville libere; gli si dessero i
passaporti e scorta mezza franzese e mezza piemontese; se il
principe di Carignano eleggesse di rimanersi in Piemonte o di
andarsene, sì liberamente il potesse fare, con godersi e con disporre
de' suoi beni; incontanente si suggellassero gli archivii e le casse
dell'erario; non si accettassero nei porti della Sardegna le navi delle
potenze nemiche di Francia.
Creava Joubert un governo che per modo di provvisione ed insino
a tanto che i tempi permettessero un assetto definitivo, reggesse il
Piemonte. Vi chiamava per un primo decreto Favrat, Botton di
Castellamonte, San Martino della Motta, Fasella, Bertolotti, Bossi,
Colla, Fava, Bono, Galli, Braida, Cavalli, Bandisone, Rossi, Sartoris;
per un secondo, Cerise, Avogadro, Botta, Chiabrera, Bellini. Erano
uomini d'onorate qualità ed i più splendevano egregiamente o per
dottrina, o per virtù, o per altezza di cariche o per nobiltà di natali, e
molti per tutte queste qualità insieme, nè erano certamente degni di
governare in tempi sì miseri la patria loro; sì che in breve non per
colpa propria, ma dei tempi, perdettero presso i compatriotti loro la
confidenza, presso i forastieri l'amicizia.
Grouchy, conseguita una tanta mutazione sforzava i soldati
Piemontesi a giurare in nome della repubblica Franzese: il che fecero
piuttosto sbalorditi dal caso che per volontà deliberata. Damiano di
Priocca andava a porsi in cittadella in potestà dei repubblicani;
Priocca, esempio d'animo forte, di mente sana, di sincerità singolare
e d'una fede inalterabile; uno degli uomini dei quali l'Italia e
l'umanità più si debbono pregiare.
Abbandonava il re, abbandonavano i reali di Piemonte la gloriosa
sede degli antenati loro. Era la notte, fra le 9 e le 10 della sera,
oscura e piovosa; occupava la città un alto terrore: scendevano al
lume dei doppieri le scale, ed usciti dalla porta che dà nel giardino e
quivi in carrozza montati, per l'altra porta ch'è tra le due del palazzo
e del Po, alla strada maestra di verso Italia pervenivano. Lasciava il
re nelle abbandonate stanze per una continenza che mai non si
potrà abbastanza lodare e per debito di religione, come protestava,
le gioie preziose della corona, tutte le argenterie e settecento mila
lire in doppie d'oro. Alcuni fra i principi piangevano; il re e la regina
mostravano una grandissima costanza. Scortavangli ottanta soldati a
cavallo franzesi, altrettanti piemontesi; gli accompagnavano fino a
Livorno di Piemonte. Condussersi gli esuli principi in Parma, poi in
Firenze: quivi furono accolti dal granduca come si conveniva al
grado, alla parentela ed alla disgrazia. Fu suggellato il palazzo reale
dal commissario del direttorio Amelot, e dall'architetto Piacenza,
architetto del re. Ma alcuni giorni dopo, rotti i suggelli da uomini
rapacissimi, furono portate via le gioie e le altre suppellettili preziose,
alle quali Carlo Emmanuele per la sua illibatezza e sincerità aveva,
partendo, portato rispetto.
Così ruinò la casa reale di Savoia. Nè sapremmo se si abbia a
raccontare l'intimazione di guerra fatta il dì 12 dicembre dal
direttorio, quando già la guerra non solo era stata fatta, ma anche
terminata con la distruzione dell'autorità regia in Piemonte.
Partito il re da Livorno di Toscana in sull'entrare del 1799,
arrivava il 3 di marzo, in cospetto di Cagliari. Quivi, vistosi in potestà
propria, volle fare manifesto a ciascuno e pubblicò solennemente,
come altamente ed in cospetto di tutta Europa ei protestasse contro
gli atti, per forza dei quali era stato costretto ad abbandonare i suoi
territorii di terraferma, ed a rinunziare per un tempo all'esercizio
della sua potenza. Accoglievano i Sardi, come ben si conveniva, con
dimostrazioni di rispetto e d'amore l'esule stirpe di Emmanuele
Filiberto.
Mentre la sede antica dei re di Sardegna diveniva preda dei
repubblicani, le sorti della parte meridionale d'Italia, tentate dal re di
Napoli, partorivano accidenti insoliti e terribili. Non aveva il generale
Mack trovato nello Stato romano quel seguito, che si era concetto
con la speranza, poichè l'essersi ritirati, ma interi, non rotti, i
Franzesi, e la fama ancor fresca del loro valore, davano timore, che
ove fossero ingrossati, si precipitassero di nuovo alle offese con
danno estremo di coloro, che troppo vivamente si fossero scoperti
contro di loro. Il terrore poi concetto per le infelici pruove fatte
contro i medesimi in parecchie parti d'Italia, massimamente il caso
spaventoso di Verona, teneva sospeso l'animo d'ognuno, impediva
che si movesse cosa alcuna contro i repubblicani, e frenava i popoli
desiderosi di prorompere. Si aggiungeva che sebbene i Romani
odiassero i Franzesi, non amavano però i Napolitani, e pareva loro di
uscire da una servitù abbominata per sottentrare ad un'altra forse
non meno odiosa. Tutte queste cose non erano nascoste a Mach, e
però argomentando che la guerra era piuttosto incominciata di nome
che di fatto, e che se con qualche fazione importante, in cui si
venisse al sangue, non dimostrava che le mani fossero tanto forti
quanto le lingue pronte, il tempo avrebbe presto condotto una
mutazione di fortuna, si deliberava ad andare all'incontro delle armi
repubblicane. Del che tanto maggiore necessità gli sovrastava,
quanto Championnet raccoglieva genti in fretta e continuamente si
ingrossava.
Avendo adunque avuto avviso che con felice navigazione era
Naselli sbarcato a Livorno e Ruggero di Damas ad Orbitello, si
muoveva a tentare la fortuna delle battaglie, eleggendo di far impeto
contro l'ala destra dell'esercito franzese che, governata dal generale
Macdonald, da Terni si distendeva fin verso Nepi, Cività castellana e
Monterosi.
Marciava Mack, divisi i suoi in cinque schiere, il dì 5 dicembre, da
Baccano contro i repubblicani, mentre al tempo stesso ordinava un
moto verso Civitaducale per tener in rispetto i Franzesi da quella
banda. Prevaleva di gran lunga di numero, conducendo quaranta
mila soldati contro un nemico, che se arrivava agli otto mila, non li
passava, poichè in questo numero consisteva l'ala destra dei
repubblicani. Sboccava la prima schiera Napolitana verso Nepi, la
seconda, insistendo sull'antica via romana, verso Rignano, la terza
verso Santa Maria di Falori, schiere destinate tutte a combattere
sulla destra sponda del Tevere. La quarta aveva il carico
d'impadronirsi di Vignanello per guadagnare la terra d'Osta, e quivi
varcare il fiume. Finalmente per fare un po' di spalla a destra a tutte
queste genti, la quinta schiera dei regi marciava contro a Magliano, e
già aveva traversato il Tevere al passo di Ponzano.
I Franzesi, sentita prestamente la venuta del nemico, non si
fermarono ad aspettarlo, ma siccome quelli che stimavano sè stessi
da quegli uomini valorosi che erano e tenendo in poco conto le genti
napolitane, uscirono incontanente ad incontrarle. I capi poco
dubitavano della vittoria, perchè oltre il provato valore dei soldati,
sapevano che gli assalti dei Franzesi, per la natura pronta dalla
nazione, sono sempre più fortunati che le difese.
Non fu l'esito diverso dalle speranze. Kellerman, figliuolo del
vecchio generale di questo nome, contuttochè sulle prime trovasse
un duro incontro, ruppe la prima napolitana schiera, cacciolla infino a
Monterosi, e quivi rompendola di nuovo, tagliava a pezzi i valorosi,
disperdeva i codardi. Non procedettero con maggior riputazione le
cose dei Napolitani dalle altre parti: il colonnello Lahure ruppe la
schiera di Rugnano, sebbene sulle prime avesse perduto del campo;
perchè Macdonald con pronti aiuti soccorrendolo, lo ebbe tostamente
abilitato alla vittoria. S'incontrava la schiera che giva all'assalto di
Santa Maria di Falori, in una squadra polacca capitanata dal generale
Kniazewitz e che aveva con sè una legione romana, che aveva alzate
le bandiere della repubblica. Polacchi e Romani valorosissimamente
combatterono: i Napolitani andarono in volta, non senza grave
perdita d'uomini, d'armi e di bagaglie. Il generale Maurizio Mathieu
affrontava, così avendo ordinato Macdonald, la quarta schiera, la
quale cedendo si ricoverava nella terra di Vignanello forte per sito e
cinta di buone mura. Si difendevano i Napolitani virilmente, sapendo
che questa fazione era di grandissima importanza; erano anche
aiutati dai terrazzani, nemicissimi del nome franzese. Ma Mathieu
tanto fece con le armi e con le minaccie, che sforzava i Napolitani a
lasciar la terra libera al vincitore. Entraronvi i Franzesi trionfando,
non senza qualche licenza, come di gente vincitrice ed irritata.
Acquistato Vignanello, correva Mathieu ad assicurare il ponte di
Borghetto.
Restava la quinta schiera che camminava verso Magliano; ma
udite le infelici novelle delle compagne, se ne tornava, senza aver
combattuto, per Ponzano, al principale alloggiamento dell'esercito
regio. Così pel valore delle sue genti e per l'arte egregia con la quale
le mosse, venne fatto a Macdonald di variare lo stato della guerra e
di riuscir vincitore da un assalto molto pericoloso.
Ma, non ostante le battaglie combattute infelicemente dal
generale napolitano sulla destra riva del Tevere, la guerra non era
ancora vinta; perchè da una parte il conte Ruggiero di Damas
venendo da Orbitello si avvicinava, dall'altro rimanevano ancora sulla
sponda sinistra del fiume ai Napolitani genti superiori per numero ai
loro nemici. Per la qual cosa Mack, non disperando ancora delle
sorti, si accingeva a fare un nuovo sforzo sulla sponda medesima, il
cui fine era di rompere la schiera di mezzo di Championnet; il che
avrebbe disgiunto le due ali franzesi. Ebbe il generale franzese sicuro
e pronto avviso dell'intento del suo avversario. Laonde per resistere
a quel nuovo impeto e non si commettere se non con vantaggio alla
fortuna, ristringeva i suoi ed affortificava con nuove genti i luoghi di
Contigliano e di Magliano. Poi fe' ritirare Macdonald da
Civitacastellana, solo lasciato un presidio nel forte di Borghetto
affinchè quivi validamente difendesse il passo del fiume. Finalmente
chiamava il generale Lemoine, che oltre l'Apennino sotto il freno di
Duhesme combatteva contro il cavaliere Micheroux, generale del re,
ad occupare Civitaducale e Rieti, la prima città del regno, la seconda,
dello Stato romano.
Le cose succedevano a prima giunta prosperamente ai
Napolitani; conciossiachè, sebbene per opera di Mathieu fossero stati
scacciati da Magliano, che già avevano conquistato, una loro schiera
di gran polso, sotto guida del generale Moesk, si era, cacciatone di
forza i Franzesi, impadronita di Otricoli, e già faceva correre da' suoi
cavalleggieri la strada per a Narni. La guerra diveniva pericolosa pei
Franzesi. Ma non perdutisi punto d'animo si risolvevano al
combattere, e provarono tostamente che nelle battaglie più può
l'ardire che la prudenza; poichè Mathieu, per comandamento di
Macdonald, assaltò furiosamente i Napolitani in Otricoli, e,
quantunque valorosamente si difendessero, li vinse con perdita di
due mila soldati, di cinquecento cavalli, di otto cannoni e di tre
bandiere. Diedero in questo fatto pruove di singolar valore i Polacchi
e fu ferito in una gamba un Santacroce, principe romano, che
combatteva per la repubblica. Ritirossi Moesk colle reliquie de' suoi a
Calvi, dove per la fortezza del sito si poteva sostenere e fare ancor
dubbia la vittoria. Ma lo stesso Mathieu, già vincitore di tanti fatti per
valore di questa napolitana guerra mandato da Macdonald, vincitore
ancor esso dei fatti medesimi per perizia, occupate le eminenze che
stanno a sopraccapo alla terra e minacciato aspramente Moesk se
non si arrendesse, il costringeva, aiutato anche dalla presenza di
Macdonald sopraggiunto in quel frangente, alla dedizione. Questo
fatto ruppe ad un punto tutte le speranze cui Mack aveva concetto di
poter durare nello Stato romano, e lo fece accorgere che niun altro
scampo gli restava che quello di ritirarsi con presti passi nel regno.
Già il re, udite le sinistre novelle ed abbandonata Roma, si era
avviato prima a Caserta, poscia a Napoli; Mack, raccolti più
prestamente che potè tutti i suoi, andava a Capua, in cui sperava di
difender Napoli, giacchè non aveva potuto difendere Roma nè a Calvi
nè a Cantalupo. Entravano i Franzesi vittoriosi in Roma, donde
diciassette giorni prima erano partiti non vinti. Tornaronvi i consoli ad
occupare le perdute sedi.
Le cose dei Napolitani non avendo fatto sulla destra del Tevere
quella resistenza che il conte Ruggiero aveva sperato, gli era
divenuto impossibile di congiungersi con la sua schiera sinistra.
Rifulse in sì estremo accidente la virtù del conte; poichè, non
isgomentatosi punto, se ne continuava a marciare con sette mila
soldati da Baccano verso Roma. Championnet attonito a caso tanto
improvviso, mandava il suo aiutante Bonami a sapere che cosa
volesse dir questo. Gli fu risposto dal conte che voleva passare, o per
amore o per forza, per ritornare nel regno; ed ottenuto un indugio
dal nemico per trattare un accordo, avvisando che Bonami non
aveva dato tempo per altro motivo che per far accorrere nuove
genti, levava, più tacitamente che poteva, il campo, incamminandosi
più che di passo alla volta di Orbitello. Giunto alla Storta, vi fu il suo
retroguardo combattuto dai repubblicani, ma difesosi virilmente,
acquistava facoltà del continuare virilmente. Calava intanto a far le
sue condizioni più pericolose Kellermann da Borghetto. Incontratisi
repubblicani e regi a Toscanella, si travagliavano con un conflitto
molto aspro. Il conte, con tuttocchè fosse ferito gravemente da una
scheggia in una gamba, continuava a combattere valorosamente; i
Napolitani incoraggiti dall'esempio del loro capo, si difendevano
anch'essi con molta costanza; nè si spiccarono dalla battaglia se non
quando per l'arrivo delle cavallerie di Kellermann, era divenuta
disuguale. Intanto non aveva omesso il conte mentre col retroguardo
arrestava l'impeto dei repubblicani, di accostarsi vieppiù
coll'antiguardo e col grosso della schiera ad Orbitello. Queste due
squadre nella cercata terra essendo giunte tostamente, vi
s'imbarcarono sulle navi napolitane che quivi le attendevano.
Restava che si conducesse a salvamento il retroguardo, che era
furiosamente seguitato dai Franzesi; ma non così tosto il conte col
retroguardo medesimo vi entrava, che chiuse le porte sul viso al
nemico, faceva le viste di volersi difendere. Si appicava intanto una
pratica tra di lui e Kellermann, per la conclusione della quale fu fatto
abilità al conte d'imbarcarsi con tutte le sue genti solo lasciando in
mano ai Franzesi le artiglierie. Viterbo vinta ed occupata dal
vincitore, pagò le pene d'aver anteposto lo Stato antico e dispotico
allo Stato nuovo e tirannico. Ciò nonostante non vi furono più
vendette esorbitanti, ed il giovane Kellermann vi si portò più
moderatamente che i tempi non comportassero.
Riconquistata Roma ed atterriti i Napolitani, pensava
Championnet ad assicurarsi ed ampliare la vittoria; ed ancorchè non
avesse un esercito bastante pel numero dei soldati a conquistare il
regno, tuttavia considerato il lor valore il terrore dei vincitori e la
forza delle opinioni favorevoli, che da lungo tempo e largamente vi si
erano sparse e che ora più potentemente operavano per la vicinanza
dei Franzesi e per la sconfitta dell'esercito regio, si risolveva a tentar
l'impresa. A questo fine era necessario di debellare Capua, ultimo
propugnacolo di Napoli per la fortezza della città, per la profondità
delle acque del Volturno e per avervi Mack adunato tutte le genti
ancora forti se non per valore, almeno per numero. Adunque il
generale della repubblica spartiva i suoi in due principali schiere,
delle quali la sinistra governata da Macdonald, correndo pei luoghi
superiori e più vicini agli Apennini doveva varcare il Garigliano ai
passi del Castelluccio e di Coprano, e al tempo stesso dare facoltà
alle genti di Duhesme e di Lemoine di congiungersi con lui a sforzo
comune contro Capua. La seconda schiera sotto la condotta di Rey,
radendo il lido, s'incamminava verso Terracina, con pensiero di
acquistare, strada facendo, Gaeta per una battaglia di mano, poi
comparire sotto le mura della desiderata Capua. Nè l'esito fu diverso
del disegno, perchè Macdonald e Rey, superati tutti gli ostacoli,
arrivavano alla designata oppugnazione sulle sponde del Volturno.
Precipitavano a gran rovina le cose del regno non essendosi
mostrato in sua difesa valore nissuno, se si eccettua il caso del conte
Ruggiero. Duhesme e Lemoine, ai quali andava avanti come
speculatore ed apritor di strade quell'arrischiato condottiere Rusca,
sui sinistri gioghi dell'Apennino insistendo, travagliavano più per gli
assalti improvvisi delle popolazioni mosse a rumore ed armate d'ogni
sorta d'armi, che per le battaglie delle genti regolari. Tuttavia a poco
a poco prevaleva il valore regolato. Lemoine acquistava Aquila, dove
trovava munizioni da bocca in abbondanza; poi si conduceva a
Sulmona, con intenzione di aspettar quivi Duhesme, che più vicino
correva le sponde dell'Adriatico. Grave intoppo ai disegni di Duhesme
era Pescara, città che con la sua fortezza situata in luogo eminente
dominava tutto il pian paese all'intorno, e la sola strada a riva il mare
per la quale possono passare le artiglierie. Due mila soldati la
presidiavano, ma non fecero miglior pruova dei difensori di Gaeta;
perchè come prima i soldati della repubblica si mostravano sulle
alture che stanno a sopraccapo al ponte di Pescara, e le altre truppe
a Pianelle ed a Cività di Penna, il comandante pensò alla dedizione
dando in mano dai Franzesi quel luogo tanto forte per arte e per
natura, e tanto importante alla sicurezza del regno. Vi trovavano i
vincitori armi e munizioni in copia. Acquistata Pescara, procedeva
Duhesme a congiungersi, per la strada di Popoli, con Lemoine a
Sulmona, donde, varcato il sommo giogo dell'Apennino, condussero
entrambi tutta l'ala sinistra sotto le muraglie di Capua. Così non solo
erano in veemente movimento le cose di Napoli, ma ancora
cominciavano a precipitare a manifesta rovina.
Naselli, lasciato Livorno, perchè oltre la sconfitta dei regi, aveva
udito che Serrurier con una mano di soldati della repubblica già
aveva occupato Lucca e si apparecchiava ad andarlo e combattere,
imbarcate le genti sulle navi apprestate, veleggiava alla volta del
Garigliano.
Non erano senza fortezza i nuovi allogiamenti di Mack. Posto il
campo col grosso de' suoi nella pianura di Caserta, per modo che
fosse abile a difendere il passo del Volturno, aveva fatta Capua
sicura con un presidio di dieci mila soldati. Tra per questi e le genti
del campo, aveva ancora un novero di combattenti superiore a quello
dei Franzesi, e se avesse avuto e migliori soldati o più fedeli capitani
o minore capriccio in una certa squisitezza d'arte che gli faceva
sempre moltiplicare i casi fortuiti con allargar troppo il campo,
poteva ancor tenere la fortuna in pendente. Bene l'evento dimostrò
che Capua si poteva difendere e si perdè, non per forza, ma per
accordo.
Ma già i casi di Napoli diventavano più forti di tutte queste
condizioni unite insieme. Il ritorno tanto subito del re, le novelle
sinistre che ad ora ad ora pervenivano, l'aver perduto in più breve
tempo quello che in breve tempo si era acquistato, le dedizioni tanto
importanti d'Aquila, di Pescara e di Gaeta, l'avvicinarsi continuo dei
nemico al cuore stesso del regno, i soldati o dispersi o fuggitivi, che
per escusazione propria magnificavano le cose, l'arrivo stesso di
Mack in Napoli venutovi per consultare sulle ultime speranze,
rinnovando la memoria delle vittorie dei Franzesi in Italia e il terrore
delle armi loro rinfrescando, avevano prodotto un grande
abbattimento di animo in chi sapeva, rabbia e disperazione in chi
non sapeva. Titubavano i consiglieri di Ferdinando sul partito che
fosse a prendersi, alcuni propendendo ad armare il popolo, altri
opinando ch'egli avesse a tostamente ritirarsi oltre il Faro. Intanto il
volgo, fattesi alcune istigazioni, anche da parte del governo, si
armava da sè: la città fra il terrore ed il furore aveva un aspetto
molto sinistro e, come si usa in simili casi, le voci popolari già
accusavano di tradimento i ministri. S'incominciava a por mano nel
sangue degli avversarii o veri o supposti del governo regio, poi si
trascorse in quello degli amici. Un Alessandro Ferreri, corriero per gli
spacci, mandato con lettere a Nelson, che con alcuni suoi vascelli
stanziava nel porto di Napoli, restò ucciso a furia di popolo sul molo;
il suo cadavere sanguinoso tratto a forza sotto le finestre della
reggia, fu mostrato al re, gridando orrendamente i feroci uccisori e
l'invasata moltitudine che gli accompagnava: Muoiano i traditori, viva
la santa fede, viva il re. Già non vi era più freno. L'orrore concetto
per la fatta uccisione del corriero aveva persuaso a Ferdinando, che
tralasciando anche la forza franzese che si avvicinava, non poteva
più rimanersi a Napoli con dignità. S'aggiunse che Mack non
confidando di poter far guerra con quei soldati, che peraltro quanto
potessero valere avea dimostrato l'esempio del conte Ruggiero,
consigliava un accordo.
Tutte queste considerazioni, e forse più ancora il timore di
qualche congiura per opera dei novatori, essendo la rabbia loro
grandissima pei sofferti supplizii, fecero prevalere la sentenza di
coloro che consigliavano che il re si ritirasse in Sicilia.
Cristo mdccic. Indizione ii.
Anno di Pio VI papa 25.
Francesco II imperadore 8.

Fatta la deliberazione di abbandonar Napoli, si mandò tosto ad


esecuzione, non senza terrore e confusione, come suole in simili
accidenti. L'ultima notte dell'anno antecedente imbarcarono sulle
navi inglesi e portoghesi ch'erano sorte nel porto, il mobile più
prezioso dei palazzi di Caserta e di Napoli, le gioie della corona, il
tesoro di San Gennaro, in cui erano meglio di venti milioni coniati ed
oro ed argento vergati in quantità: a queste ricchezze si aggiunsero
le singolarità più preziose di Ercolano.
Imbarcati i denari e le suppellettili, creava Ferdinando suo vicario
il principe Pignatelli con facoltà amplissime, anche di conchiudere un
accordo coi Franzesi, col consentire all'occupazione di Napoli, purchè
la città salva ed incolume si conservasse. S'imbarcava Ferdinando la
notte medesima sulla nave di Nelson con Acton, Hamilton ed i
cortigiani.
Il giorno seguente, non avendo ancor salpato pei venti contrarii,
sorse uno spettacolo miserabile; poichè fatte uscir prima le navi
Napolitane, sì grosse che sottili, che potevano mareggiare, fece
Nelson appiccare il fuoco alle altre, fra le quali campeggiava il
Guiscardo grossa nave di settantaquattro cannoni. Arsero in cospetto
del re che di non lontano luogo rimirava il fumo ed il fuoco che le
proprie sue forze consumava. Si abbruciarono anche con disegno
espresso le barche armate della costa di Posillipo ed i magazzini
dell'arsenale: la rabbia civile consumava le opere egregie della pace.
Fu nella città desolata dolore e terrore per la partenza della reale
famiglia. Il volgo sollevato mandò deputati a pregar Ferdinando
affinchè restasse, proferendo le sostanze e le vite a difesa ed a
conservazione sua; ma fu negata ai deputati la presenza di lui
dagl'Inglesi. Nulla più restava da trasportare e da ardere: la dolorosa
flotta salpava il dì 2 gennaio, infelice per l'aspetto terribile di Napoli
che ancora agli occhi dei naviganti appariva; più infelice pei venti
avversi che poco dopo la percossero. Fu lungo e travaglioso il
tragitto: accrebbe il dolore, la mestizia e il dolore la morte del
principe Alberto, figliuolo del re, fanciullo di sette anni, che in mezzo
alle furiose burrasche rendè l'ultimo spirito nel grembo stesso della
già tanto addolorata madre. Finalmente le sbattute e travagliate navi
afferravano Palermo: le dimostrazioni amorevoli dei Siciliani
mitigarono l'amarezza concetta per l'esilio e per la fresca perdita del
morto figliuolo.
La partenza del re fu in mal punto per l'infelice regno, perchè già
la fortuna si mostrava più propizia alle sue armi. Erano, non senza
gravi difficoltà per le popolazioni armate che loro contrastavano il
passo, Duhesme e Lemoine giunti al campo sotto le mura di Capua.
Intanto le popolazioni medesime crescevano di numero, di forze e di
furore, e già facendo in ogni luogo suonare le armi e le grida di
vendetta, niuna cosa lasciavano sicura alle spalle dei Franzesi. La
rabbia loro era incredibile, e commettevano contro i repubblicani che
viaggiavano alla spicciolata, atti di ferità più bestiale che inumana.
Già Itri, Fondi e Sessa erano in poter dei sollevati, già San Germano
si muoveva a stormo; già Teano, alloggiamento principale di
Championnet, era stato assaltato e preso; già Piedimonte sul sommo
giogo dell'Apennino pericolava; una massa di popoli incitatissimi
s'avvicinava al Garigliano e non lasciava alcuna speranza ai
repubblicani in picciol sito oramai ristretti. Mandava Championnet ad
incontrar la Rey, il quale avendo combattuto più valorosamente che
prosperamente, fu fatto tornare con grave perdita frettolosamente
nel campo. Il prospero evento aggiunse nuova furia a quelle genti
sdegnate e crudeli: spintesi avanti assaltarono il ponte che i Franzesi
avevano fabbricato sul fiume, sel presero, e più oltre procedendo,
nel parco di riserva rapirono le artiglierie, fracassarono i carretti,
trasportarono quante munizioni da guerra poterono. Per tale guasto,
le cartucce di provvisione vennero mancando ai Franzesi, già le
vettovaglie mancavano, nè vi era modo di andar alla busca per
pascere l'esercito, perchè i sollevati inondavano le campagne; il
vigore delle menti con gli stromenti di difesa mancava. Da un altro
lato, la popolosissima Napoli si muoveva, apprestandosi a correre da
Garigliano in aiuto di Capua e dell'esercito che ancor la difendeva.
Nè è da passarsi sotto silenzio che la virtù dei Franzesi, oltre il suono
dell'armi dei sollevati, che romoreggiavano tutto all'intorno,
incominciava ad indebolirsi per un'infelice pruova testè fatta contro
Capua. Avendo dato Macdonald un furioso assalto alla piazza, ne era
stato respinto con danno gravissimo. Ciò dava loro a temere che i
soldati napolitani incominciassero ad agguerrirsi. Si aspettavano
d'ora in ora alla foce del Garigliano le genti tornate da Livorno, che
dando animo e forza alle turbe stormeggianti sulla destra del fiume,
avrebbero fatto un pericoloso assalto a tergo dei Franzesi, mentre
sboccando Mack da Capua, gli avrebbe assaliti in viso. Per la qual
cosa con un esercito a fronte che si ostinava a voler difendere una
città ed un passo tanto abili ad esser difesi, con gli Abruzzesi ed i
Campani alle spalle, con la poderosa Napoli in cospetto, rimaneva ai
Franzesi poca speranza di salute.
La debolezza del vicario Pignatelli aperse una via di scampo ai
Franzesi che già incominciavano a disperarsi. S'aggiunse il poco
animo di Mack. Perì Napoli per mano di coloro ai quali maggior
debito pesava di difenderla. Arrivavano in quell'ora, tanto pregna di
dubbio avvenire pei Franzesi, agli alloggiamenti di Championnet il
principe di Milano ed il duca di Gesso, che, mandati dal vicario,
venivano chiedendo un accordo. Mostrò sulle prime Championnet
qualche durezza, conosciuta la timidità di chi reggeva Napoli, e
volendo mostrare abilità al combattere; infine pregato da coloro che
dovevano minacciare, venne ad un accordo con loro, del quale le

You might also like