SlideShare a Scribd company logo
Artificial Intelligence A Systems Approach 1st
Edition M Tim Jones download
https://ebookbell.com/product/artificial-intelligence-a-systems-
approach-1st-edition-m-tim-jones-1020640
Explore and download more ebooks at ebookbell.com
Here are some recommended products that we believe you will be
interested in. You can click the link to download.
Artificial Intelligence A Systems Approach 1st Edition Jones
https://ebookbell.com/product/artificial-intelligence-a-systems-
approach-1st-edition-jones-5428814
Artificial Intelligence A Systems Approach From Architecture
Principles To Deployment 1st Edition David R Martinez
https://ebookbell.com/product/artificial-intelligence-a-systems-
approach-from-architecture-principles-to-deployment-1st-edition-david-
r-martinez-62331388
Multiagent Systems A Modern Approach To Distributed Artificial
Intelligence Gerhard Weiss
https://ebookbell.com/product/multiagent-systems-a-modern-approach-to-
distributed-artificial-intelligence-gerhard-weiss-56387528
Engineering Artificially Intelligent Systems A Systems Engineering
Approach To Realizing Synergistic Capabilities 1st Ed 2021 William F
Lawless Editor
https://ebookbell.com/product/engineering-artificially-intelligent-
systems-a-systems-engineering-approach-to-realizing-synergistic-
capabilities-1st-ed-2021-william-f-lawless-editor-36429674
Artificial Intelligence A Guide To Intelligent Systems 2nd Edition
Michael Negnevitsky
https://ebookbell.com/product/artificial-intelligence-a-guide-to-
intelligent-systems-2nd-edition-michael-negnevitsky-23062210
Artificial Intelligence A Guide To Intelligent Systems 3rd Edition 3rd
Edition Michael Negnevitsky
https://ebookbell.com/product/artificial-intelligence-a-guide-to-
intelligent-systems-3rd-edition-3rd-edition-michael-
negnevitsky-10878916
Artificial Intelligence Systems And The Internet Of Things In The
Digital Era Abdalmuttaleb Ma Musleh Alsartawi
https://ebookbell.com/product/artificial-intelligence-systems-and-the-
internet-of-things-in-the-digital-era-abdalmuttaleb-ma-musleh-
alsartawi-32214930
Artificial Intelligence Systems And The Internet Of Things In The
Digital Era Proceedings Of Eammis 2021 Lecture Notes In Networks And
Systems 239 1st Ed 2021 Abdalmuttaleb Ma Musleh Alsartawi Editor
https://ebookbell.com/product/artificial-intelligence-systems-and-the-
internet-of-things-in-the-digital-era-proceedings-of-
eammis-2021-lecture-notes-in-networks-and-systems-239-1st-
ed-2021-abdalmuttaleb-ma-musleh-alsartawi-editor-36521182
Hybrid Artificial Intelligence Systems 5th International Conference
Hais 2010 San Sebastin Spain June 2325 2010 Proceedings Part I 1st
Edition Ali A Ghorbani
https://ebookbell.com/product/hybrid-artificial-intelligence-
systems-5th-international-conference-hais-2010-san-sebastin-spain-
june-2325-2010-proceedings-part-i-1st-edition-ali-a-ghorbani-2535066
Artificial Intelligence A Systems Approach 1st Edition M Tim Jones
ARTIFICIAL
INTELLIGENCE
A Systems Approach
M. TIM JONES
INFINITY SCIENCE PRESS LLC
Hingham, Massachusetts
New Delhi
Copyright 2008 by INFINITY SCIENCE PRESS LLC
All rights reserved.
This publication, portions of it, or any accompanying software may not be reproduced in any way, stored in a retrieval
system of any type, or transmitted by any means or media, electronic or mechanical, including, but not limited to,
photocopy, recording, Internet postings or scanning, without prior permission in writing from the publisher.
Publisher: DAVID PALLAI
INFINITY SCIENCE PRESS LLC
11 Leavitt Street
Hingham, MA 02043
Tel. 877-266-5796 (toll free)
Fax 781-740-1677
info@infinitysciencepress.com
www.infinitysciencepress.com
This book is printed on acid-free paper.
M. Tim Jones. Artificial Intelligence: A Systems Approach
ISBN: 978-0-9778582-3-1
The publisher recognizes and respects all marks used by companies, manufacturers, and developers
as a means to distinguish their products. All brand names and product names mentioned in this
book are trademarks or service marks of their respective companies. Any omission or misuse (of any
kind) of service marks or trademarks, etc. is not an attempt to infringe on the property of others.
Library of Congress Cataloging-in-Publication Data
JONES, M. TIM.
Artificial intelligence : a systems approach / M. Tim Jones.
p. cm.
Includes index.
ISBN-13: 978-0-9778582-3-1 (hardcover with cd-rom : alk. paper)
1. Artificial intelligence--Data processing. 2. Artificial intelligence--Mathematical models. I. Title.
Q336.J68 2008
006.3--dc22
2007045869
7 8 9 0 4 3 2 1
Our titles are available for adoption, license or bulk purchase by institutions, corporations, etc. For
additional information, please contact the Customer Service Dept. at 877-266-5796 (toll free).
Requests for replacement of a defective CD-ROM must be accompanied by the original disc, your
mailing address, telephone number, date of purchase and purchase price. Please state the nature of the
problem, and send the information to INFINITY SCIENCE PRESS, 11 Leavitt Street, Hingham, MA 02043.
The sole obligation of INFINITY SCIENCE PRESS to the purchaser is to replace the disc, based on defective
materials or faulty workmanship, but not based on the operation or functionality of the product.
DEDICATION
This book is dedicated to my wonderful wife, Jill, without whom this book would not be
possible. I’m also indebted to my parents Maury and Celeta, who instilled in me a desire to
learn and wonder.
ACKNOWLEDGMENTS
At the time of this writing, AI is celebrating its 50th
anniversary. It was August of 1956 when
researchers met at the Dartmouth Summer Research Project on Artificial Intelligence with
the agenda of creating intelligent machines. In the 50 years that followed, AI has become a
genuine field of study, but the road has not been without its bumps.
Acknowledging all those who’ve contributed to AI would fill a book much larger than
this. But I’d like to personally recognize John McCarthy for introducing AI in 1955 (at the
Dartmouth Summer Project) and for having created the wonderful Lisp programming
language.
TABLE OF CONTENTS
Chapter 1 The History of AI 1-19
What is Intelligence? 1
The Search for Mechanical Intelligence 2
The Very Early Days (the early 1950’s) 3
Alan Turing 3
AI, Problem Solving and Games 4
Artificial Intelligence Emerges as a Field 5
The Dartmouth AI Summer Research Project 5
Building Tools for AI 6
The Focus on Strong AI 6
Constrained Applications 7
Bottom-Up Approaches Emerge 7
AI’s Winter 8
Results-Oriented Applications 8
Additional AI Tools Emerge 9
Neat vs. Scruffy Approaches 9
AI Remerges 10
The Silent Return 10
Messy and Scruffy Approaches Take Hold 10
Agent Systems 12
AI Inter-disciplinary R&D 12
Systems Approach 13
Overview of this Book 15
Uninformed Search 15
Informed Search 15
AI and Games 15
Knowledge Representation 16
Machine Learning 16
Evolutionary Computation 16
Neural Networks Part 1 16
Neural Networks Part 2 17
Intelligent Agents 17
Biologically Inspired and Hybrid Models 17
Languages of AI 17
Chapter Summary 18
References 18
Resources 18
Exercises 19
Chapter 2 Uninformed Search 21-48
Search and AI 21
Classes of Search 22
General State Space Search 22
Search in a Physical Space 22
Search in a Puzzle Space 23
Search in an Adversarial Game Space 25
Trees, Graphs and Representation 27
Uninformed Search 29
Helper APIs 30
General Search Paradigms 31
Depth-First Search 31
Depth-Limited Search 34
Iterative Deepening Search 36
Breadth-First Search 39
Bidirectional Search 42
Uniform-Cost Search 42
Improvements 45
Algorithm Advantages 46
Chapter Summary 46
Algorithms Summary 46
References 47
Exercises 47
Chapter 3 Informed Search 49-88
Search and AI 49
Best-First Search 50
Best-First Search and the N-Queens Problem 50
Best-First Search Implementation 52
Variants of Best-First Search 56
A* Search 57
A* Search and the Eight Puzzle 59
Eight Puzzle Representation 59
A* Search Implementation 61
Eight Puzzle Demonstration with A* 64
A* Variants 65
Applications of A* Search 65
Hill Climbing Search 65
Simulated Annealing 66
The Traveling Salesman Problem (TSP) 68
TSP Tour Representation 68
Simulated Annealing Implementation 70
Simulated Annealing Demonstration 73
Tabu Search 75
Tabu Search Implementation 77
Tabu Search Demonstration 79
Tabu Search Variants 80
Constraint Satisfaction 81
Graph Coloring as a CSP 81
Scheduling as CSP 83
Constraint Satisfaction Problems 84
Generate and Test 84
Backtracking 84
Forward Checking and Look Ahead 84
Min-Conflicts Search 86
Chapter Summary 86
Algorithms Summary 86
References 86
Resources 87
Exercises 87
Chapter 4 AI and Games 89-142
Two Player Games 89
The Minimax Algorithm 92
Minimax and Tic-Tac-Toe 95
Minimax Implementation for Tic-Tac-Toe 98
Minimax with Alpha-Beta Pruning 101
Classical Game AI 106
Checkers 106
Checker Board Representation 107
Techniques used in Checkers Programs 107
Opening Books 108
Static Evaluation Function 108
Search Algorithm 108
Move History 108
Endgame Database 109
Chess 109
Chess Board Representation 110
Techniques used in Chess Programs 110
Opening Book Database 110
Minimax Search with Alpha Beta Pruning 111
Static Board Evaluation 111
Othello 112
Techniques used in Othello Programs 112
Opening Knowledge 112
Static Evaluation Function 112
Search Algorithm 113
Endgames 113
Other Algorithms 113
Go 114
Go Board Representation 114
Techniques used in Go Programs 114
Opening Moves 115
Move Generation 115
Evaluation 115
Endgame 116
Backgammon 116
Techniques used in Backgammon Programs 116
Neurogammon 116
TD-Gammon 117
Poker 118
Loki – A learning Poker Player 119
Scrabble 120
Video Game AI 121
Applications of AI Algorithms in Video Games 122
Movement and Pathfinding 123
Table Lookup with Offensive and Defensive Strategy 123
NPC Behavior 129
Static State Machines 130
Layered Behavior Architectures 131
Other Action-Selection Mechanisms 132
Team AI 132
Goals and Plans 134
Real-Time Strategy AI 136
Rules-Based Programming 136
Chapter Summary 139
References 139
Resources 140
Exercises 141
Chapter 5 Knowledge Representation 143-170
Introduction 143
Types of Knowledge 144
The Role of Knowledge 144
Semantic Nets 145
Frames 146
Propositional Logic 149
Deductive Reasoning with Propositional Logic 151
Limitations of Propositional Logic 152
First Order Logic (Predicate Logic) 152
Atomic Sentences 153
Compound Sentences 154
Variables 154
Quantifiers 155
First-Order Logic and Prolog 155
Simple Example 155
Information Retrieval and KR 157
Representing and Reasoning about an Environment 159
Semantic Web 163
Computational Knowledge Discovery 165
The BACON System 165
Automatic Mathematician 166
Ontology 167
Communication of Knowledge 167
Common Sense 168
Summary 169
References 169
Resources 169
Exercises 170
Chapter 6 Machine Learning 171-193
Machine Learning Algorithms 171
Supervised Learning 172
Learning with Decision Trees 172
Creating a Decision Tree 174
Characteristics of Decision Tree Learning 176
Unsupervised Learning 176
Markov Models 177
Word Learning with Markov Chains 177
Word Generation with Markov Chains 179
Markov Chain Implementation 180
Other Applications of Markov Chains 184
Nearest Neighbor Classification 185
1NN Example 186
k-NN Example 188
Summary 192
Resources 192
Exercises 192
Chapter 7 Evolutionary Computation 195-247
Short History of Evolutionary Computation 195
Evolutionary Strategies 196
Evolutionary Programming 197
Genetic Algorithms 197
Genetic Programming 198
Biological Motivation 199
Genetic Algorithms 200
Genetic Algorithm Overview 200
Genetic Algorithm Implementation 204
Genetic Programming 212
Genetic Programming Algorithm 212
Genetic Programming Implementation 215
Evolutionary Strategies 220
Evolutionary Strategies Algorithm 221
Evolutionary Strategies Implementation 223
Differential Evolution 227
Differential Evolution Algorithm 228
Differential Evolution Implementation 230
Particle Swarm Optimization 236
Particle Swarm Algorithm 236
Particle Swarm Implementation 238
Evolvable Hardware 244
Summary 244
References 245
Resources 245
Exercises 245
Chapter 8 Neural Networks I 249-287
Short History of Neural Networks 249
Biological Motiviation 250
Fundamentals of Neural Networks 251
Single Layer Perceptrons 252
Multi-Layer Perceptrons 254
Supervised vs. Unsupervised Learning Algorithms 257
Binary vs. Continuous Inputs and Outputs 257
The Perceptron 257
Perceptron Learning Algorithm 259
Perceptron Implementation 260
Least-Mean-Square (LMS) Learning 262
LMS Learning Algorithm 262
LMS Implementation 263
Learning with Backpropagation 265
Backpropagation Algorithm 267
Backpropagation Implementation 268
Tuning Backpropagation 274
Training Variants 274
Weight Adjustment Variants 274
Probabilistic Neural Networks 275
PNN Algorithm 276
PNN Implementation 277
Other Neural Network Architectures 281
Time Series Processing Architecture 281
Recurrent Neural Network 283
Tips for Building Neural Networks 283
Defining the Inputs 283
Defining the Outputs 284
Choice of Activation Functions 284
Number of Hidden Layers 285
Chapter Summary 285
References 285
Exercises 285
Chapter 9 Neural Networks II 289-328
Unsupervised Learning 289
Hebbian Learning 290
Hebb’s Rule 291
Hebb Rule Implementation 292
Simple Competitive Learning 296
Vector Quantization 297
Vector Quantization Implementation 298
k-Means Clustering 304
k-Means Algorithm 305
k-Means Implementation 307
Adaptive Resonance Theory 313
ART-1 Algorithm 314
ART-1 Implementation 316
Hopfield Auto-Associative Model 322
Hopfield Auto-Associator Algorithm 323
Hopfield Implementation 324
Summary 327
References 328
Exercises 328
Chapter 10 Robotics and AI 329-348
Introduction to Robotics 329
What is a Robot? 330
A Sampling from the Spectrum of Robotics 331
Taxonomy of Robotics 332
Fixed 333
Legged 333
Wheeled 333
Underwater 333
Aerial 333
Other Types of Robots 334
Hard vs. Soft Robotics 334
Braitenburg Vehicles 334
Natural Sensing and Control 336
Perception with Sensors 337
Actuation with Effectors 338
Robotic Control Systems 338
Simple Control Architectures 339
Reactive Control 340
Subsumption 340
Other Control Systems 342
Movement Planning 342
Complexities of Motion Planning 342
Cell Decomposition 343
Potential Fields 344
Group or Distributed Robotics 345
Robot Programming Languages 346
Robot Simulators 346
Summary 346
References 346
Resources 347
Exercises 347
Chapter 11 Intelligent Agents 349-391
Anatomy of an Agent 350
Agent Properties and AI 351
Rationale 352
Autonomous 352
Persistent 352
Communicative 352
Cooperative 353
Mobile 353
Adaptive 353
Agent Environments 353
Agent Taxonomies 356
Interface Agents 356
Virtual Character Agents 357
Entertainment Agents 358
Game Agents 358
ChatterBots 360
Eliza and Parry 360
AIML 361
Mobile Agents 362
User Assistance Agent 364
Email Filtering 364
Information Gathering and Filtering 365
Other User-Assistance Applications 365
Hybrid Agent 366
Agent Architectures 366
What is Architecture? 366
Types of Architectures 367
Reactive Architectures 367
Deliberative Architectures 368
Blackboard Architectures 369
BDI Architecture 370
Hybrid Architectures 371
Mobile Architectures 371
Architecture Description 372
Subsumption Architecture (Reactive) 372
Behavior Networks (Reactive) 373
ATLANTIS (Deliberative) 375
Homer (Deliberative) 376
BB1 (Blackboard) 377
Open Agent Architecture (Blackboard) 377
Procedural Reasoning System (BDI) 378
Aglets (Mobile) 379
Messengers (Mobile) 380
SOAR (Hybrid) 382
Agent Languages 382
Telescript 382
Aglets 383
Obliq 384
Agent TCL 384
Traditional Languages 385
Agent Communication 385
Knowledge Query and Manipulation Language (KQML) 385
FIPA Agent Communication Language 388
Extensible Markup Language (XML) 388
Summary 389
Resources 389
References 390
Exercises 391
Chapter 12 Biologically Inspired and Hybrid Models 393-432
Cellular Automata 393
One Dimensional CA 394
Two Dimensional CA 395
Conway Application 396
Turing Completeness 398
Emergence and Organization 398
Artificial Immune Systems 398
Self-Management Capabilities 399
Touchpoints 400
Touchpoint Autonomic Managers 400
Orchestrating Autonomic Managers 401
Integrated Management Console 401
Autonomic Summary 402
Artificial Life 402
Echo 403
Tierra 403
Simulated Evolution 403
Environment 403
The Bug (or Agent) 404
Variations of Artificial Life 408
Lindenmayer Systems 408
Fuzzy Logic 410
Introduction to Fuzzy Logic 410
Fuzzy Logic Mapping 411
Fuzzy Logic Operators 414
Fuzzy Control 415
Evolutionary Neural Networks 416
Genetically Evolved Neural Networks 416
Simulation Evolution Example 419
Ant Colony Optimization 423
Traveling Salesman Problem 423
Path Selection 425
Pheromone Intensification 425
Pheromone Evaporation 426
New Tour 426
Sample Usage 426
ACO Parameters 430
Affective Computing 430
Characterizing Human Emotion 430
Synthesizing Emotion 431
Resources 432
Chapter 13 The Languages of AI 433-483
Language Taxonomy 433
Functional Programming 434
Imperative Programming 437
Object Oriented Programming 438
Logic Programming 441
Languages of AI 442
The LISP Language 443
The History of the LISP Language 443
Overview of the LISP Language 444
Data Representation 444
Simple Expressions 444
Predicates 445
Variables 445
List Processing 445
Programs as Data 447
Conditions 447
Functions in LISP 448
LISP Summary 451
The Scheme Language 451
History of Scheme 452
Overview of the Scheme Language 452
Data Representation 452
Simple Expressions 452
Predicates 453
Variables 453
List Processing 454
Conditions 455
Iteration and Maps 456
Procedures in Scheme 457
Scheme Summary 460
The POP-11 Language 460
History of POP-11 460
Overview of the POP-11 Language 460
Data Representation 460
Predicates 461
Simple Expressions 461
Variables 462
List Processing 462
Conditions 463
Iteration and Maps 464
Pattern Matching 465
Procedures in POP-11 465
POP-11 Summary 468
Prolog 468
History of Prolog 469
Overview of the Prolog Language 469
Data Representation 469
List Processing 470
Facts, Rules, and Evaluation 471
Arithmetic Expressions 478
Prolog Summary 480
Other Languages 480
Chapter Summary 481
References 481
Resources 482
Exercises 482
About the CD-ROM 485
Index 487-498
Artificial Intelligence A Systems Approach 1st Edition M Tim Jones
T
he history of AI is interesting all by itself. It’s a modern-day drama,
filled with excitement and anticipation, discovery, and disappointment.
From over-promises of early (and later) AI research, to fears of the
unknown from the general public, AI’s history is worthy of study by itself.
In this chapter, we’ll explore AI’s tumultuous history and also provide a
summary introduction to each of the chapters of this book.
WHAT IS INTELLIGENCE?
To build software that is deemed intelligent, it’s helpful to begin with a
definition of intelligence. Intelligence can be simply defined as a set of
properties of the mind. These properties include the ability to plan, solve
problems, and in general, reason. A simpler definition could be that
intelligence is the ability to make the right decision given a set of inputs and
a variety of possible actions.
Using this simple definition of intelligence (making the right decision),
we can apply this not only to humans, but also to animals that exhibit rational
behavior. But the intelligence that is exhibited by human beings is much
more complex than that of animals. For example, humans have the ability
C h a p t e r 1 THE HISTORY OF AI
2 Artificial Intelligence
to communicate with language, but so do some animals. Humans can also
solve problems, but the same can be said of some animals. One difference
then is that humans embody many aspects of intelligence (the ability to
communicate, solve problems, learn and adapt) where animals typically
embody a small number of intelligent characteristics, and usually at a much
lower level than humans.
We can use the same analogy on AI applied to computer systems. For
example, it’s possible to build an application that plays a world-class game of
Chess, but this program knows nothing of the game of Checkers, nor how to
make a good cup of tea. A data mining application can help identify fraud,
but can’t navigate a complex environment. From this perspective, the most
complex and intelligent applications can be deemed intelligent from one
perspective, but lack even the simplest intelligence that can be seen in the
least intelligent of animals.
NOTE Famed author Isaac Asimov once wrote about his experience with
aptitude tests in the army. In the army, he scored well above the norm.
But what he realized was that he could score well on tests that were
developed by others that shared his academic bents. He opined that if
the tests were developed by people involved in auto repair, he would have
scored very poorly. The issue being that tests are developed around a
core of expertise, and scoring poorly on one doesn’t necessarily indicate
a lack of intelligence.
THE SEARCH FOR MECHANICAL INTELLIGENCE
History is filled with stories of the creation of intelligent machines. In the
800s BC, the Iliad described the winged Talos, a bronze automaton forged by
Hephaestus to protect Crete. The inner workings of Talos weren’t described,
except that he was bronze, and filled with ichor (or a Greek god’s blood). A
more recent example is Mary Shelley’s Frankenstein, in which the scientist
recreates life from old. In 1921, Karel Capek’s play “Rossum’s Universal
Robots” introduced the concept of cheap labor through robotics.
But one of the most interesting applications of artificial intelligence,
in a non-robitic form, was that of the HAL 9000 introduced by Arthur C.
Clark in his his novel “2001: A Space Odyssey.” HAL was a sentient artificial
intelligence that occupied the Discovery spaceship (en route to Jupiter).
HAL had no physical form, but instead managed the spaceship’s systems,
visually watched the human occupants through a network of cameras, and
The History of AI 3
communicated with them in a normal human voice. The moral behind the
story of HAL was one of modern-day programming. Software does exactly
what one tells it to do, and can make incorrect decisions trying to focus on
a single important goal. HAL obviously was not created with Isaac Asimov’s
three laws of robotics in mind.
THE VERY EARLY DAYS (THE EARLY 1950s)
While the term artificial intelligence had not yet been conceived, the 1950s
were the very early days of AI. Early computer systems were being built, and
the ideas of building intelligent machines were beginning to form.
Alan Turing
In 1950 it was Alan Turing who asked whether a machine could think.
Turing not long before had introduced the concept of his universal abstract
machine (called the Turing Machine) that was simple and could solve any
mathematical problem (albiet with some complexity). Building on this idea,
Turing wondered that if a computer’s response were indistinguishable from
a human, then the computer could be considered a thinking machine. The
result of this experiment is called the Turing Test.
In the Turing test, if the machine could fool a human into thinking that
it was also human, then it passed the intelligence test. One way to think of
the Turing test is by communicating to the other agent through a keyboard.
Questions are asked of the peer through written text, and responses are
provided through the terminal. This test provides a way to determine if
intelligence was created. Considering the task at hand, not only must the
intelligent peer contain the necessary knowledge to have an intelligent
conversation, it must be able to parse and understand natural language and
generate natural language responses. The questions may involve reasoning
skills (such as problem solving), so mimicking humans would be a feat!
An important realization of Turing during this period was the need to
start small and grow intelligence, rather than expecting it to materialize.
Turing proposed what he called the Child Machine in which a lesser
intelligent agent would be created and then subjected to a course of
education. Rather than assume that we could build an adult intelligence,
we would build a child intelligence first and then inject it with knowledge.
This idea of starting small and at lower levels corresponds with later ideas
of so-called “scruffy” thinkers. The human brain is complex and not fully
4 Artificial Intelligence
understood, instead of striving to imitate this, why not start smaller at the
child (or even smaller organism) and work our way up? Turing called this the
blank sheets argument. A child is like a notebook that’s full of blank sheets,
but is a mechanism by which knowledge is stored.
Alan Turing’s life ended at a young age, but he’s considered the founder
of the field of AI (even though the moniker would not be applied for another
six years).
AI, Problem Solving, and Games
Some of the earliest applications of AI focused on games and general
problem solving. At this time, creating an intelligent machine was based on
the belief that the machine would be intelligent if it could do something that
people do (and perhaps find difficult).
NOTE In 1950, Claude Shannon proposed that the game of Chess was
fundamentaly a search problem. In fact, he was correct, but brute force
search isn’t truly practical for the search space that exists with Chess.
Search, heuristics, and a catalog of opening and ending moves provides
a faster and more efficient way to play Chess. Shannon’s seminal paper
on computer Chess produced what is called the Shannon number, or
10^120, which represents the lower bound of the game tree complexity
of Chess. [Shannon 1950]
The first AI program written for a computer was called “The Logic
Theorist.” It was developed in 1956 by Allen Newell, Herbert Simon, and J.
C. Shaw to find proofs for equations. [Newell 1956] What was most unique
about this program is that it found a better proof than had existed before for
a given equation. In 1957, Simon and Newell built on this work to develop
the General Problem Solver (GPS). The GPS used means-end analysis to
solve problems, but in general was restricted to toy problems.
Like complex math, early AI researchers believed that if a computer
could solve problems that they thought were complex, then they could build
intelligent machines. Similarly, games provided an interesting testbed for the
development of algorithms and techniques for intelligent decision making.
In the UK at Oxford University in the early 1950s, researchers developed
game-playing programs for two complex games. Christopher Strachey
developed a Checkers playing program on the Ferranti Mark I. By 1952, his
program could play a reasonable game of Checkers. Dietrich Prinz developed
a program, again for the Ferranti Mark I, that could play Chess (mate-in-two
variety). His program could search a thousand possible moves, but on this
The History of AI 5
early computer, it required significant time and played very slowly.
In 1952, Arthur Samuel raised the bar for AI programs. His Checkers
playing program, which ran on the IBM 701, included learning and
generalization. What Samuel did with his learning Checkers program was
unique in that he allowed two copies of his program to play one another,
and therefore learn from each other. The result was a program that could
defeat its creator. By 1962, Samuel’s Checkers program defeated the former
Connecticut Checkers champion.
NOTE Samuel’s program, and his approach of playing copies against one
another, is one of the first examples of computing survival of the fittest
and the field which came to be called evolutionary computation.
ARTIFICIAL INTELLIGENCE EMERGES AS A FIELD
By the mid 1950s, AI began to solidify as a field of study. At this point in AI’s
life, much of the focus was on what is called Strong AI Strong AI is focused
on building AI that mimics the mind. The result is a sapient entity with
human-like intelligence, self-awareness, and consciousness.
The Dartmouth AI Summer Research Project
In 1956, the Dartmouth AI Conference brought about those involved in
research in AI: John McCarthy (Dartmouth), Marvin Minsky (Harvard),
Nathaniel Rochester (IBM), and Claude Shannon (Bell Telephone
Laboratories) brought together researchers in computers, natural language
processing, and neuron nets to Dartmouth College for a month-long session
of AI discussions and research. The Summer research project on AI began:
We propose that a 2 month, 10 man study of artificial intelligence
be carried out during the summer of 1956 at Dartmouth College
in Hanover, New Hampshire. The study is to proceed on the basis
of the conjecture that every aspect of learning or any other feature
of intelligence can in principle be so precisely described that a
machine can be made to simulate it. An attempt will be made to
find how to make machines use language, form abstractions and
concepts, solve kinds of problems now reserved for humans, and
improve themselves. We think that a significant advance can be
made in one or more of these problems if a carefully selected
group of scientists work on it together for a summer.
6 Artificial Intelligence
Since then, many AI conferences have been held around the world,
and on a variety of disciplines studied under the AI moniker. In 2006,
Dartmouth held the “Dartmouth Artificial Intelligence Conference: The
Next Fifty Years” (informally known as AI@50). The conference was well
attended (even from a few that attended the first conference 50 years prior),
and analyzed AI’s progress and how its challenges relate to those of other
fields of study.
Building Tools for AI
In addition to coining the term artificial intelligence, and bringing together
major researchers in AI in his 1956 Dartmouth conference, John McCarthy
designed the first AI programming language. LISP was first described by
McCarthy in his paper titled “Recursive Functions of Symbolic Expressions
and their Computation by Machine, Part I.” The first LISP compiler was
also implemented in LISP, by Tim Hart and Mike Levin at MIT in 1962 for
the IBM 704.
This compiler introduced many advanced features, such as incremental
compilation. [LISP 2007] McCarthy’s LISP also pioneered many advanced
concepts now familiar in computer science, such as trees (data structures),
dynamic typing, object-oriented programming, and compiler self-hosting.
LISP was used in a number of early AI systems, demonstrating its
usefulness as an AI language. One such program, called SHRDLU, provides
a natural language interface to a table-top world of objects. The program can
understand queries about the table-top “world,” reason about the state of
things in the world, plan actions, and perform some rudimentary learning.
SHRDLU was designed and implemented by Terry Winograd at the MIT
AI Lab on a PDP-6 computer.
LISP, and the many dialects that evolved from it, are still in wide
use today. Chapter 13 provides an introduction to the languages of AI,
including LISP.
The Focus on Strong AI
Recall that the focus of early AI was in Strong AI. Solving math or logic
problems, or engaging in dialogue, was viewed as intelligent, while activities
such as walking freely in unstable environments (which we do every day)
were not.
In 1966, Joseph Weizenbaum of MIT developed a program that parodied
a psychologist and could hold an interesting dialogue with a patient. The
design of Eliza would be considered simple by today’s standards, but its
The History of AI 7
pattern-matching abilities, which provided reasonable responses to patient
statements was real to many people. This quality of the program was
troubling to Weizenbaum who later became a critic of AI because of its lack
of compassion.
Constrained Applications
While much of early AI was Strong-focused, there were numerous applications
that focused on solving practical problems. One such application was called
the “Dendral Project,” emerging in 1965 at Stanford University. Dendral was
developed to help organic chemists understand the organization of unknown
organic molecules. It used as its inputs mass spectrometry graphs and a
knowledge base of chemistry, making it the first known expert system.
Other constrained applications in this era include Macsyma, a
computer algebra system developed at MIT by Carl Engelman, William
Martin, and Joel Moses. Macsyma was written in MacLisp, a dialect
of LISP developed at MIT. This early mathematical expert system
demonstrated solving integration problems with symbolic reasoning.
The ideas demonstrated in Macsyma eventually made their way into
commercial math applications.
Bottom-Up Approaches Emerge
Early AI focused on a top-down approach to AI, attempting to simulate or
mimic the higher level concepts of the brain (planning, reasoning, language
understanding, etc.). But bottom-up approaches began to gain favor in the
1960s, primarily modeling lower-level concepts, such as neurons and learning
at a much lower level. In 1949, Donald Hebb introduced his rule that
describes how neurons can associate with one another if they are repeatedly
active at the same time. The contribution of one cell’s firing to enable another
will increase over time with persistent firing, leading to a strong relationship
between the two (a causal relationship).
But in 1957, the perceptron was created by Frank Rosenblatt at the
Cornell Aeronautical Laboratory. The perceptron is a simple linear classifier
that can classify data into two classes using an unsupervised learning
algorithm. The perceptron created considerable interest in neural network
architectures, but change was not far away.
NOTE Hebbian learning, perceptrons, and more advanced neural network
architectures and learning algorithms are covered in the neural network
Chapters 8 and 9.
8 Artificial Intelligence
AI’S WINTER
Prior to the 1970s, AI had generated considerable interest, and also
considerable hype from the research community. Many interesting systems
had been developed, but these fell quite short of the predictions made by
some in the community. But new techniques such as neural networks breathed
new life into this evolving field, providing additional ways for classification and
learning. But the excitement of neural networks came to an end in 1969 with
the publication of the mongraph titled “Perceptrons.” This monograph was
written by Marvin Minsky and Seymour Papert, strong advocates of Strong (or
top-down) AI. The authors rightly demonstrated that single-layer perceptrons
were limited, particularly when confronted with problems that are not linearly
separable (such as the XOR problem). The result was a steep decline of
funding into neural network research, and in general, research in AI as a field.
Subsequent research would find that the multi-layer networks solved the linear
separation problem, but too late for the damage done to AI.
Hardware built for AI, such as the LISP machines, also suffered a loss
of interest. While the machines gave way to more general systems (not
necessarily programmed in LISP), the functional languages like LISP
continued to attract attention. Popular editors such as EMACS (developed
during this period) still support a large user community with a scripting shell
based on LISP.
Results-Oriented Applications
While there was a reduction in focus and spending in AI research in the
1970s, AI development continued but in a more focused arena. Applications
that showed promise, such as expert systems, rose as one of the key
developments in this era.
One of the first expert systems to demonstrate the power of rules-based
architectures was called MYCIN, and was developed by Ted Shortliffe
following his dissertation on the subject while at Stanford (1974). MYCIN
operated in the field of medical diagnosis, and demonstrated knowledge
representation and inference. Later in this decade, another dissertation at
Stanford by Bill VanMelles built on the MYCIN architecture and serves as a
model for the expert system shell (still in use today). In Chapter 5 we’ll provide
an introduction to the representation of knowledge and inference with logic.
Other results-oriented applications included those focused on natural
language understanding. The goal of systems in this era was in the
development of intelligent question answering systems. To understand a
question stated in natural language, the question must first be parsed into
The History of AI 9
its fundamental parts. Bill Woods introduced the idea of the Augmented
Transition Network (or ATN) that represents formal languages as augmented
graphs. From Eliza in the 1960s to ATNs in the 1970s, Natural Language
Processing (NLP) and Natural Language Understanding (NLU) continues
today in the form of chatterbots.
Additional AI Tools Emerge
John McCarthy introduced the idea of AI-focused tools in the 1950s with the
development of the LISP language. Expert systems and their shells continued
the trend with tools for AI, but another interesting development that in a
way combined the two ideas resulted from the Prolog language. Prolog was
a language built for AI, and was also a shell (for which expert systems could
be developed). Prolog was created in 1972 by Alain Colmeraur and Phillipe
Roussel based on the idea of Horn clauses. Prolog is a declarative high-level
language based on formal logic. Programs written in Prolog consist of facts and
rules that reason over those facts. You can find more information on Prolog in
Chapter 5 Knowledge Representation and Chapter 13, The Languages of AI.
Neat vs Scruffy Approaches
A split in AI, its focus, and basic approaches was also seen during this
period. Traditional, or top-down AI (also called Good-Old-Fashioned-AI,
or GOFAI for short) continued during this period but new approaches
began to emerge that looked at AI from the bottom-up. These approaches
were also labeled Neat and Scruffy approaches segregating them into their
representative camps. Those in the neat camp favored formal approaches to
AI that were pure and provable. But those in the scruffy camp used methods
less provable but still yielding useful and significant results. A number of
scruffy approaches to AI that became popular during this period included
genetic algorithms (modeling natural selection for optimization) and neural
networks (modeling brain behavior from the neuron up).
Genetic algorithms became popularized in the 1970s due to the work
of John Holland and his students at the University of Michigan. Holland’s
book on the topic continues to be a useful resource. Neural networks, while
stagnant for a time after the publication of “Perceptrons,” were revived
with Paul John Werbos’ creation of the backpropagation algorithm. This
algorithm remains the most widely used supervised learning algorithm for
training feedforward neural networks. You can learn more about genetic
algorithms and evolutionary computation in Chapter 3 and neural networks
in Chapters 8, and 9.
10 Artificial Intelligence
AI RE-EMERGES
Just as spring always follows the winter, AI’s winter would eventually end
and bring new life into the field (starting in the mid to late 1980s). The
re-emergence of AI had significant differences from the early days. Firstly,
the wild predictions of creating intelligent machines were for the most part
over. Instead, researchers and AI practitioners focused on specific goals
primarily in the weak aspects of AI (as opposed to Strong AI). Weak AI
focused on solving specific problems, compared to Strong AI, whose goal
was to emulate the full range of human cognitive capabilities. Secondly,
the field of AI broadened to include many new types of approaches,
for example, the biologically inspired approaches such as Ant Colony
Optimization (ACO).
The Silent Return
An interesting aspect of AI’s return was that it occurred silently. Instead of
the typical claims of Strong AI, weak algorithms found use in a variety of
settings. Fuzzy logic and fuzzy control systems were used in a number of
settings, including camera auto-focus, antilock braking systems as well as
playing a part in medical diagnosis. Collaborative filtering algorithms found
their way into product recommendation at a popular online bookseller, and
popular Internet search engines use AI algorithms to cluster search results
to help make finding what you need easier.
The silent return follows what Rodney Brooks calls the “AI effect.” AI
algorithms and methods transition from being “AI” to standard algorithms
and methods once they become practically useful. The methods described
above are one example, another is speech recognition. The algorithms
behind recognizing the sounds of speech and translating them into symbols
were once described within the confines of AI. Now these algorithms are
commonplace, and the AI moniker has long since passed. Therefore, the AI
effect has a way of diminishing AI research, as the heritage of AI research
becomes lost in the practical application of the methods.
Messy and Scruffy Approaches Take Hold
With AI’s resurgence came different views and approaches to AI and problem
solving with AI algorithms. In particular, the scruffy approaches became
more widespread and the algorithms became more applicable to real-world
problems. Neural networks continued to be researched and applied, and new
algorithms and architectures resulted. Neural networks and genetic algorithms
The History of AI 11
combined to provide new ways to create neural network architectures that not
only solved problems, but did so in the most efficient ways. This is because the
survival of the fittest features of the genetic algorithm drove neural network
architectures to minimize for the smallest network to solve the given problem
at hand. The use of genetic algorithms also grew in a number of other areas
including optimization (symbolic and numerical), scheduling, modeling
and many others. Genetic algorithms and neural networks (supervised and
unsupervised) are covered in Chapters 7, 8, and 9.
Other bottom-up and biologically inspired approaches followed in the
1990s and beyond. In early 1992, for example, Marco Dorigo introduced
the idea of using stigmergy (indirect communication in an environment, in
this case, pheromones). Dorigo’s use of stigmergy was applied to a variety
of problems. Ant Colony Optimization (or ACO) is demonstrated with the
traveling salesman problem in Chapter 12.
Also emerging out of the messy approaches to AI was a new field
called Artificial Life. Artificial Life research studies the processes of life
and systems related to life through a variety of simulations and models.
In addition to modeling singular life, ALife also simulates populations of
lifeforms to help understand not only evolution, but also the evolution of
characteristics such as language. Swarm intelligence is another aspect of
this that grew from ALife research. ALife is interesting in the context of AI
because it can use a number of AI methods such as neural networks (as the
neuro-controller of the individuals in the population) as well as the genetic
algorithm to provide the basis for evolution. This book provides a number
of demonstrations of ALife both in the context of genetic algorithms and
neural networks.
NOTE One of the earliest simulation environments that demonstrated artificial
life was the “game of life” created by John Conway. This was an example
of a cellular automaton, and is explored later.
Another bottom-up approach that evolved during AI’s re-emergence used
the human immune system as inspiration. Artificial Immune Systems (or AIS)
use principles of the immune system and the characteristics that it exhibits
for problem solving in the domains of optimization, pattern recognition, and
data mining. A very novel application of AIS is in computational security.
The human body reacts to the presence of infections through the release of
antibodies which destroy those infectious substances. Networks of computers
can perform the same function, for example, in the domain of network
security. If a software virus is found on a computer within a given network,
12 Artificial Intelligence
other “antibody” programs can be dispatched to contain and destroy those
viruses. Biology continues to be a major source of inspiration for solutions
to many types of problems.
Agent Systems
Agents, which are also referred to as intelligent agents or software agents, are
a very important element of modern-day AI. In many ways, agents are not an
independent aspect of but instead a vehicle for AI applications. Agents are
applications that exhibit characteristics of intelligent behavior (such as learning
or classification), but are not in themselves AI techniques. There also exists
other agent-based methods such as agent-oriented computing and multi-agent
systems. These apply the agent metaphor for solving a variety of problems.
One of the most popular forms of intelligent agents is “agency”
applications. The word agency is used because the agent represents a user
for some task that it performs for the user. An example includes a scheduling
application. Agents representing users intelligently negotiate with one
another to schedule activities given a set of constraints for each user.
The concept of agents has even been applied to the operation of a
deepspace spacecraft. In 1999 NASA integrated what was called the “Remote
Agent” into the Deep Space 1 spacecraft. Deep Space 1’s goal was to test a
number of high-risk technologies, one of which was an agent that was used to
provide autonomy to the spacecraft for limited durations of time. The Remote
Agent employed planning techniques to autonomously schedule experiments
based on goals defined by ground operators. Under constrained conditions, the
Remote Agent succeeded in proving that an intelligent agent could be used to
autonomously manage a complicated probe and satisfy predefined objectives.
Today you’ll find agents in a number of areas, including distributed systems.
Mobile agents are independent agents that include autonomy and the ability
to travel amongst nodes of a network in order to perform their processing.
Instead of the agent communicating with another agent remotely, the mobile
agent can travel to the other agent’s location and communicate with it directly.
In disconnected network situations, this can be very beneficial. You can learn
more about intelligent agents (including mobile agents) in Chapter 11.
AI INTER-DISCIPLINARY R&D
In many cases, AI research tends to be fringe research, particularly when
it’s focused on Strong AI. But what’s notable about research in AI is that
the algorithms tend to find uses in many other disciplines beyond that of
The History of AI 13
AI. AI research is by no means pure research, but its applications grow well
beyond the original intent of the research. Neural networks, data mining,
fuzzy logic, and Artificial Life (for example) have found uses in many other
fields. Artificial Life is an interesting example because the algorithms and
techniques that have resulted from research and development have found
their way into the entertainment industry (from the use of swarming in
animated motion pictures to the use of AI in video games).
Rodney Brook’s has called this the AI effect, suggesting that another
definition for AI is “almost implemented.” This is because once an AI
algorithm finds a more common use, it’s no longer viewed as an AI algorithm
but instead just an algorithm that’s useful in a given problem domain.
SYSTEMS APPROACH
In this book, the majority of the algorithms and techniques are studied
from the perspective of the systems approach. This simply means that the
algorithm is explored in the context of inputs and outputs. No algorithm is
useful in isolation, but instead from the perspective of how it interacts with
its environment (data sampling, filtering, and reduction) and also how it
manipulates or alters its environment. Therefore, the algorithm depends
on an understanding of the environment and also a way to manipulate the
environment. This systems approach illustrates the practical side of artificial
intelligence algorithms and techniques and identifies how to ground the
method in the real world (see Figure 1.1).
As an example, one of the most interesting uses of AI today can be found in
game systems. Strategy games, for example, commonly occupy a map with two
or more opponents. Each opponent competes for resources in the environment
in order to gain the upper hand over the other. While collecting resources,
each opponent can schedule the development of assets to be used to defeat the
other. When multiple assets exist for an opponent (such as a military unit), they
can be applied in unison, or separately to lay siege on another opponent.
Where strategy games depend on a higher-level view of the environment
(such as would be viewed from a general), first-person shooter games
(FPS) take a lower-level view (from that of a soldier). An agent in an FPS
depends most often on its view of the battlefield. The FPS agent’s view of the
environment is at a much lower level, understanding cover, objectives, and
local enemy positions. The environment is manipulated by the FPS agent
through its own movement, attacking or defending from enemies (through
finding cover), and possibly communicating with other agents.
14 Artificial Intelligence
An obvious example of the systems approach is in the field of robotics.
Mobile robots, for example, utilize an array of sensors and effects that make
up the physical robot. At the core of the robot is one or more algorithms
that yield rational behavior.
FIGURE 1.1 The systems approach to Artificial Intelligence.
The History of AI 15
In each case, the AI algorithm that’s chosen is the core of an agent’s
sensors (inputs) and effectors (outputs). For this reason, the algorithm
can’t truly be useful or understood unless it’s considered from its place in
the environment.
OVERVIEW OF THIS BOOK
This book covers a wide range of AI techniques, each segmented
appropriately into their particular genre. The following chapter summaries
present the ideas and methods that are explored.
Uninformed Search
In the early days of AI, AI was a search, whether search involved looking for a
plan, or through the various moves that are possible (and subsequent moves)
in a game of Checkers. In this chapter on uninformed (or blind) search,
the concept of search in various spaces is introduced, the representation
of spaces for search, and then the various popular algorithms used in blind
search are explored. This includes depth-first, breadth-first, uniform-cost-
search, and others.
Informed Search
Informed search is an evolution of search that applies heuristics to the search
algorithm, given the problem space, to make the algorithm more efficient.
This chapter covers best-first, a star, hill climbing, simulated annealing, tabu
search, and constraint satisfaction.
AI and Games
One of the earliest uses of blind and informed search was in the application to
games. Games such as Checkers and Chess were believed to be an intelligent
activity, and if a computer could be endowed with the ability to play a game
and win against a human opponent, it could be considered intelligent.
Samuel’s Checkers program demonstrated a program that could defeat its
creator, and while a feat, this experiment did not produce an intelligent
computer except within the domain of Checkers. This chapter explores
two-player games and the core of many game-playing systems, the minimax
algorithm. A variety of games are then discussed, from the classical games
such as Chess, Checkers, and Go to video game AI, exploring movement,
behavior, team, and real-time strategy AI.
16 Artificial Intelligence
Knowledge Representation
Knowledge representation has a long history in AI, particularly in
Strong AI research. The goal behind knowledge representation is to find
abstractions for knowledge that result in a base of knowledge that’s useful
to a given application. For example, knowledge must be represented in
a way that makes it easy for a computer to reason with it and understand
the relationships between elements of the knowledge base. This chapter
will provide an introduction to a number of fundamental knowledge
representation techniques as well as introduce the ideas behind predicate
and first-order logic to reason with knowledge.
Machine Learning
Machine learning is best described as learning from example. Machine
learning incorporates a variety of methods such as supervised and
unsupervised learning. In supervised learning, a teacher is available to
define correct or incorrect responses. Unsupervised learning differs in that
no teacher is present. (Instead, unsupervised learning learns from the data
itself by identifying its) relationships. This chapter provides an introduction
to machine learning, and then explores a number of machine learning
algorithms such as decision trees and nearest neighbor learning.
Evolutionary Computation
Evolutionary computation introduced the idea of scruffy approaches to AI.
Instead of focusing on the high level, trying to imitate the behavior of the
human brain, scruffy approaches start at a lower level trying to recreate
the more fundamental concepts of life and intelligence using biological
metaphors. This chapter covers a number of the evolutionary methods
including genetic algorithms, genetic programming, evolutionary strategies,
differential evolution, and particle swarm optimization.
Neural Networks I
While neural networks are one of the earliest (and more controversial)
techniques, they remain one of the most useful. The attack on neural
networks severely impacted AI funding and research, but neural
networks re-emerged from AI’s winter as a standard for classification and
learning. This chapter introduces the basics of neural networks, and then
explores the supervised neural network algorithms (least-mean-squares,
backpropagation, probabilistic neural networks, and others). The chapter
The History of AI 17
ends with a discussion of neural network characteristics and ways to tune
them given the problem domain.
Neural Networks II
Where the previous chapter explored supervised neural network
algorithms, this chapter provides an introduction to the unsupervised
variants. Unsupervised algorithms use the data itself to learn without
the need for a “teacher.” This chapter explores unsupervised learning
algorithms, including Hebbian learning, Simple Competitive Learning,
k-Means Clustering, Adaptive Resonance Theory, and the Hopfield auto-
associative model.
Intelligent Agents
Intelligent (or Software) Agents are one of newest techniques in the AI
arsenal. In one major definition, agents are applications that include the
concept of “agency.” This means that those applications represent a user and
satisfy the goals of the task autonomously without further direction from the
user. This chapter on intelligent agents will introduce the major concepts
behind intelligent agents, their architectures and applications.
Biologically Inspired and Hybrid Models
AI is filled with examples of the use of biological metaphors, from early
work in neural networks to modern-day work in artificial immune systems.
Nature has proven to be a very worthy teacher for complex problem
solving. This chapter presents a number of techniques that are both
biologically inspired as well as hybrid (or mixed) models of AI. Methods
such as artificial immune systems, simulated evolution, Lindenmayer
systems, fuzzy logic, genetically evolved neural networks, and ant colony
optimization are explored, to name a few.
Languages of AI
While most people think of LISP when considering the languages of AI,
there have been a large number of languages developed specifically for AI
application development. In this chapter, a taxonomy of computer languages
is presented followed by short examples (and advantages) of each. Then a
number of AI-specific languages are investigated, exploring their history and
use through examples. Languages explored include LISP, Scheme, POP-11,
and Prolog.
18 Artificial Intelligence
CHAPTER SUMMARY
The history of AI is a modern-day drama. It’s filled with interesting
characters, cooperation, competition, and even deception. But outside of
the drama, there has been exceptional research and in recent history an
application of AI’s ideas in a number of different settings. AI has finally left
the perception of fringe research and entered the realm of accepted research
and practical development.
REFERENCES
[LISP 2007] Wikipedia “Lisp (programming language)”, 2007.
Available online at http://en.wikipedia.org/wiki/Lisp_%28programming_
language%29
[Newell 1956] Newell, A., Shaw, J.C., Simon, H.A “Emperical Explorations of
the Logic Theory Machine: A Case Study in Heuristics,” in Proceedings
of the Western Joint Computer Conference, 1956.
[Shannon 1950] Shannon, Claude, “Programming a Computer for Playing
Chess,” Philisophical Magazine 41, 1950.
RESOURCES
Rayman, Marc D., et al “Results from the Deep Space 1 Technology
Validation Mission,” 50th International Astronomical Congress,
Amsterdam, The Netherlands, 1999.
de castr, Leandro N., Timmis, Jonathan Artificial Immune Systems: A New
Computational Intelligence Approach Springer, 2002.
Holland, John Adaptation in Natural and Artificial Systems. University of
Michigan Press, Ann Arbor, 1975.
McCarthy, John “Recursive Functions of Symbolic Expressions and their
Computation by Machine (Part I),” Communications of the ACM, April
1960.
Shortliffe, E.H. “Rule-based Exper Systems: The Mycin Experiments of the
Stanford Heuristic Programming Project,” Addison-Wesley, 1984.
Winograd, Terry “Procedures as a Representation for Data in a Computer
Program for Understanding Natural Language,” MIT AI Technical
Report 235, February 1971.
Woods, William A. “Transition Network Grammars for Natural Language
Analysis,” Communications of the ACM 13:10, 1970.
The History of AI 19
EXERCISES
1. In your own words, define intelligence and why intelligence tests can
hide the real measure of intelligence.
2. What was the Turing test, and what was it intended to accomplish?
3. Why were games the early test-bed for AI methods? How do you think
AI and games are viewed today?
4. How did Arthur Samuel set the bar for learning programs in the 1950s?
5. What was the first language developed specifically for AI? What language
followed in the 1970s, developed also for AI?
6. Define Strong AI.
7. What event is most commonly attributed to leading to AI’s winter?
8. What is meant by Scruffy and Neat approaches to AI?
9. After AI’s winter, what was most unique about AI’s re-emergence?
10. This book explores AI from the systems approach. Define the systems
approach and how this perspective is used to explore AI.
Artificial Intelligence A Systems Approach 1st Edition M Tim Jones
C h a p t e r
UNINFORMED
SEARCH
2
U
ninformed search, also called blind search and naïve search, is a
class of general purpose search algorithms that operate in a brute-
force way. These algorithms can be applied to a variety of search
problems, but since they don’t take into account the target problem, are
inefficient. In contrast, informed search methods (discussed in Chapter 3)
use a heuristic to guide the search for the problem at hand and are therefore
much more efficient. In this chapter, general state space search is explored
and then a variety of uninformed search algorithms will be discussed and
compared using a set of common metrics.
SEARCH AND AI
Search is an important aspect of AI because in many ways, problem solving
in AI is fundamentally a search. Search can be defined as a problem-solving
technique that enumerates a problem space from an initial position in search
of a goal position (or solution). The manner in which the problem space is
searched is defined by the search algorithm or strategy. As search strategies
offer different ways to enumerate the search space, how well a strategy works
is based on the problem at hand. Ideally, the search algorithm selected is one
whose characteristics match that of the problem at hand.
22 Artificial Intelligence
CLASSES OF SEARCH
Four classes of search will be explored here. In this chapter, we’ll review
uninformed search, and in Chapter 3, informed search will be discussed.
Chapter 3 will also review constraint satisfaction, which tries to find a set of
values for a set of variables. Finally, in Chapter 4, we’ll discuss adversarial
search, which is used in games to find effective strategies to play and win
two-player games.
GENERAL STATE SPACE SEARCH
Let’s begin our discussion of search by first understanding what is meant
by a search space. When solving a problem, it’s convenient to think about
the solution space in terms of a number of actions that we can take, and the
new state of the environment as we perform those actions. As we take one
of multiple possible actions (each have their own cost), our environment
changes and opens up alternatives for new actions. As is the case with
many kinds of problem solving, some paths lead to dead-ends where others
lead to solutions. And there may also be multiple solutions, some better
than others. The problem of search is to find a sequence of operators that
transition from the start to goal state. That sequence of operators is the
solution.
How we avoid dead-ends and then select the best solution available
is a product of our particular search strategy. Let’s now look at state space
representations for three problem domains.
Search in a Physical Space
Let’s consider a simple search problem in physical space (Figure 2.1). Our
initial position is ‘A’ from which there are three possible actions that lead to
position ‘B,’ ‘C,’ or ‘D.’ Places, or states, are marked by letters. At each place,
there’s an opportunity for a decision, or action. The action (also called an
operator) is simply a legal move between one place and another. Implied in
this exercise is a goal state, or a physical location that we’re seeking.
This search space (shown in Figure 2.1) can be reduced to a tree
structure as illustrated in Figure 2.2. The search space has been minimized
here to the necessary places on the physical map (states) and the transitions
that are possible between the states (application of operators). Each node in
the tree is a physical location and the arcs between nodes are the legal moves.
The depth of the tree is the distance from the initial position.
Uninformed Search 23
Search in a Puzzle Space
The “Towers of Hanoi” puzzle is an interesting example of a state space for
solving a puzzle problem. The object of this puzzle is to move a number of
disks from one peg to another (one at a time), with a number of constraints
that must be met. Each disk is of a unique size and it’s not legal for a larger
disk to sit on top of a smaller disk. The initial state of the puzzle is such that
all disks begin on one peg in increasing size order (see Figure 2.2). Our goal
(the solution) is to move all disks to the last peg.
As in many state spaces, there are potential transitions that are not legal.
For example, we can only move a peg that has no object above it. Further,
we can’t move a large disk onto a smaller disk (though we can move any disk
FIGURE 2.1: A search problem represented as a physical space.
FIGURE 2.2: Representing the physical space problem in Figure 2.1 as a tree.
24 Artificial Intelligence
to an empty peg). The space of possible operators is therefore constrained
only to legal moves. The state space can also be constrained to moves that
have not yet been performed for a given subtree. For example, if we move a
small disk from Peg A to Peg C, moving the same disk back to Peg A could
be defined as an invalid transition. Not doing so would result in loops and
an infinitely deep tree.
Consider our initial position from Figure 2.3. The only disk that may
move is the small disk at the top of Peg A. For this disk, only two legal moves
are possible, from Peg A to Peg B or C. From this state, there are three
potential moves:
1. Move the small disk from Peg C to Peg B.
2. Move the small disk from Peg C to Peg A.
3. Move the medium disk from Peg A to Peg B.
The first move (small disk from Peg C to Peg B), while valid is not a potential
move, as we just moved this disk to Peg C (an empty peg). Moving it a second
time serves no purpose (as this move could have been done during the prior
transition), so there’s no value in doing this now (a heuristic). The second
move is also not useful (another heuristic), because it’s the reverse of the
FIGURE 2.3: A search space for the “Tower of Hanoi” puzzle.
Uninformed Search 25
previous move. This leaves one valid move, the medium disk from Peg A to
Peg B. The possible moves from this state become more complicated, because
valid moves are possible that move us farther away from the solution.
TIP
A heuristic is a simple or efficient rule for solving a given problem or
making a decision.
When our sequence of moves brings us from the initial position to the goal,
we have a solution. The goal state in itself is not interesting, but instead
what’s interesting is the sequence of moves that brought us to the goal state.
The collection of moves (or solution), done in the proper order, is in essence
a plan for reaching the goal. The plan for this configuration of the puzzle
can be identified by starting from the goal position and backtracking to the
initial position.
Search in an Adversarial Game Space
An interesting use of search spaces is in games. Also known as game trees,
these structures enumerate the possible moves by each player allowing
the search algorithm to find an effective strategy for playing and winning
the game.
NOTE The topic of adversarial search in game trees is explored in Chapter 4.
Consider a game tree for the game of Chess. Each possible move is provided
for each possible configuration (placement of pieces) of the Chess board.
But since there are 10120
possible configurations of a Chess board, a game
tree to document the search space would not be feasible. Heuristic search,
which must be applied here, will be discussed in Chapter 3.
Let’s now look at a much simpler game that can be more easily
represented in a game tree. The game of Nim is a two-player game where
each player takes turns removing objects from one or more piles. The player
required to take the last object loses the game.
Nim has been studied mathematically and solved in many different
variations. For this reason, the player who will win can be calculated based
upon the number of objects, piles, and who plays first in an optimally
played game.
NOTE The game of Nim is said to have originated in China, but can be traced
to Germany as the word nimm can be translated as take. A complete
mathematical theory of Nim was created by Charles Bouton in 1901.
[Bouton 1901]
26 Artificial Intelligence
Let’s walk through an example to see how Nim is played. We’ll begin with
a single small pile to limit the number of moves that are required. Figure
2.4 illustrates a short game with a pile of six objects. Each player may take
one, two, or three objects from the pile. In this example, Player-1 starts
the game, but ends the game with a loss (is required to take the last object
which results in a loss in the misère form of the game). Had Player-1 taken
3 in its second move, Player-2 would have been left with one resulting in a
win for Player-1.
A game tree makes this information visible, as illustrated in Figure 2.5.
Note in the tree that Player-1 must remove one from the pile to continue
the game. If Player-1 removes two or three from the pile, Player-2 can win
if playing optimally. The shaded nodes in the tree illustrate losing positions
for the player that must choose next (and in all cases, the only choice left is
to take the only remaining object).
Note that the depth of the tree determines the length of the game
(number of moves). It’s implied in the tree that the shaded node is the final
move to be made, and the player that makes this move loses the game. Also
note the size of the tree. In this example, using six objects, a total of 28 nodes
is required. If we increase our tree to illustrate a pile of seven objects, the
tree increases to 42 nodes. With eight objects, three balloons to 100 nodes.
Fortunately, the tree can be optimized by removing duplicate subtrees,
resulting in a much smaller tree.
FIGURE 2.4: A sample game of Nim with a pile of six objects.
Uninformed Search 27
TREES, GRAPHS, AND REPRESENTATION
A short tour of trees and graphs and their terminology is in order before
exploring the various uninformed search methods.
A graph is a finite set of vertices (or nodes) that are connected by edges
(or arcs). A loop (or cycle) may exist in a graph, where an arc (or edge) may
lead back to the original node. Graphs may be undirected where arcs do
not imply a direction, or they may be directed (called a digraph) where a
direction is implicit in the arc. An arc can also carry a weight, where a cost
can be associated with a path.
Each of these graphs also demonstrates the property of connectivity. Both
graphs are connected because every pair of nodes is connected by a path. If
every node is connected to every node by an arc, the graph is complete. One
special connected graph is called a tree, but it must contain no cycles.
Building a representation of a graph is simple and one of the most
common representations is the adjacency matrix. This structure is simply
FIGURE 2.5: A complete Nim game tree for six objects in one pile.
FIGURE 2.6: An example of an undirected
graph containing six nodes and eight arcs.
FIGURE 2.7: An example of a directed
graph containing six edges and nine arcs.
28 Artificial Intelligence
an N by N matrix (where N is the number of nodes in the graph). Each
element of the matrix defines a connectivity (or adjacency) between the node
referenced as the row and the node referenced as the column.
Recall the undirected graph in Figure 2.6. This graph contains six nodes and
eight arcs. The adjacency matrix for this undirected graph is shown in Figure
2.9. The two dimensions of the graph identify the source (row) and destination
nodes (column) of the graph. From Figure 2.6, we know that node A is adjacent
to nodes B, C, and D. This is noted in the adjacency matrix with a value of one
in each of the B, C, and D columns for row A. Since this is an undirected graph,
we note symmetry in the adjacency matrix. Node A connects to node B (as
identified in row A), but also node B connects to node A (as shown in row B).
For a directed graph (as shown in Figure 2.7), the associated adjacency
matrix is illustrated in Figure 2.10. Since the graph is directed, no symmetry
can be found. Instead, the direction of the arcs is noted in the matrix.
For example, node B connects to node A, but node A has no associated
connection to node B.
An interesting property of the adjacency matrix can be found by reviewing
the rows and columns in isolation. For example, if we review a single row, we
can identify the nodes to which it connects. For example, row C shows only a
connection to node F (as indicated by the one in that cell). But if we review
the column for node C, we find the nodes that have arcs connecting to node
C. In this case, we see nodes A, D, and E (as illustrated graphically in Figure
2.7). We can also find whether a graph is complete. If the entire matrix is
non-zero, then the graph is complete. It’s also simple to find a disconnected
graph (a node whose row and column contain zero values). Loops in a graph
can also be algorithmically discovered by enumerating the matrix (recursively
FIGURE 2.8: A connected graph with no cycles (otherwise known as a tree).
Uninformed Search 29
following all paths looking for the initial node).
In the simple case, the values of the adjacency matrix simply define the
connectivity of nodes in the graph. In weighted graphs, where arcs may not
all be equal, the value in a cell can identify the weight (cost, or distance).
We’ll explore examples of this technique in the review of neural network
construction (Chapter 11).
Adjacency lists are also a popular structure where each node contains
a list of the nodes to which it connects. If the graph is sparse, this
representation can require less space.
UNINFORMED SEARCH
The uninformed search methods offer a variety of techniques for graph
search, each with its own advantages and disadvantages. These methods are
explored here with discussion of their characteristics and complexities.
Big-O notation will be used to compare the algorithms. This notation
defines the asymptotic upper bound of the algorithm given the depth (d) of
the tree and the branching factor, or the average number of branches (b)
from each node. There are a number of common complexities that exist for
search algorithms. These are shown in Table 2.1.
Table 2.1: Common orders of search functions.
O-Notation Order
O(1) Constant (regardless of the number of nodes)
FIGURE 2.9: Adjacency matrix for the
undirected graph shown in Figure 2.6.
FIGURE 2.10: Adjacency matrix for the
directed graph (digraph) shown in Figure 2.7.
30 Artificial Intelligence
O(n) Linear (consistent with the number of nodes)
O(log n) Logarithmic
O(n2
) Quadratic
O(cn
) Geometric
O(n!) Combinatorial
Big-O notation provides a worst-case measure of the complexity of a search
algorithm and is a common comparison tool for algorithms. We’ll compare
the search algorithms using space complexity (measure of the memory
required during the search) and time complexity (worst-case time required
to find a solution). We’ll also review the algorithm for completeness (can the
algorithm find a path to a goal node if it’s present in the graph) and optimality
(finds the lowest cost solution available).
Helper APIs
A number of helper APIs will be used in the source code used to demonstrate
the search functions. These are shown below in Listing 2.1.
LISTING 2.1: Helper APIs for the search functions.
/* Graph API */
graph_t *createGraph (int nodes );
void destroyGraph (graph_t *g_p );
void addEdge (graph_t *g_p, int from, int to, int value );
int getEdge (graph_t *g_p, int from, int to );
/* Stack API */
stack_t *createStack (int depth );
void destroyStack (stack_t *s_p );
void pushStack (stack_t *s_p, int value );
int popStack (stack_t *s_p );
int isEmptyStack (stack_t *s_p );
/* Queue API */
queue_t *createQueue (int depth );
void destroyQueue (queue_t *q_p );
void enQueue (queue_t *q_p, int value );
int deQueue (queue_t *q_p );
int isEmptyQueue (queue_t *q_p );
/* Priority Queue API */
pqueue_t *createPQueue (int depth );
Uninformed Search 31
void destroyPQueue (pqueue_t *q_p );
void enPQueue (pqueue_t *q_p, int value, int cost );
void dePQueue (pqueue_t *q_p, int *value, int *cost );
int isEmptyPQueue (pqueue_t *q_p );
int isFullPQueue (pqueue_t *q_p );
O
N THE C
D
The helper functions can be found on the CD-ROM at ./software/
common.
General Search Paradigms
Before we discuss some of the uninformed search methods, let’s look at two
simple general uninformed search methods.
The first is called ‘Generate and Test.’ In this method, we generate a
potential solution and then check it against the solution. If we’ve found
the solution, we’re done, otherwise, we repeat by trying another potential
solution. This is called ‘Generate and Test’ because we generate a potential
solution, and then test it. Without a proper solution, we try again. Note here
that we don’t keep track of what we’ve tried before; we just plow ahead with
potential solutions, which is a true blind search.
Another option is called ‘Random Search’ which randomly selects a new
state from the current state (by selecting a given valid operator and applying
it). If we reach the goal state, then we’re done. Otherwise, we randomly
select another operator (leading to a new state) and continue.
Random search and the ‘Generate and Test’ method are truly blind
methods of search. They can get lost, get caught in loops, and potentially
never find a solution even though one exists within the search space.
Let’s now look at some search methods that while blind, can find a
solution (if one exists) even if it takes a long period of time.
Depth-First Search (DFS)
The Depth-First Search (DFS) algorithm is a technique for searching a
graph that begins at the root node, and exhaustively searches each branch
to its greatest depth before backtracking to previously unexplored branches
(Figure 2.11 illustrates this search order). Nodes found but yet to be
reviewed are stored in a LIFO queue (also known as a stack).
NOTE A stack is a LIFO (Last-In-First-Out) container of objects. Similar to
a stack of paper, the last item placed on the top is the first item to be
removed.
32 Artificial Intelligence
The space complexity for DFS is O(bd) where the time complexity is
geometric (O(bd
)). This can be very problematic on deep branching graphs,
as the algorithm will continue to the maximum depth of the graph. If loops
are present in the graph, then DFS will follow these cycles indefinitely.
For this reason, the DFS algorithm is not complete, as cycles can prohibit
the algorithm from finding the goal. If cycles are not present in the graph,
then the algorithm is complete (will always find the goal node). The DFS
algorithm is also not optimal, but can be made optimal using path checking
(to ensure the shortest path to the goal is found).
O
N THE C
D
The DFS implementation can be found on the CD-ROM at ./software/
ch2/dfs.c.
Graph algorithms can be implemented either recursively or using a stack to
maintain the list of nodes that must be enumerated. In Listing 2.2, the DFS
algorithm is implemented using a LIFO stack.
Listing 2.2: The depth-first search algorithm.
#include <stdio.h>
#include “graph.h”
#include “stack.h”
#define A 0
#define B 1
FIGURE 2.11: Search order of the DFS algorithm over a small tree.
Exploring the Variety of Random
Documents with Different Content
revolutionist to join in the general pursuit, with a big oath, and the
cry of "Vive la Republique! à bas les tyrans!"
Now again, late in the evening, hurries past a detachment of
National Guards. We ask, what now is afloat in a city where every
day something new and startling crosses our life's path. We are told
that the citizen troops are hastening to the rescue of a newspaper
editor, who has ventured to write articles in opposition to the
Government. His house is being stormed by an angry and excited
mob; they threaten to break his presses, if not burn the whole
establishment. In vain he meets the mob with courage, and asserts
the right of that "liberty of opinion," which the republic has
proclaimed as one of its first benefits. He is not listened to. What is
liberty of opinion, or any liberty, in the sense of a mob, compared
with its own liberty of doing what it listeth? They advance upon the
house with threatening gesture—they pour in: the National Guards
arrive, and a scuffle ensues. With difficulty the mob is driven back,
and sentinels are posted. But now the crowds, in the dim night,
grow thicker on the Boulevards than ever; and violent declamation is
still heard from the midst against the man who, whatever be his real
ends and aims, has the courage to assert an opinion contrary to the
mass. Partisans there are, for and against: and high words arise, and
threats are again proffered: and along the damp night air comes
ever the murmur of many angry voices far and near: and the rumour
ceases not, the crowd disperse not. And in the distracted city, where
was firing, and shouting, and singing, and drumming, all day, there
is still the agitation and the tumult long and late into the night.
But let us take a turn to the neighbourhood of the Hotel de Ville, the
seat of the Government; other fresh scenes will there meet our eyes.
Daily and hourly pour up into the open space before the fine old
building, such troops of drumming, banner-bearing men and women
as have been before described. Sometimes they are deputations
from the various trades, full of all sorts of grievances, for which the
members of the Provisional Government are expected to find
immediate remedy;—sometimes they are bands of workmen, all
couching, under different expressions, the demand for much pay and
little work;—sometimes they bear addresses from various nations all
speaking in the name of their country, which probably would
disavow them;—sometimes they are delegates from the thousand
and one clubs of Paris, who all choose to lay their resolutions,
however frantic and impracticable they may be, before the
Government, and expect to impose upon it their distracted will;—
sometimes they are a body of individuals, who have got some fancy
for a remedy of the financial crisis, which, of course, unless it would
offend them bitterly, the Government is expected forthwith to adopt.
Deputations, addresses, counsels, demands, exactions,—they must
all be admitted, they must all be heard, they must all receive
flattering promises, that probably never will, and never can be
fulfilled. See! they come streaming up from all sides, from streets
and quays, in noisy inundating floods; and now the streams mingle
and roar together, and struggle for precedence. Generally, delegates
are despatched to obtain audiences of the persecuted members of
the Government; but sometimes, again, some tired minister or other
is forced to appear in front, and harangue their importunate
petitioners, amidst cries of "Vive la Republique!" For those who dwell
upon this place, Paris must appear to be in a state of constant
revolution. The noise, the tumult, the drumming, the shouting, the
marching and the countermarching, never cease for a moment.
See! to-day there is a tumult before the façade of the old building.
Battalions of National Guards have marched up, without arms, to
protest against a despotic and arbitrary ordinance of an ambitious
and reckless minister. They bring up their petition as thousands of
other deputations have brought up theirs; the square is filled for the
most part with long military-looking lines of their uniforms. But in a
sudden, they have come to a check. Before the long façade of the
line of building, are posted bodies of armed men, of the lower
classes, with muskets charged and bayonets fixed. The
demonstration of the National Guards, who dare to murmur at the
will of their governors, spite of the proclamation of the reign of
liberty, is not to be received. Anger and indignation is on the faces of
all the citizen-soldiers; their feelings are excited; they cry, "down
with" the obnoxious minister; they are met by cries from the armed
people, of "down with the National Guards! down with the
aristocrats!" The middling classes are now considered, then, as the
aristocrats of the day; and the people treat them, as they have
treated, in days gone by, the titled noblesse—as enemies! But now
they advance in rank and file, determined to force an entrance to the
Government palace: and the people oppose them with pointed
bayonets; and drive them back; disperse them like sheep; pursue
them down the quays; and the unarmed mob, collected in countless
crowds around, joins in the cry of "down with the National Guards!"
The National Guards are vanquished. They were considered in the
revolutionary days of combat as the heroes, and allies, and
defenders of the people. Only a few weeks are gone by since then;
and they, in turn, are overthrown in a bloodless revolution. Their
prestige is lost for ever. The last barrier is thrown down between the
upper and the lower classes—the breakwater is swept away: and
when the day of storm and tempest shall come, when the angry
waters shall rise, when the inundation shall sweep on and on in
tumultuous tide, what shall there be now to oppose it?
On the morrow, what a scene! From a very early hour of the
morning, bands of hundreds and of thousands, in marching order,
have poured down upon Paris from all the suburbs. From north,
south, east, and west, they have come in countless hordes into the
central streets and squares of the capital. Along the Boulevards,
from the Bastile, from the heights of Montmartre, down the avenues
of the Champs Elysées and the quays—from beyond the water and
the Faubourg St Martel, they have come, sweeping on like so many
mountain torrents. Every where as they advanced they have
proferred cries of "Down with the National Guards! down with the
aristocrats! down with the legitimists! down with the enemies of the
Republic!" Better dressed men in many instances have marshalled
them on their way; and among the inhabitants of Paris goes forth a
murmur, that they have been roused to this state of tumult by the
accolytes of the obnoxious minister, with the intention of overawing
his colleagues and displaying his own power. And if, in truth, they
shout "long live" any one, it is his name they cry: his noble-hearted
and more moderate colleague, lately so popular, has lost a people's
favour. And now the hundred torrents have met upon the quays, and
before the Hotel de Ville; and hundreds of banners with manifold
inscriptions are waving in the air; and troop upon troop is marshalled
into some degree of order: but fearful is the mass: awful is the
demonstration of a people! And now the members of the
Government are compelled, one and all, to come down upon the
elevated terrace before the façade of the Hotel de Ville: they are
behung with tricolor scarfs, the ends of which stream with long gold
fringes; their heads are bared before their masters and the rulers of
the land. And now the host of people defiles before them; and they
make speeches, and cry "Vive la Republique! Vive le peuple!" And
the people, proud of its force, and rejoicing in its demonstration,
that shows its power over the bourgeois, answers with shouts that
rend the air. Heavens! what a scene! This is Republican Paris,
indeed, I trow!
But come quickly to the Boulevards: the mighty mass has passed
away to the column of liberty in the Place de la Bastile; and it will
come down the Boulevards in overwhelming tide, exulting in its
triumph. And now it comes. The long line, five abreast—there are
nearly two hundred thousand in this great army—stretches on and
on, almost from one end to the other of the immense central artery
of the capital. It comes, and the chorus of the Marseillaise rolls like
thunder along, dying away but to burst forth again. Hark! how it
peels along the Boulevards! It comes, and the senses swim as the
host goes by, marching on, and on, and on—confusing the sight with
the incessant passing of such a stream of living beings, and its
waving banners; deafening the ears with the menacing cries of
"Down with the aristocrats!" and the discordant chorussing of
confused patriotic songs—for the Marseillaise now gives way to the
fearful Ca Ira. It comes, and it seems as if it never would end. Awful,
indeed, is the display of a people's force, thus excited and inflamed
by designing leaders! At last the mighty procession passed away,
leaving consternation and alarm behind it. But think not that Paris
resumes its usual aspect. The various bands break up at last, but
they still parade the streets in several battalions: and the shouting
and howling and singing cease not during the day.
But the night of the same day is come, and all is not yet done. Not
content with its triumph, the people demands that all Paris should
honour it with a festival, whether it will or not. Down the Boulevards
come the hordes again, slowly, and pausing as they came on: they
are chanting, in measured notes, the words "Des lampions! des
lampions!" amidst the cries of "Illuminate, or we break your
windows! Down with the aristocrats!" Why all Paris should be
illuminated, because it has pleased King People to make a
demonstration, it would be too insolent to inquire. It is a fancy, a
caprice—and autocrats will have fancies and caprices. It is the
people's will; and, however fantastic or unreasonable, the will must
be obeyed. "Des lampions! des lampions!" The monotonous chant is
impressed upon the ears with stunning force, until you believe that
you must retain it in your bewildered brain until your dying day. And
as they come along, see how readily the will of the people is
obeyed! There is no readiness so quick as the readiness of fear. Up
and down, from above and from below, right and left, in long
irregular lines, until the lines of light become more general and more
regular—see the illumination bursts forth from the façades of all the
houses. Windows are rapidly opened on every side, in sixth stories
as on first floors, on every terrace, on every balcony; and lamps,
lanterns, candles, pots of grease, all flaming, are thrust out at every
one. See! how the light darts up and down like wildfire, dancing
along the houses in the darkness of the night, with an increasing
phosphoric flicker. You may mark the progress of the mob, as it goes
farther on in dusky mass, and is lost to sight in the gloom, not only
by the eternal monotonous cry that bids the inhabitants illuminate,
coming from the distance, but by the gleaming track it leaves behind
it like a gigantic, broad tail of fire. Presently all the Boulevards will
be brightly lighted; and the gleams of the many thousand points of
light will illuminate a thickly moving crowd of beings, that look like
the uneasy spirits of some gloomy pandemonium. Fairy-like,
however, has the magical illumination sprung forth at the people's
bidding, and fairy-like does it flicker on all sides in the night. All the
other principal streets are burning also on either side, like long
bands of spangled stuff glittering in the sun. The Faubourg St
Germain, suspected of legitimacy, has long since been the first to
yield to threats, and demonstrate at its windows its supposed
sympathy in a people's triumph; and to-morrow we shall be told by
the republican papers, how Paris was in an ecstasy of joy—how all
the population strove in zeal, with one accord, to fêter le peuple
généreux—how spontaneous was this illumination of republican
enthusiasm. Spontaneous was the feeling that dictated it, certainly;
but it was the spontaneity of fear—the fear of the quietly-disposed in
the face of a reckless and all-powerful mob!
Let us turn now from the glittering illuminated streets.
What is that unusual light, streaming dimly, and in blurred rays,
across the damp night air, from the windows of the chapel of St
Hyacinthe, attached to the church of the Assumption in the Rue St
Honoré? In such a place, at such an hour, it has something ghastly
and unearthly in its nature. And hark! from within there comes a
noise of hoarse murmuring, which swells sometimes suddenly into
discordant shouts, that are almost groans. The impression conveyed
by both sight and sound is little like any that Paris, even on its
murkiest nights, and under its most dismal veil, ever bestowed on
you before. The unwary wanderer in Paris streets by night, in search
of romance, may have had visions of theft, assassination, misery,
crime, before his eyes, in the dark silent thoroughfares, but always
visions of a most positive earthly nature; now he cannot help
fancying himself transported into some old town of mystic Germany,
with some fantastic, mysterious, unearthly, Hoffmannish deed going
on near him. Are the headless dead, among the victims of a prior
revolution, risen from their bloody vaults, to beckon unto their
ghastly crew new victims of another? or are demons rejoicing in that
once sanctified building, that the reign of men's most evil passions
should have begun again in that disturbed and fermenting city? Such
is the first impression the dim scene conveys. Do you ever
remember such in other days? Let us follow those dark forms that
are gliding across the court of the church, and mounting the steps of
the illumined chapel. We enter; and the scene, although neither
ghastly nor demoniac, is scarcely less strange than if spectres and
demons had animated the interior. Faintly lighted by a few dripping
candles is the long dismantled chapel; and damp, dreary, funereal-
looking, is the whole scene. A dim crowd, in this "darkness visible,"
is fermenting, thronging, struggling, and pushing in the aisle. At the
further end, in that vaulted semicircle where once stood the altar of
the Lord, rises a complicated scaffolding behung with black cloth.
With your imagination already excited, you may fancy the dark
construction a death-scaffold for the execution of a criminal—it is
only the death-scaffold of the social state of France. We are in the
midst of a republican club. On the highest platform, occupying the
space where was the altar, sit president and secretaries of the
society—the new divinities of the consecrated building. Yes! the new
divinities; for they arrogate to themselves the same right against
which they declaimed as blasphemy in kings—the "right divine." You
will not listen long before they tell you so; besides, their first maxim
is, "La voix du peuple est la voix de Dieu." On the lower platform
before them stand the orators. Hark to the doctrines that they
promulgate for the subversion of all existing order in the country,
amidst shouts and screams, and cries of violent opposition
sometimes, but generally of applause. See! the haggard, lanky-
haired republican youths, who have shouted out all their fury, give
way to a quiet, respectable-looking old man, whose gray hairs
glimmer faintly in the candle-light. A feeling of greater calm comes
over you: you imagine, after all this "sound and fury, signifying
nothing," his old head will pacify the hot, maddened blood of frantic
boys. What does he say?—"Yes, the republic is one and indivisible—
it is more than indivisible—it is God!" You shrink back disgusted. Can
the rhapsody of republican fanaticism go further? Are these Christian
men? or are they really evil unearthly beings in a human form? The
confused scene around you is almost enough to make you think so.
But real enough is the eternal clatter of the president's hammer on
his table. He rolls his eyes furiously; he browbeats every orator who
may not be of his own individual opinion, and dares to be
"moderate" when he is "exalté;" and when your head aches—your
heart has ached long ago—with the furious noise of the president's
hammer, which you expect every moment to smash the table to
pieces, you edge your way out of the dark fermenting crowd, and
hurry forth, glad to breathe the purer air of heaven.
Ferment there is ever enough now in the streets of Paris by night: it
ceases not. There are throngs pouring in and out of all the various
thousand-and-one republican clubs of Paris, like wasps about their
nest; but it is in the dim night air, and not in the bright sunlight of
day—in dirty coats and smocks, and not with bright wings and
variegated bodies. The wasp, too, stings only when he is attacked—
the republican wasps seek to attack that they may sting. The al
fresco clubs also crowd the Boulevards, in the chance medley
confusion of all men and all principles. But see! there is here again,
in the Rue du Faubourg du Roule, a confusion of a still more
complicated nature—the swarming in and out of the small district
school-house is even more virulent than is usual. It is another night-
scene, such as the old habitué of Paris never witnessed, certainly.
What is occurring? Let us crowd in with the others. What a scene of
frantic confusion! A crowd springing upon benches, howling,
screeching, yelling. At the further end of the low room is a ruined
gallery, in which stands, surrounded by his friends, a man dressed in
a red scarf, with the red cap of liberty on his head: he has a pike in
his hand, and he vainly endeavours to make himself heard by the
excited crowd. For some time you will be unable to comprehend the
nature of the scene: at last you discover that an ultra republican, of
the most inflamed ideas, wants to establish a Jacobin club. A
"Jacobin club!" There is terror in the very word, and in all the fearful
recollections it conveys. But here the good sense of the artisans and
small tradespeople of the district is against so appalling a
reminiscence of a fatal time. "Down with the bonnet rouge!" they
cry. "Down with the red scarf! No Jacobins! no Jacobins! their day is
gone. No terror!" Thank God! there is some good sense still among
the people. "Down with the president—away with him!" they cry. He
doffs at last his blood-red Phrygian cap—they are not content: he
doffs his blood-red scarf—they are not content: he lays aside his red
cravat—they are not content: the pike—all—his very principles,
probably, if they would have them. But no. They make a rush at last
up into the "tribune;" they drive the would-be Jacobin and his
friends down. In vain a small minority declares them all "aristocrats
—paid agents of legitimacy"—I know not what republican names of
reproach. The honest workmen thrust the party forth from their
district school-house. They escort these objects of their contempt
with ironical politeness to a side-door, bearing the candles they have
seized from the tribune in their hands. The door is closed over the
Jacobin party—a shout of triumph resounds. But in the street, before
the school, is long a noisy throng. The good moon, although now
and then obscured by passing clouds, shines kindly on it. She seems
to smile more kindly upon those who have done a good deed,
although a deed of suppressed violence, than on most of the
distracted throngs she illumines in her course over the disturbed city.
Good moon! would we could accept thy augury, and hope for holy
calm! The scenes thou shinest upon cannot continue thus, 'tis true.
A change must come—a change for the better or the worse. Heaven
grant that our foreboding prove not true—that, when thou comest
forth in thy fulness again, another month, thou mayest smile on
better order, on calmer groups!
Before we part company, old habitué of Paris, we must cast a glance
at all the public buildings we pass. On all—public offices, columns,
fountains, monuments, churches, dismantled palaces—on all alike
floats the republican banner—on all are painted in broad characters
the words, "Liberté, Egalité, Fraternité!" "Fraternité!" Vain word, when
each man grows day by day more and more bitterly his neighbour's
enemy. "Egalité!" Vain word again, and vain word ever, spite of the
efforts of the rulers of France to bring down to one level all the
intelligence, the talent, the feelings, and passions of human nature,
that Providence, in its holy wisdom, has made so different and so
unequal. "Liberté!" Vainest word of all! In the present state of
things, there is constraint in every scheme, tyranny in every
tendency, despotism in every doctrine.
But enough. We will not begin to discuss and speculate upon the
destinies of France. All this sketch would strive to do, is to convey an
idea, however vague, of the present outward state of Republican
Paris.
THE SPANIARD IN SICILY.
[5]
The insatiable spider, who, after securing in her gossamer meshes
ample store of flies for the day's consumption, again repairs, with
unwarrantable greed, to the outer circles of the delicate network, in
quest of fresh and superfluous victims, must not wonder if, on return
to the heart of the citadel, she finds a rival Arachne busy in the
larder, and either is expelled from her own cobweb, or suffers
seriously in ejecting the intruder. At risk of offending his admiring
biographer by so base a parallel, we compare Charles of Anjou to
the greedy spider, and think him justly punished for his rash cupidity
by the evils it entailed. This French count, who, although a king's
brother, had no chance of a crown save through aggressive
conquest, found himself, whilst still in the vigour of life, and as the
result of papal favour, great good fortune, and of his own martial
energy, sovereign of an extensive and flourishing realm. King of
Southern Italy, Protector of the North, Count of Provence, Vicar of
Tuscany, Senator of Rome, all-powerful with the Pope—whose word
had then such weight that his friendship was worth an army, whilst
from his malison men shrunk as from the dreaded and
inextinguishable fire of Greece—Charles of Anjou was still
unsatisfied. The royal spider had cast his web afar; it embraced wide
possessions, with whose enjoyment he might well have been
content, whose administration claimed his undivided attention. But
on their verge an object glittered from which he could not avert his
eyes, whose acquisition engrossed his every thought. "'Twas the
clime of the East, 'twas the land of the sun," the gorgeous and
romantic region so attractive to European conquerors. Doubtless,
crusading zeal had some share in his oriental cravings; but ambition
was his chief motor. He was willing enough to wrest Palestine from
the infidel, but his plan of campaign led first to Constantinople. His
notion was to seek at St Sophia's mosque the key of Christ's
sepulchre.
Whilst thus looking abroad and meditating distant conquest, Charles
treated too lightly the projects of a prince, less celebrated, but
younger and more crafty than himself, who silently watched the
progress of events, and skilfully devised how best he might derive
advantage from them. Pedro of Arragon, who had married Mainfroy's
daughter, Constance, cherished pretensions to the crown of the
Sicilies; and, ever since the year 1279, he had been intriguing with
the chiefs of the Ghibellines, with a view to an invasion of Charles's
dominions. He spoke publicly of Sicily as the inheritance of his
children, and did not dissimulate his animosity to its actual ruler.
Whilst Charles prepared a fleet for his Eastern expedition, Don Pedro
assembled another in the harbour of Portofangos, and kept it in
constant readiness to sail, but none knew whither. Its destination
was suspected, however, by some; and the Pope, who entertained
no doubt concerning it, demanded to know Pedro's intentions, whilst
Philip III. of France, at the request of his uncle, Charles of Anjou,
sent ambassadors to the Arragonese monarch to make a similar
inquiry. The answer given is variously stated by the archives and
chronicles of the time, as evasive, prevaricatory, and even as a direct
falsehood. It left no doubt upon Charles's mind that mischief was
meant him by the Spaniard. "I told you," he wrote to Philip, "that the
Arragonese was a contemptible wretch." Unfortunately, he carried
his contempt of his wily foe rather too far; he would not believe that
so small a potentate, "un si petit prince," would dare attack him in
Italy, but took for a strategem the avowal of his intentions that
appears to have escaped Pedro, and thought his views were directed
in reality to Provence, whither he accordingly despatched his eldest
son. Meanwhile, Don Pedro lingered in port, in hopes of an
insurrection in Sicily, which John of Procida and others of his Sicilian
adherents were fomenting by every means in their power, until his
position became positively untenable, so pressed was he with
questions by different European powers, and even by his own great
vassals. One of these, a rico hombre, by name the Count of Pallars,
having publicly asked him, in the name of the Arragonese nobility,
the object of his voyage, and whither it would lead, Don Pedro
replied: "Count, learn that if my left hand knew what my right was
about to do, I would instantly cut it off." And still he clung to the
Catalan coast, always on the eve of departure, but never lifting an
anchor, until the tidings, so long and ardently desired, at last
reached his car. They were unaccompanied, however, by the popular
summons and proffered sceptre he had sanguinely and confidently
anticipated. But we are outstripping events, and must revert to the
eloquent opening of M. de St Priest's fourth volume.
"The name of Sicily is illustrious in history. If the reputation of a
people had for sole foundation and measure the number of
inhabitants, the extent of its territory, the duration of its influence,
the Sicilians, impoverished by continual revolutions, decimated by
sucessive tyrannies, more isolated from the general progress by their
internal organisation, than from the mainland by their geographical
position, would hold, perhaps, in the annals of the world, no more
room than their island occupies on the map of Europe. But they
need not fear oblivion: they have known glory,—and what glory
touches, though but transitorily, for ever retains the mark. For
individuals as for nations, it suffices that their lot be cast in those
rare and splendid epochs whose contact ennobles every thing, which
illuminate all things by their brilliancy, and stamp themselves
indelibly upon the memory of the remotest generations. Happy who
then lives, for he shall never die! Vast kingdoms, boundless regions,
peopled by numerous races, powerful by material force, but
intellectually vulgar, then yield in dignity and grandeur to the least
nook of land, to some petty peninsula or remote island. Such was
Greece, such also was Sicily, her rival, her competitor, and the
asylum of her illustrious exiles.
"In the middle ages there was no vestige of the ancient Trinacria—of
that land of art and learning, the home of every branch of human
knowledge—of that politic and warlike power which yielded to Rome
and Carthage only when she had made them dearly pay a long-
disputed victory—of that Sicily, in short, which Plato taught and
Timoleon governed—which Archimedes defended and Theocritus
sang. Formerly the whole island was covered with cities. In the
thirteenth century, most of these had disappeared. Agrigentum could
boast but the ruins of its colossus and temples. Syracuse still
retained some shadow of past greatness: she was not yet reduced,
as now, to the quarries whence she sprung; she had not yet become
less than a ruin; but her splendour was extinct. Catania, overthrown
by earthquakes, found it difficult again to rise. Nevertheless other
Sicilian towns preserved their importance, and Christendom could
not boast cities handsomer and more populous—more abounding in
wealth and embellished by monuments—than commercial Messina
and kingly Palermo."
These two cities were at the time referred to the abode of luxury
and pleasure. Messina, at once the market and the arsenal of the
island, "portus et porta Siciliæ," as Charles of Anjou called it, was
the principal posting-house upon the road from Europe to Asia, and
was enriched by the constant passage of pilgrims and crusaders.
Sumptuary laws were deemed necessary to repress the
extravagance of a population whose women wore raiment of silk,
then more precious than silver and gold, with tiaras upon their
heads, encrusted with pearls and diamonds and other precious
stones. Asia and Europe were there united; Catholics and
Mussulmans lived side by side in peace and amity. In the streets, the
Arab's burnous and the turban of the Moor moved side by side with
priestly robe and cowl of monk. The pleasures there in vogue were
no longer the simple and innocent ones vaunted by Virgil and
Theocritus. It was a hotbed of debauchery, frequented by pirates,
gamblers, and courtesans—a mart of commerce, whither traders of
all nations repaired. Palermo, on the other hand, was the residence
of kings. The Normans established there the seat of their power,
inhabiting it constantly; and although the wandering life of Frederick
of Swabia denied him a fixed abode, he loved Palermo the Happy,
and dwelt there whenever able. Very different were the predilections
of Charles of Anjou. He disliked Sicily as much as he loved Naples.
By an effect, perhaps, of that love of contrast often found implanted
in the human breast, his stern and sombre gaze took pleasure in the
bright and joyous scenery of his continental dominions, which it
could not derive from the more sad and serious beauties of the
opposite island. Moreover, he held the Sicilians disaffected to his
rule, and his hand was heavy upon them. Heavier still, doubtless,
were those of his delegates and officers, who presumed upon his
known dislike, and upon his preoccupation with schemes of foreign
aggrandisement, to exceed the measure of oppression he prescribed
and authorised. A very different course should have been adopted
with a nation already abundantly prepared to detest their French
masters. The antagonism of character was alone sufficient cause for
mutual aversion. There was no point of sympathy between
conquerors and conquered—nothing that could lead to friendly
amalgamation. On the one hand, reserve, dissimulation, silence; on
the other, an indiscreet frankness, vivacity, and noise. On both sides,
a strong attachment to their native country, and conviction of its
superiority over all others—a strong partiality for its language,
usages, and customs—a sincere contempt for all differing from
them. M. de St Priest, who strives earnestly, but not very
successfully, to vindicate the memory of his countrymen of the
thirteenth century, is still too veracious a historian not to admit that
they treated with shameful insolence and rudeness a people whom
the kindest treatment would with difficulty have induced to look
kindly upon their conquerors. He is painfully anxious to make out a
good case for those he calls his "brothers," (very old brothers by this
time,) but succeeds so little to his satisfaction, that he is fain to
throw himself on the mercy of his readers, by asking the rather
illogical question, whether the crime of a few individuals is to be
imputed to a nation, or even to a part of a nation? Then he
enumerates some of the grievances which brought on the massacre
known as the Vespers. "It is certain," he says, "that Charles of
Anjou, not by himself, but by military chiefs, to whom he abandoned
himself without reserve, abused of the means necessary to retain in
subjection a people hostile to his cause, and whom that very excess
of oppression might drive to shake off an iron yoke. He abused of
the feudal prerogative which gave him right of controlling the
marriages of the vassals of the crown, by compelling rich heiresses
to marry his Provençal adherents, or by retaining in forced celibacy
noble damsels whose inheritance the royal exchequer coveted." This
is pretty well for a beginning, and enough to stir the bile of a more
patient race than the Sicilians, even in an age when such acts of
feudal tyranny were less startling and odious than they now would
seem. But this is merely the first item. Charles also abused of an old
law that existed both in Sicily and Spain, and which has been but
recently abolished in the latter country. The law of the mesta gave
the sheep of the royal domain right of range of all the pastures in
the country, no matter who the proprietors. With this vexatious
privilege Charles combined exorbitant monopolies. He compelled the
rich landholders to take on lease his horses, flocks, cattle, bees, and
fruit-trees, and to account to him for them every year at a fixed rate,
even when disease decimated the animals, and the sirocco had
withered and uprooted the trees and plants. And nothing was less
rare, M. de St Priest acknowledges, than the personal ill-treatment of
those who delayed to pay the impost, often twice levied upon the
same persons, under pretence of chastising their unwillingness.
Imprisonment, confiscation, and the bastinado, punished their
indigence. The nefarious tricks played with the currency completed
the measure of misery poured out upon the unhappy Sicilians. Like
Alphonso X. of Castile, and most of the potentates of the period,
Charles coined pieces of money with much alloy, which he named,
after himself, Carlini d'oro, and exchanged them by force against the
augustales, an imperial coinage of the purest gold. The public voice
was loud against such tyranny and abuse, but it reached not the
arrogant ears of the Beaumonts, the Morhiers, and other haughty
Frenchmen who successively governed Sicily. The Bishop of Patti and
brother John of Messina, complained to the Pope in presence of
Charles himself. The king heard them in silence, but, after the
pontifical audience, he had his accusers seized. Brother John was
thrown into a dungeon, and the bishop only escaped prison by flight.
Besides the heavy griefs above stated, other grounds of complaint,
more or less valid, were alleged against Charles I. Amongst these,
he was accused of persecuting highwaymen and banditti with
overmuch rigour. The nations of southern Europe have ever had a
sneaking tenderness for the knights of the road. He was also
reproached with the abolition of certain dues, unjustly exacted in the
ports of Patti, Cefalu, and Catania, by the bishops of those towns. M.
de St Priest brands the Sicilians as barbarians for thus quarrelling
with their own advantage. But it is a fair query how far Charles
made the diminution of episcopal exactions a pretext for the
increase of royal ones, and whether the draconic system adopted for
the repression of evil-doers, may not have been occasionally availed
of for the oppression of the innocent. Then the Sicilian nobles, lovers
of pomp, show, and external distinctions, grumbled at the absence
of a court; and this was in fact so weighty a grievance, that its
removal might perhaps have saved Sicily for Charles, or at any rate
have retarded the revolt, and given him time to prosecute his
designs on the East. Palermo might have been conciliated by
sending the Prince of Salerno to live there. A gay court, and the
substitution of the heir to the throne for obscure and detested
governors, would have made all the difference. Charles did not think
of this, and moreover he had no great affection for his eldest son, "a
prince of monkish piety, timid and feeble, although brave; a dull and
pale copy of his uncle Louis IX., and whose faults and virtues were
not altogether of a nature to obtain his father's sympathy. When
speaking of the Prince of Salerno, the King of Naples sometimes
called him 'That Priest!'" The strongest motive of discontent,
however, the most real, and which placed the nobility and higher
classes amongst the foremost of the disaffected, was the bestowal
of all public offices upon foreigners. At the beginning of his reign
Charles had left to Neapolitans and Sicilians all fiscal and judicial
posts, lucrative to the holders and productive to him; the strangers
who accompanied him, ignorant of the country, would not have
known how to squeeze it properly, as did Gezzolino della Marra,
Alaimo de Lentini, Francesco Loffredo, and other natives. In these he
reposed confidence, and, even after the defeat of Conradin, he still
left Sicilians in the places of Maestri razionali, Segreti, Guidizieri, &c.
But about 1278, we find Italian names disappearing from the list,
and replaced almost entirely by those of Provençals and Frenchmen.
At that date there seems to have been a clean sweep made of the
aborigines. Such a measure was sure to cause prodigious
dissatisfaction and hatred to the government. Those who depended
on their places were reduced to beggary, and those who had private
fortunes regretted a state of things which swelled these, besides
giving them influence and power.
To the latter class belonged Alaimo de Lentini, one of the richest and
best born of the Sicilian barons, possessed of great political and
military talents. He had served Mainfroy, had quarrelled with and
been proscribed by him, and then, espousing the interests of
Charles, had shown himself an implacable persecutor of his
countrymen. His good qualities were frequently clouded and
neutralised by his versatility and evil passions; his life was a mingled
yarn of noble actions and frequent treachery. Left to himself, he
might have bequeathed a higher reputation to his descendants, but
he was led astray by the evil influence of his wife. He was already in
the decline of life when he married this woman, who was of plebeian
birth and Jewish origin, but the widow of Count Amico, one of the
principal nobles of Sicily. Her name was Maccalda Scaletta, and soon
she obtained complete empire over Alaimo. Of dissolute morals,
ironical wit, and of an insolent and audacious character, that feared
nothing and braved every thing, Maccalda's youth had been more
adventurous than reputable, and amongst other pranks she had
rambled over all Sicily in the disguise of a Franciscan monk. Her love
of pleasure was not more insatiable than her vanity, and she eagerly
desired to figure in the first rank at a court. So long as Alaimo
retained the high office of chief magistrate of Sicily, her gratified
pride allowed him to remain a faithful subject: but towards the year
1275, Charles of Anjou suspected and dismissed him, and
thenceforward Alaimo, instigated by his wife, was the mortal enemy
of the French. He joined the intrigue set on foot by John of Procida
in favour of the King of Arragon, and laboured efficiently in the
cause of his new patron.
M. de St Priest does not himself narrate the oft-told tale of the
Sicilian Vespers, but gives the accounts of Saba Malaspina and
Bartolomeo de Neocastro, asserting that of the former writer to be
the most correct, as it is certainly the most favourable to the French.
He then enters into a long argument on points of no great
importance; his logic being principally directed to show that if the
French fell an easy prey to the infuriated Sicilians, it was through no
lack of courage on their part, but because they were unarmed,
surprised, and overmatched. He also takes some useless trouble to
upset the story generally accredited of the immediate cause of the
massacre, namely, an insult offered to a bride of high birth. The
spirit of exaggerated nationality, apparent in this part of his book,
stimulates his ingenuity to some curious hypotheses. It is a French
failing, from which the best and wisest of that nation are rarely quite
exempt, never to admit a defeat with temper and dignity. There
must always have been treachery, or vastly superior numbers, or
some other circumstance destructive to fair play. Not a Frenchman
from Strasburg to Port Vendres, but holds, as an article of faith, that,
on equal terms, the "grande nation" is unconquered and invincible.
M. de St Priest seems to partake something of this spirit, so
prevalent amongst his countrymen, and actually gets bitter and
sarcastic about such a very antiquated business as the Sicilian
Vespers. "Who does not recognise in this story (that of the insulted
lady) an evident desire to exalt the deed of the Sicilians of the
thirteenth century by assimilating it to analogous traits, borrowed
from Roman history? Who does not here distinguish a Lucretia, or,
better still, a Virginia; a Tarquin, or an Appius? The intention is
conspicuous in the popular manifestos that succeeded the event. In
these, reminiscences of antiquity abound. The heroes of the Vespers
sought to make themselves Romans as quickly as possible, lest they
should be taken for Africans." And so on in the same strain. "It is
clearly seen," says the French historian in another place, "that the
first outrage upon that day was perpetrated by the Sicilians, and not
by the French; we behold brave and unsuspicious soldiers, inspired
by good-humoured gaiety and deceitful security, barbarously
stricken, in consequence of demonstrations, very indiscreet certainly,
but whose inoffensive character is deposed to by a contemporary,
hostile to the French and to their chief." The facts of the case are
told in ten words. By a long course of injustice and oppression the
French had dug and charged, beneath their own feet, a mine which
a spark was sufficient to ignite. It is immaterial what hand applied
that spark. Enough that the subsequent explosion involved the
aggressors in universal destruction, and freed Sicily from its tyrants.
The statement of Saba Malaspina is not, however, altogether so
exculpatory of the French, on the unimportant point of ultimate
provocation, as might be inferred from some of M. de St Priest's
expressions. "When the Signor Aubert (Herbert) d'Orleans governed
Sicily," says the chronicler, "several citizens of Palermo, of both
sexes, went out of the town to celebrate the festival of Easter. Some
young strangers joined them, and perhaps amongst those were
many who carried weapons, concealing them on account of the edict
forbidding them to be borne under very severe penalties. Suddenly
some French varlets, probably servants of the justiciary of the
province, associated themselves with the public rejoicings, less,
however, to share than to trouble them. Would to heaven they had
never been born, or had never entered the kingdom! At sight of all
this crowd which danced and sang, they joined the dancers, took the
women by the hands and arms, (more, perhaps, than was decent
and proper,) ogling the handsomest, and provoking, by significant
words, those whose hands or feet they could not press. At these
excessive familiarities, which may be said, however, to have been
inspired only by gaiety, several young men of Palermo, and certain
exiles from Gaéta, lost their senses so far as to assail the foreigners
with injurious words, such as the French do not easily suffer. Then
said the latter amongst themselves, 'It is impossible but that these
pitiful Patarins[6] have arms about them, otherwise they would never
venture such insolent language; let us see if some of them have not
concealed swords, or, at any rate, poignards or knives.' And they
began to search the Palermitans. Then these, very furious, threw
themselves upon the French with stones and weapons, for a great
number came up who were armed. The varlets fell for the most part
stoned and stabbed to death. Thus does play engender war. The
entire island revolted, and every where was heard the cry, 'Death to
the French!'" The details of the ensuing massacre are as horrible as
they are well known; and M. de St Priest passes lightly over them.
Men, women, and children, soldiers and priests, all fell before the
vengeful steel of the insurgents. The little fortress of Sperlinga alone
afforded shelter to the fugitive Frenchmen, giving rise to the proverb
still current in Sicily, "Sperlinga negó."[7] Messina, however, at first
took no part in the movement, and continued tranquil in the
possession of a French garrison. This was cause for great alarm to
the Palermitans, already somewhat embarrassed with their rapid
victory and sudden emancipation. Messina hostile, or even neuter,
nothing was done, and Sicily must again fall into the vindictive hands
of Charles of Anjou. As usual, in Sicilian revolutions, Palermo had
given the impulse, but a satisfactory result depended on the
adhesion of Messina. Flattering overtures were made by the
insurgents to the Messinese; but the latter still hesitated, and, far
from joining the massacre, sent six galleys to blockade Palermo, and
armed two hundred cross-bowmen to reduce the fortress of
Taormine. The effort was in vain. Instead of attacking Taormine, the
bowmen re-entered Messina, and pulled down the fleurs-de-lis,
whilst the inhabitants of Palermo, upon the appearance of the
galleys, hoisted the Messinese cross beside their own flag, and
fraternised with the fleet that came to block their port. This
completed the revolution, and Messina also had its massacre. The
viceroy, Herbert of Orleans, finding it impossible to hold out longer in
his fortress of Mattagriffone, capitulated, and embarked for Calabria
with five hundred Frenchmen, amidst the menacing demonstrations
of a furious mob. Sicily was declared a republic, and a deputation
was sent to the Pope, to place it under his protection. An attempt
made by the Arragonese party to obtain the preference for Don
Pedro was premature, and consequently failed.
Charles of Anjou was with the Pope at Montefiascone, when news
reached him of the revolt and massacre at Palermo. His first emotion
was a sort of religious terror, which expressed itself in the following
singular prayer, recorded by Villani and all the historians:—"Lord!" he
said, "you who have raised me so high, if it be your will to cast me
down, grant at least that my fall be gradual, and that I may descend
step by step." Although he as yet knew nothing but the insurrection
of a single town, he seems to have beheld the shadow cast before
by the evil day at hand. He left Montefiascone, having obtained from
Martin IV., whose indignation equalled his own, a bull of conditional
interdiction against the Sicilians, should they not return to their
allegiance. The Pope also sent Cardinal Gerard of Parma to Sicily, to
bring about the submission of the rebels. But at Naples Charles
learned the insurrection of Messina, and his fury knew no bounds.
Neocastro and other chroniclers represent him as roaring like a lion;
his eyes full of blood, and his mouth of foam, whilst he furiously bit
the baton he bore in his hand—a favourite practice of his when
angry and excited. After writing to his nephew, Philip of France, for a
subsidy and five hundred men, he set sail himself with his queen,
Margaret of Burgundy, at the head of the formidable armament
fitted out for the conquest of the East. There were two hundred
vessels bearing an army composed of French and Provençals, of
Lombards and Tuscans, including fifty young knights of the noblest
families in Florence, and (a strange spectacle in the host of
Mainfroy's conqueror) a thousand Lucera Saracens. The total was
fifteen thousand cavalry and sixty thousand infantry, and the
rendezvous was at Catona, a Calabrian town opposite Messina,
where, by the king's orders, forty galleys already awaited him.
Undaunted by the formidable array, the Messinese prepared a
vigorous defence, repairing their walls, barricading their port with
beams, and even assuming the offensive with their galleys, which
chased some of the King's into the port of Scylla. Yet a bold and
sudden assault would probably have taken the town, and the
reduction of all Sicily must necessarily have followed. This course
was urged by Charles's principal officers; but he preferred the advice
of the Count of Acerra, who, from cowardly or perfidious motives,
urged him to wait the result of the legate's negotiations with the
rebels. This was a fatal error. Delay was destruction. At the very
moment it would well have availed him, Charles abdicated his usual
fiery impetuosity in favour of temporising measures. Encamping four
leagues to the south of Messina, he lost precious time in idle
skirmishes. Whilst he burned their woods and vines, the Messinese
raised fortifications, and named Alaimo de Lentini captain of the
people, the chief office in the new republic. Whilst Alaimo took
charge of the defence of Messina, his wife Maccalda, with helm on
head and cuirass upon breast, armed and valiant like another Pallas,
marshalled the garrison of Catania.
Hostilities were about to commence when Cardinal Gerard of Parma
reached Messina. Alaimo received him with the greatest respect, and
offered him the keys of the town in token of liege homage to the
holy see. The Cardinal replied by a vague offer of pardon if they
submitted to the King. "At the word submission, Alaimo snatched the
keys from the legate's hand, and exclaimed in a voice of thunder,
'Sooner death than a return to the odious French yoke!' After this
theatrical burst, probably a piece of mere acting on the part of a
man who had served under so many banners, serious negotiations
began." It was impossible to agree. The exasperation of the
Messinese reached a height that terrified the legate, who made his
escape, after placing the city under interdict. The proposals he took
to Charles were "the immediate raising of the siege, and return of
the army to the Continent; taxes as in the time of William the Good;
and, finally, a formal engagement that the island should no longer
be garrisoned by French or Provençals, but by Italians or Latins. "If
these conditions are refused," said the bold Messinese, "we will
resist till death, though we should eat our children!" The Cardinal
admonished Charles of the prudence of accepting these terms,
hinting that it might be less necessary to observe them, when the
island was again in his hands. Charles was too angry and too
honourable to listen to the jesuitical insinuation, and war was the
word. The legate returned to Rome, in despair at the hot-headed
monarch's intractability. Charles's knights and officers were
clamorous for an instant assault; but he preferred a blockade, not
wishing, he said, to punish the innocent with the guilty. M. de St
Priest discredits the motive, and attributes such unusual forbearance
on the part of the Lion of Anjou to the fear of losing, by the
indiscriminate pillage that would follow a successful assault, the
great riches Messina was known to contain.
The foe's decision published, Messina threw away the scabbard. A
life of freedom, or a glorious death, was the unanimous resolve of its
heroic inhabitants. Every man became a warrior; the very women
gave example of the purest patriotism and sublimest devotedness.
"Matrons who, the preceding day, clothed themselves in gold and
purple, young girls, brought up in the lap of luxury and ease—all,
without distinction of rank or riches, with bare feet and dresses
tucked up to the knee, bore upon their shoulders stones and
fascines, and heavy baskets of bread and wine. They helped the
labourers, supplied them with food, attended to all that could
increase their physical and moral strength. From the summit of the
ramparts they hurled missiles on the besiegers. They held out their
children to their husbands, bidding them fight bravely, and save their
sons from slavery and death. Oh! it was a pity, says a song still
popular in Sicily, great pity was it to see the ladies of Messina
carrying chalk and stones."
"Deh com' egli é gran pictate
Delle donne di Messina,
Veggiendo iscapighate,
Portando pietre e calcina."
Not long ago a wall was still shown, built by these heroines. The
names of two of them, Dina and Clarentia, have been handed down
to posterity. Whilst Dina upset whole squadrons by hurling stones
from warlike engines, Clarentia, erect upon the ramparts, sounded
the charge with a brazen trumpet. Such incidents gave a fine field to
the superstitious and imaginative; and persons were not wanting
who affirmed they had seen the Virgin Mary hover in white robes
above the city, whilst others maintained she had appeared to Charles
of Anjou's Saracens.
The great assault was on the 14th September 1282. "You have no
need to fight with these boors and burgesses," said Charles to his
knights; "you have merely to slaughter them." He undervalued his
foe. In vain did his chivalry advance against the town like a moving
wall of steel; in vain did his fleet assail the port. Beams and chains,
hidden under water, checked and destroyed his shipping; men and
horses fell beneath the missiles of the besieged. One of these would
have killed Charles, had not two devoted knights saved him. They
covered the King with their bodies, and fell crushed and lifeless at
his feet. On the side of the Sicilians, Alaimo displayed great military
talents and personal courage. He was every where to be seen,
animating his men by his example. When the French were finally
repulsed with terrible loss, and compelled to raise the siege, Charles
tried to corrupt Alaimo by immense offers, and went so far as to
send him his signature upon a blank paper. The Sicilian resisted the
temptation—rejecting treasures and dignities, to yield, at a later
period, to the influence of a treacherous woman.
Meanwhile the deputation charged to offer Sicily to the Pope,
returned with a refusal. Martin IV. would have nothing to say to
them. He would have better served Charles by acceptance.
Subsequently he might have restored the island to the King. As it
was, he drove the Sicilians into the snares of the aristocratic league
that supported Pedro of Arragon. The republican government was
unequal to the task it had undertaken, and the Pope's rejection of
the protectorate threw them into great perplexity. A meeting was
held to debate the course to be adopted; and the Spanish party,
schooled by former failure, achieved a decisive triumph. Its leaders
remained mute; but an old man, of such obscure condition that his
name was not exactly known, harangued the assemblage, recalled
the memory of the house of Swabia, reminded his countrymen that
Constance was the legitimate heiress to the crown, and proposed to
offer it to her husband, the King of Arragon, then at the port of
Collo, on the coast of Africa, near Constantina. The words were
scarcely spoken, when a thousand voices extolled the wisdom of the
speaker, and ambassadors were immediately named from the people
of Palermo to the King of Arragon. Don Pedro had lingered at
Portofangos, in expectation of such a summons, for more than a
month after the insurrection at Palermo; but finding the secret
negotiations of John of Procida with the chiefs of the Sicilian
aristocracy less immediately successful than he had hoped, he had
sailed for the coast of Africa, on pretext of interfering in a quarrel
between the King of Constantina and two of his brothers, but in
reality to be nearer the stage on which he hoped soon to play an
important part. He affected surprise at the arrival of the Sicilian
envoys, who threw themselves at his feet, bathed in tears and
dressed in deep mourning, and in a studied harangue implored him
to reign over Sicily, and relieve them from the intolerable yoke of the
Count of Provence. They said nothing of Conradin's glove,—the
anecdote, M. de St Priest says, not having been yet invented.
Don Pedro delayed reply till he should have consulted his principal
vassals. Most of them urged him not to engage in a hazardous
enterprise, that would draw upon him the displeasure of the King of
France; "but to be content with what he already possessed, without
seeking to acquire what would assuredly be valiantly defended. Don
Pedro heard their objections in silence, and broke up the council,
merely announcing that the fleet would sail next day, without saying
whether for Catalonia or Sicily. According to one account, scarcely
credible, and bearing strong resemblance to a popular report, he
declared the wind should decide his destination. The wind blew for
Sicily, much to the discontent of some of the barons, and to the
secret and profound joy of the King. After a prosperous voyage of
only three days' duration, Don Pedro landed at the port of Trapani.
The inhabitants received him as a liberator, and he proceeded to
Palermo, where his stay was one unbroken triumph." He did not
remain there long. He was as active and indefatigable as Charles of
Anjou; like him sleeping little, and rising before the sun. He resolved
to march to the succour of Messina, and to intercept the French
army's communications with Calabria. He sent forward two noble
Catalan knights to warn the King of Naples off the island, with the
alternative of war should he refuse. A judge from Barcelona
accompanied them,—it being the custom of the time to compose
such embassies partly of military men, and partly of persons learned
in the law. The envoys were courteously received in the French
camp, but their lodging did not correspond with their reception.
Either through contempt or through negligence, they were quartered
in a church, without bed or chair, and had to sleep upon straw. At
night they received two jugs of black wine, six loaves equally dark
coloured, two roasted pigs, and an enormous quantity of bacon-
soup. Coarse fare and hard couch did not, however, prevent their
sleeping soundly, and repairing next morning to the royal presence,
richly attired in fine cloth lined with vair. Charles, who was unwell,
received them reclining under curtains of magnificent brocade, and
with a little stick between his teeth, according to his habit. He
listened patiently whilst the chief of the embassy summoned him to
evacuate the island, and replied, after a few minutes' reflection, that
Sicily belonged neither to him nor to the King of Arragon, but to the
holy see. "Go then," he said, "to Messina, and bid the people of that
city declare an eight days' truce, for the discussion of necessary
things." This the ambassadors agreed to do, but got a rude
reception from Alaimo, who would not credit their quality of
Arragonese envoys, when he heard them advocate a truce. Don
Pedro was no longer at liberty to treat with Charles, even had he
wished it: the Sicilians, at least that party of them that had invoked
his aid, had done so for their own ends, and would permit no
transaction. The ambassadors returned to Charles and announced
their ill success, and the King bade them repose till next morning,
when he would speak further with them. But the next morning they
learned that he and the Queen had left the camp during the night,
and had embarked for Calabria. Many historians have severely
blamed this retreat; M. de St Priest vindicates its wisdom and
propriety. Defection was increasing in Charles's army, weary of a
fruitless siege that had lasted seventy-four days, and he was in
danger of being cut of from Calabria; for although he still had his
fleet, it consisted of heavy, unwieldy transports, and was very
unmanageable. Soon after his departure from Sicily it was destroyed
and captured by the Arragonese fleet. He began also to form a
juster estimate of his formidable adversary, whose politic and
generous conduct contrasted with his own severity, often pushed to
barbarity. He resolved to try a system of conciliation with the
Sicilians; and, being too proud and stiff-necked to adopt it in person,
he sent his son Charles, Prince of Salerno, to carry it out. "It was
necessary to find a pretext in order honourably to absent himself.
The customs of the time furnished him with one. He did not show
himself their slave, as has often been said, but made them serve his
purpose, and skilfully used them to mask the difficulties of his
position. It was not, then, from a Quixotic and foolish impulse,
unbecoming at his age, but with a political object,—in order to
escape from the scene of his disappointments and defeats, and to
draw his enemy from that of his victories and triumphs,—that he
took the resolution to challenge Pedro of Arragon to single combat."
A friar bore the cartel; Pedro accepted it; and this strange duel
between two powerful kings was fixed to take place in a plain near
Bordeaux, an English town, as the chroniclers call it, Bordeaux then
belonging to Edward I. of England. Pending the preliminary
negotiations and arrangements for this combat, hostilities continued,
and the results were all in favour of Don Pedro. His natural son, Don
Jaime Pâris, or Peres, admiral of the Catalan fleet, made a night
excursion from Messina to Catona, upon the opposite coast,
surprising and massacring five hundred French soldiers. Carried
away by youthful ardour, he then pushed on to Reggio; but fell into
an ambush, and lost a dozen men. Although the final result of the
enterprise was highly satisfactory, Pâris returning victor with a rich
booty, his father, indignant that his orders had been overstepped,
spared his life only at the entreaties of his courtiers, degraded and
banished him, and gave the command of the fleet to Ruggiero de
Lauria. This was a lucky hit. Lauria, although violent and perfidious
by character, was of courage as great as his good fortune was
invariable. Once at the head of the Arragonese fleet, the success of
Don Pedro ceased to be doubtful.
The conditions of the projected duel being arranged and agreed to
by both parties, Charles left Reggio, the Prince of Salerno remaining
there at the head of an army brought in great part from France. The
war was now transported in great measure into Calabria. There
every thing was favourable to the Arragonese. His soldiers found
themselves in a climate, and amongst mountains, reminding them of
their native country. The Almogavares, hardy and reckless guerillas,
lightly equipped, and with sandalled feet, were more than a match
for the French knights and men-at-arms, with their heavy horses and
armour. "One day, whilst the Prince of Salerno was at Reggio, an
Almogavare came alone to his camp to defy the French. At first they
despised the challenge of the ill-clad savage, but finally a handsome
young knight left the ranks, and accepted the defiance. He was
conquered by his opponent, who, after bringing him to the ground,
buried his knife in his throat. The Prince of Salerno, true to the laws
of chivalry, dismissed the conqueror with rich guerdon. The King of
Arragon would not be surpassed in courtesy, but sent in exchange
ten Frenchmen, free and without ransom, declaring that he would
always be happy to give the same number for one Arragonese." This
piece of Spanish rodomontade was backed, however, by deeds which
proved Pedro no impotent boaster; and the Prince of Salerno was
compelled to retire from Reggio—whose inhabitants, favourable to
his rival, hypocritically affected grief at his departure—to an adjacent
level, known as the pianura di San Martino.
Charles of Anjou was now at Rome, whose Pope he found friendly
and supple as ever. A crusade was promulgated, the usurper of Sicily
was excommunicated, and his Arragonese crown was declared forfeit
and given to Charles de Valois, second son of Philip the Bold, whom
the Italians called Carlo Senza Terra, because he tried many crowns
but could never keep one. To cloak his manifest partiality, Martin IV.
strove to make Charles give up the duel, and, failing to do so,
declared himself openly against a project which he treated as mad
and impious. He declared null and void the agreement and
conditions fixed between the champions, and exhorted the King of
England to forbid the encounter of the two sovereigns upon his
territory. Edward I. was not the man to spoil sport of this kind; he
neither made nor meddled in the matter. On the appointed day,
(25th May 1283,) Charles, coming from Paris, where his intended
duel had excited the enthusiasm of the French youth, entered
Bordeaux, armed cap-à-pie, at the head of a hundred knights,
established himself with them in the lists, and waited from sunrise
till sundown. Then, the King of Arragon not appearing, he sent for
Jean de Grailly, seneschal of Guienne, had a certificate of his
presence at Bordeaux drawn up in due form, and set out for his
county of Provence. Various causes have been assigned for Pedro's
non-appearance. It is certain that he left Sicily, after having
summoned thither his queen and all his children, excepting the
eldest, Alphonso, who remained in Arragon. The only distinct cause
assigned by M. de St Priest, for his defalcation in the lists, is the
Arragonese version. "Don Pedro had gone from Valentia to Collioure,
and already the hundred chevaliers he had chosen to accompany
him were assembled at Jaca, on the frontier, ready to enter Guienne,
when he was suddenly informed that, at the request of Charles of
Anjou, Philip of France had accompanied his uncle to Bordeaux, and
lay near that town with twenty thousand men. Warned by the King
of England that the King of France was in ambush for him, Pedro
decided not to show himself publicly at Bordeaux; but being at the
same time fully resolved to acquit his promise by going thither, he
disguised himself as a poor traveller, and took with him two
gentlemen dressed with less simplicity, all three mounted on good
horses, and without other baggage than a large bag full of
provisions, that they might not be obliged to stop any where. The
King acted as servant to his companions, waiting on them at table,
and giving the horses their corn. In this manner they arrived very
quickly at Bordeaux, where Don Pedro was received and concealed
by an old knight, a friend of one of the two gentlemen. Upon the
morrow, which was the day appointed for the duel, Pedro repaired to
the lists, with the seneschal, who was devoted to him, before the
sun rose, consequently earlier than Charles of Anjou. There he
caused his presence to be certified by a notarial act, then fled
precipitately, and put an interval of several hours between his
departure and the pursuit of the Kings of France and Sicily." This is
rather an improbable story, as M. de St Priest justly remarks; and,
even if true, it is a sort of evasion that does little credit to the King
of Arragon's chivalry. It appears likely that Pedro, standing upon his
well-established reputation of personal bravery, thought himself
justified for once in consulting prudence, and felt little disposed to
stake his life and crown upon the goodness of his lance and charger.
Abandoning to his rival the honours of the tourney, he gained, with
his fleet and army, more solid advantages. Soon after Charles's
return to Provence, twenty-nine galleys despatched by him from
Marseilles to the succour of Malta were attacked and destroyed by
Ruggiero de Lauria, in spite of the valiant efforts of the Provençal
admiral, William Cornut.
"In the heat of a terrible and prolonged combat, and seeing himself
about to be vanquished, Cornut jumped upon Lauria's galley and
attacked the admiral, axe in one hand and lance in the other. The
lance point pierced Ruggiero's foot, and, nailing him to the deck,
broke off from the pole; the Provençal raised his axe, when the
Sicilian, active and furious as a tiger, snatched the iron from his
bleeding wound, and, using it as a dagger, stabbed his enemy to the
heart." The sea was the real field of battle, and, unfortunately for
Charles of Anjou, the French lacked the naval skill and experience of
the Catalans. Pedro was detained in Arragon by some turbulent
proceedings of his nobility, but he was ably replaced by his wife.
Queen Constance was no ordinary woman. Adored by the Sicilians,
who persisted in regarding her as the rightful descendant of their
kings, her influence exceeded that of Pedro himself. Surrounded by
her children, and followed by her Almogavares, she traversed the
island in all directions, going from Palermo to Messina, from Messina
to Catania, encouraging the people by kind and valiant words, giving
bread to the necessitous, and followed by the blessings and
admiration of her new subjects. By the advice of John of Procida,
she resolved to anticipate the Prince of Salerno, who only awaited
his father's arrival to make a descent upon Sicily. "She sent for
Ruggiero de Lauria, who was the son of Madonna Bella, her nurse,
and spoke to him thus: 'Friend Ruggiero, you know that you have
been brought up, from your earliest infancy, in my father's house
and in mine; my lord the King of Arragon has loaded you with
favours, making you first a good knight and then an admiral, such
confidence has he in your valour and fidelity. Now, do better still
than heretofore; I recommend to you myself, my children, and all my
family.' When the Queen had spoken, the admiral put knee on
ground, took the hands of his good mistress in his in sign of
homage, kissed them devoutly, and replied: 'Madonna, have no fear;
the banner of Arragon has never receded, and still shall conquer.
God gives me confidence that I shall again work to your satisfaction,
and that of my lord the King.' Then the Queen made the sign of the
cross over the admiral, who quitted her to put himself at the head of
thirty galleys, and of a host of light vessels armed at Messina. With
these he entered the gulf of Salerno." The son of Charles of Anjou
had no suspicion of the sortie of the Arragonese fleet, and an officer
whom he sent to reconnoitre brought back a false account of the
enemy's strength, diminishing the number of their vessels.
Thereupon the Prince of Salerno resolved to give battle, being urged
to do so by the Count of Acerra, the same who had formerly advised
Charles to postpone the assault of Messina. The count's advice,
whether treacherous or sincere, proved fatal in both instances. The
Sicilian fleet, which had advanced to the very Molo of Naples, passed
under the windows of the Castello Nuovo, insulting the Prince of
Salerno by words injurious to his nation, his father, and himself. Too
angry to be prudent, and forgetting Charles's orders on no account
to stir before his arrival, the prince, covered with new and brilliant
armour, bravely embarked, lame though he was, on board the royal
galley, followed by the flower of the French chivalry. Lauria, cunning
as skilful, feigned to fly at his approach. Riso, the Messinese, and
other Sicilian exiles, showed chains to Lauria, calling out, "Brave
admiral, here is what awaits you; turn and look!" Lauria obeyed their
order, turned about, and fell furiously upon the Neapolitan fleet,
which was defeated by the very first shock. The Prince of Salerno
and the French knights defended themselves with the courage of
despair. The royal galley alone held out, until at last the Prince,
seeing it about to sink with the weight of combatants, and having
bravely fought and dearly sold his liberty, gave up his sword to
Ruggiero, who offered him his hand to conduct him on board the
admiral's galley. "Sir Prince," said the Arragonese, "if you do not
covet the fate of Conradin, order your captive, the Infanta Beatrix,
sister of our Queen, and daughter of King Mainfroy, to be instantly
delivered up to us." With the fierce Lauria it was unsafe to trifle or
delay. The Prince wrote to his wife, Mary of Hungary, that,
vanquished and a prisoner, his life depended on the release of
Beatrix. On receiving his letter, the Princess of Salerno hurried to the
prison of Mainfroy's daughter, embraced her, clothed her in her
richest apparel, and instantly gave her up to Lauria's envoy.
At the news of the Prince's capture, the Neapolitans were on the
point of revolt. An incident occurred that did not leave him the least
doubt of their sentiments. When seated on the deck of Ruggiero's
galley, in the midst of a circle of knights who kept respectful silence,
he saw approach a number of boats filled with peasants, who asked
permission to come on board. They brought baskets of those large
figs called palombale, and also a present of gold augustales. Taking
the Prince, on account of his magnificent armour, and of the respect
of those around him, they knelt before him and said, "Admiral,
accept this fruit and this gold; the district of Sorrento sends them
you as an offering, and may you take the father as you have taken
the son!" Notwithstanding his misfortunes, the young man could not
help smiling, as he said, "Truly these are very faithful subjects of my
lord the King." He was taken to Sicily and landed at Messina, where
Queen Constance and the Infante Don Jaime then resided.
When Charles of Anjou learned the double disaster that had befallen
him in the capture of his fleet and son, his first expression was one
of bitter irony. "The better," he exclaimed, "that we are quit of that
priest, who spoiled our affairs and took away our courage!" Bitter
grief succeeded this factitious gaiety. He shut himself up in a private
chamber of the Castel Capuano, sent away the attendants and
torches, repulsing even the tender caresses of his queen, and
groaned and lamented in solitude and darkness. When day appeared
he forgot his sorrow to think of vengeance. In his absence, Naples
had nearly escaped him. From Pausilippo to the Molo, shouts for
Pedro of Arragon had been heard. Naples must expiate the crime.
Charles prepared to shed an ocean of blood, but the Pope's legate
interceded; and the enraged sovereign contented himself with
hanging a hundred and fifty of the most guilty from the battlements
of the Castel Nuovo. Then, with his usual impetuous activity, he
armed a fleet, and sailed for Messina, but was met by a message
from Constance, that if he touched the shore of Sicily his son's head
should roll upon the scaffold. What could the murderer of Conradin
reply to this threat? Trembling with fury, he returned to Calabria.
The position of his son justified great anxiety. A large majority of the
Sicilians were clamorous for his death, as an expiatory sacrifice to
the manes of Conradin. Queen Constance, who had nobly resolved
to save him, was compelled so far to yield to public clamour that a
parliment was assembled to deliberate on his fate. With the
exception of Alaimo de Lentini, all the members voted for the
Prince's death. But Constance would not ratify the sentence till she
heard from Don Pedro, to whom she had already despatched
intelligence of the important capture. As she had foreseen, Pedro
ordered the Prince, and the chief amongst his companions, to be
sent immediately to Arragon. This was done, and Sicily seemed
guaranteed for a long time from the aggressions of the house of
Anjou.
To foreign warfare internal strife succeeded. The Sicilian nobles, the
same men who had entreated Pedro of Arragon to reign over them,
now repented of their choice. They had found a master where they
had intended a crowned companion. Already the failure of a
rebellion had cost several of them their heads, when a second plot
was got up, in which Alaimo de Lentini took a prominent part. The
rank, influence, and services of this man, the first in Sicily, rendered
Pedro uneasy, and excited the jealousy of his two ministers, John of
Procida and Ruggiero de Lauria. Alaimo's indulgent vote upon the
trial of the Prince of Salerno, although conformable to the wishes of
the King, yet had increased suspicions he for some time had
entertained. These, however, would not have broken out but for the
imprudent audacity of Maccalda, Alaimo's wife, who had flattered
herself she should be able to govern Pedro of Arragon. During the
siege of Messina, she presented herself before him in her Amazonian
garb, a silver mace in her hand; but this warlike equipment could not
restore her youth, and, notwithstanding the King's passionate
admiration of the fair sex, he passed the night in talking to her of his
ancestors, and finally fell asleep. Irritated by this contempt of her
charms, Maccalda vowed hatred to Queen Constance. Although of
very low origin, the insolent matron pretended herself at least the
equal of the daughter of Mainfroy the bastard. She refused her the
title of queen, and never spoke of her but as the mother of the
Infante Don Jaime. Every advance made by Don Pedro's wife was
insolently rejected by her. The Queen wished to become godmother
to one of her children; Maccalda disdainfully declined the honour.
The Queen had a litter made to take air in Palermo, a piece of luxury
unprecedented in Sicily. Maccalda immediately rambled about the
island in a litter twice the size, eclipsing her sovereign by her
presumptuous splendour. In short, the court of Arragon could not
endure this incessant struggle, and soon serious grounds for
vengeance were found. All powerful with her husband, Maccalda
excited him to revolt. He corresponded with Charles of Anjou, then
in Calabria; one of his letters, in which he promised to deliver Sicily
to the King of Naples, fell into the hands of John of Procida. Don
Pedro, informed of Alaimo's treason, dissimulated and wrote him an
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.
More than just a book-buying platform, we strive to be a bridge
connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.
Join us on a journey of knowledge exploration, passion nurturing, and
personal growth every day!
ebookbell.com

More Related Content

PDF
ARTIFICIAL INTELLIGENCEr.pdf
PDF
ARTIFICIAL INTELLIGENCEr.pdf
PDF
AI and the Future of Work [TUG-CO, 11/15/23]
PPTX
Workshop_Presentation.pptx
PPTX
Lesson 1 intro to ai
PDF
Grokking Artificial Intelligence Algorithms 1st Edition Rishal Hurbans
PPTX
Machine Learning - Challenges, Learnings & Opportunities
PDF
Introduction to AI
ARTIFICIAL INTELLIGENCEr.pdf
ARTIFICIAL INTELLIGENCEr.pdf
AI and the Future of Work [TUG-CO, 11/15/23]
Workshop_Presentation.pptx
Lesson 1 intro to ai
Grokking Artificial Intelligence Algorithms 1st Edition Rishal Hurbans
Machine Learning - Challenges, Learnings & Opportunities
Introduction to AI

Similar to Artificial Intelligence A Systems Approach 1st Edition M Tim Jones (20)

PPTX
IoT Sensor Nodes with AI - Lecture Notes
PPTX
Webinar on AI in IoT applications KCG Connect Alumni Digital Series by Rajkumar
PDF
When AI becomes a data-driven machine, and digital is everywhere!
PPTX
What is Artificial Intelligence - Beginners
PPTX
Artificial Intelligence in testing - A STeP-IN Evening Talk Session Speech by...
PDF
Way To The Advanced Computer Data Science Version1 Muhammad Allah Rakha
PPT
28th Jan Intro to AI.ppt
PDF
AI in Manufacturing: Opportunities & Challenges
PPTX
Introduction to Artificial Intelligence.pptx
PPTX
Sp14 cs188 lecture 1 - introduction
PPTX
Artificial intelligence
PDF
ARTIFICIAL INTELLIGENCE (A.I).pdf how it works
PPTX
Overview of Machine Learning and its Applications
PDF
The Future of AI
PDF
Demystifying Artificial Intelligence
PDF
AI, Machine Learning and Deep Learning - The Overview
DOCX
Artificial intelligence-full -report.doc
PDF
artificialintelligence-170409073037.pdf
PPTX
Big Data Day LA 2015 - Applications of the Apriori Algorithm on Open Data by ...
IoT Sensor Nodes with AI - Lecture Notes
Webinar on AI in IoT applications KCG Connect Alumni Digital Series by Rajkumar
When AI becomes a data-driven machine, and digital is everywhere!
What is Artificial Intelligence - Beginners
Artificial Intelligence in testing - A STeP-IN Evening Talk Session Speech by...
Way To The Advanced Computer Data Science Version1 Muhammad Allah Rakha
28th Jan Intro to AI.ppt
AI in Manufacturing: Opportunities & Challenges
Introduction to Artificial Intelligence.pptx
Sp14 cs188 lecture 1 - introduction
Artificial intelligence
ARTIFICIAL INTELLIGENCE (A.I).pdf how it works
Overview of Machine Learning and its Applications
The Future of AI
Demystifying Artificial Intelligence
AI, Machine Learning and Deep Learning - The Overview
Artificial intelligence-full -report.doc
artificialintelligence-170409073037.pdf
Big Data Day LA 2015 - Applications of the Apriori Algorithm on Open Data by ...
Ad

Recently uploaded (20)

PDF
01-Introduction-to-Information-Management.pdf
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PPTX
master seminar digital applications in india
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Computing-Curriculum for Schools in Ghana
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PDF
Trump Administration's workforce development strategy
PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Microbial disease of the cardiovascular and lymphatic systems
01-Introduction-to-Information-Management.pdf
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
master seminar digital applications in india
Paper A Mock Exam 9_ Attempt review.pdf.
2.FourierTransform-ShortQuestionswithAnswers.pdf
Anesthesia in Laparoscopic Surgery in India
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
202450812 BayCHI UCSC-SV 20250812 v17.pptx
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Computing-Curriculum for Schools in Ghana
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
Orientation - ARALprogram of Deped to the Parents.pptx
Trump Administration's workforce development strategy
UNIT III MENTAL HEALTH NURSING ASSESSMENT
Supply Chain Operations Speaking Notes -ICLT Program
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
Final Presentation General Medicine 03-08-2024.pptx
What if we spent less time fighting change, and more time building what’s rig...
Module 4: Burden of Disease Tutorial Slides S2 2025
Microbial disease of the cardiovascular and lymphatic systems
Ad

Artificial Intelligence A Systems Approach 1st Edition M Tim Jones

  • 1. Artificial Intelligence A Systems Approach 1st Edition M Tim Jones download https://ebookbell.com/product/artificial-intelligence-a-systems- approach-1st-edition-m-tim-jones-1020640 Explore and download more ebooks at ebookbell.com
  • 2. Here are some recommended products that we believe you will be interested in. You can click the link to download. Artificial Intelligence A Systems Approach 1st Edition Jones https://ebookbell.com/product/artificial-intelligence-a-systems- approach-1st-edition-jones-5428814 Artificial Intelligence A Systems Approach From Architecture Principles To Deployment 1st Edition David R Martinez https://ebookbell.com/product/artificial-intelligence-a-systems- approach-from-architecture-principles-to-deployment-1st-edition-david- r-martinez-62331388 Multiagent Systems A Modern Approach To Distributed Artificial Intelligence Gerhard Weiss https://ebookbell.com/product/multiagent-systems-a-modern-approach-to- distributed-artificial-intelligence-gerhard-weiss-56387528 Engineering Artificially Intelligent Systems A Systems Engineering Approach To Realizing Synergistic Capabilities 1st Ed 2021 William F Lawless Editor https://ebookbell.com/product/engineering-artificially-intelligent- systems-a-systems-engineering-approach-to-realizing-synergistic- capabilities-1st-ed-2021-william-f-lawless-editor-36429674
  • 3. Artificial Intelligence A Guide To Intelligent Systems 2nd Edition Michael Negnevitsky https://ebookbell.com/product/artificial-intelligence-a-guide-to- intelligent-systems-2nd-edition-michael-negnevitsky-23062210 Artificial Intelligence A Guide To Intelligent Systems 3rd Edition 3rd Edition Michael Negnevitsky https://ebookbell.com/product/artificial-intelligence-a-guide-to- intelligent-systems-3rd-edition-3rd-edition-michael- negnevitsky-10878916 Artificial Intelligence Systems And The Internet Of Things In The Digital Era Abdalmuttaleb Ma Musleh Alsartawi https://ebookbell.com/product/artificial-intelligence-systems-and-the- internet-of-things-in-the-digital-era-abdalmuttaleb-ma-musleh- alsartawi-32214930 Artificial Intelligence Systems And The Internet Of Things In The Digital Era Proceedings Of Eammis 2021 Lecture Notes In Networks And Systems 239 1st Ed 2021 Abdalmuttaleb Ma Musleh Alsartawi Editor https://ebookbell.com/product/artificial-intelligence-systems-and-the- internet-of-things-in-the-digital-era-proceedings-of- eammis-2021-lecture-notes-in-networks-and-systems-239-1st- ed-2021-abdalmuttaleb-ma-musleh-alsartawi-editor-36521182 Hybrid Artificial Intelligence Systems 5th International Conference Hais 2010 San Sebastin Spain June 2325 2010 Proceedings Part I 1st Edition Ali A Ghorbani https://ebookbell.com/product/hybrid-artificial-intelligence- systems-5th-international-conference-hais-2010-san-sebastin-spain- june-2325-2010-proceedings-part-i-1st-edition-ali-a-ghorbani-2535066
  • 5. ARTIFICIAL INTELLIGENCE A Systems Approach M. TIM JONES INFINITY SCIENCE PRESS LLC Hingham, Massachusetts New Delhi
  • 6. Copyright 2008 by INFINITY SCIENCE PRESS LLC All rights reserved. This publication, portions of it, or any accompanying software may not be reproduced in any way, stored in a retrieval system of any type, or transmitted by any means or media, electronic or mechanical, including, but not limited to, photocopy, recording, Internet postings or scanning, without prior permission in writing from the publisher. Publisher: DAVID PALLAI INFINITY SCIENCE PRESS LLC 11 Leavitt Street Hingham, MA 02043 Tel. 877-266-5796 (toll free) Fax 781-740-1677 info@infinitysciencepress.com www.infinitysciencepress.com This book is printed on acid-free paper. M. Tim Jones. Artificial Intelligence: A Systems Approach ISBN: 978-0-9778582-3-1 The publisher recognizes and respects all marks used by companies, manufacturers, and developers as a means to distinguish their products. All brand names and product names mentioned in this book are trademarks or service marks of their respective companies. Any omission or misuse (of any kind) of service marks or trademarks, etc. is not an attempt to infringe on the property of others. Library of Congress Cataloging-in-Publication Data JONES, M. TIM. Artificial intelligence : a systems approach / M. Tim Jones. p. cm. Includes index. ISBN-13: 978-0-9778582-3-1 (hardcover with cd-rom : alk. paper) 1. Artificial intelligence--Data processing. 2. Artificial intelligence--Mathematical models. I. Title. Q336.J68 2008 006.3--dc22 2007045869 7 8 9 0 4 3 2 1 Our titles are available for adoption, license or bulk purchase by institutions, corporations, etc. For additional information, please contact the Customer Service Dept. at 877-266-5796 (toll free). Requests for replacement of a defective CD-ROM must be accompanied by the original disc, your mailing address, telephone number, date of purchase and purchase price. Please state the nature of the problem, and send the information to INFINITY SCIENCE PRESS, 11 Leavitt Street, Hingham, MA 02043. The sole obligation of INFINITY SCIENCE PRESS to the purchaser is to replace the disc, based on defective materials or faulty workmanship, but not based on the operation or functionality of the product.
  • 7. DEDICATION This book is dedicated to my wonderful wife, Jill, without whom this book would not be possible. I’m also indebted to my parents Maury and Celeta, who instilled in me a desire to learn and wonder.
  • 8. ACKNOWLEDGMENTS At the time of this writing, AI is celebrating its 50th anniversary. It was August of 1956 when researchers met at the Dartmouth Summer Research Project on Artificial Intelligence with the agenda of creating intelligent machines. In the 50 years that followed, AI has become a genuine field of study, but the road has not been without its bumps. Acknowledging all those who’ve contributed to AI would fill a book much larger than this. But I’d like to personally recognize John McCarthy for introducing AI in 1955 (at the Dartmouth Summer Project) and for having created the wonderful Lisp programming language.
  • 9. TABLE OF CONTENTS Chapter 1 The History of AI 1-19 What is Intelligence? 1 The Search for Mechanical Intelligence 2 The Very Early Days (the early 1950’s) 3 Alan Turing 3 AI, Problem Solving and Games 4 Artificial Intelligence Emerges as a Field 5 The Dartmouth AI Summer Research Project 5 Building Tools for AI 6 The Focus on Strong AI 6 Constrained Applications 7 Bottom-Up Approaches Emerge 7 AI’s Winter 8 Results-Oriented Applications 8 Additional AI Tools Emerge 9 Neat vs. Scruffy Approaches 9 AI Remerges 10 The Silent Return 10 Messy and Scruffy Approaches Take Hold 10 Agent Systems 12 AI Inter-disciplinary R&D 12 Systems Approach 13 Overview of this Book 15 Uninformed Search 15 Informed Search 15 AI and Games 15 Knowledge Representation 16
  • 10. Machine Learning 16 Evolutionary Computation 16 Neural Networks Part 1 16 Neural Networks Part 2 17 Intelligent Agents 17 Biologically Inspired and Hybrid Models 17 Languages of AI 17 Chapter Summary 18 References 18 Resources 18 Exercises 19 Chapter 2 Uninformed Search 21-48 Search and AI 21 Classes of Search 22 General State Space Search 22 Search in a Physical Space 22 Search in a Puzzle Space 23 Search in an Adversarial Game Space 25 Trees, Graphs and Representation 27 Uninformed Search 29 Helper APIs 30 General Search Paradigms 31 Depth-First Search 31 Depth-Limited Search 34 Iterative Deepening Search 36 Breadth-First Search 39 Bidirectional Search 42 Uniform-Cost Search 42 Improvements 45 Algorithm Advantages 46 Chapter Summary 46 Algorithms Summary 46 References 47 Exercises 47 Chapter 3 Informed Search 49-88 Search and AI 49 Best-First Search 50 Best-First Search and the N-Queens Problem 50
  • 11. Best-First Search Implementation 52 Variants of Best-First Search 56 A* Search 57 A* Search and the Eight Puzzle 59 Eight Puzzle Representation 59 A* Search Implementation 61 Eight Puzzle Demonstration with A* 64 A* Variants 65 Applications of A* Search 65 Hill Climbing Search 65 Simulated Annealing 66 The Traveling Salesman Problem (TSP) 68 TSP Tour Representation 68 Simulated Annealing Implementation 70 Simulated Annealing Demonstration 73 Tabu Search 75 Tabu Search Implementation 77 Tabu Search Demonstration 79 Tabu Search Variants 80 Constraint Satisfaction 81 Graph Coloring as a CSP 81 Scheduling as CSP 83 Constraint Satisfaction Problems 84 Generate and Test 84 Backtracking 84 Forward Checking and Look Ahead 84 Min-Conflicts Search 86 Chapter Summary 86 Algorithms Summary 86 References 86 Resources 87 Exercises 87 Chapter 4 AI and Games 89-142 Two Player Games 89 The Minimax Algorithm 92 Minimax and Tic-Tac-Toe 95 Minimax Implementation for Tic-Tac-Toe 98 Minimax with Alpha-Beta Pruning 101 Classical Game AI 106
  • 12. Checkers 106 Checker Board Representation 107 Techniques used in Checkers Programs 107 Opening Books 108 Static Evaluation Function 108 Search Algorithm 108 Move History 108 Endgame Database 109 Chess 109 Chess Board Representation 110 Techniques used in Chess Programs 110 Opening Book Database 110 Minimax Search with Alpha Beta Pruning 111 Static Board Evaluation 111 Othello 112 Techniques used in Othello Programs 112 Opening Knowledge 112 Static Evaluation Function 112 Search Algorithm 113 Endgames 113 Other Algorithms 113 Go 114 Go Board Representation 114 Techniques used in Go Programs 114 Opening Moves 115 Move Generation 115 Evaluation 115 Endgame 116 Backgammon 116 Techniques used in Backgammon Programs 116 Neurogammon 116 TD-Gammon 117 Poker 118 Loki – A learning Poker Player 119 Scrabble 120 Video Game AI 121 Applications of AI Algorithms in Video Games 122 Movement and Pathfinding 123 Table Lookup with Offensive and Defensive Strategy 123 NPC Behavior 129
  • 13. Static State Machines 130 Layered Behavior Architectures 131 Other Action-Selection Mechanisms 132 Team AI 132 Goals and Plans 134 Real-Time Strategy AI 136 Rules-Based Programming 136 Chapter Summary 139 References 139 Resources 140 Exercises 141 Chapter 5 Knowledge Representation 143-170 Introduction 143 Types of Knowledge 144 The Role of Knowledge 144 Semantic Nets 145 Frames 146 Propositional Logic 149 Deductive Reasoning with Propositional Logic 151 Limitations of Propositional Logic 152 First Order Logic (Predicate Logic) 152 Atomic Sentences 153 Compound Sentences 154 Variables 154 Quantifiers 155 First-Order Logic and Prolog 155 Simple Example 155 Information Retrieval and KR 157 Representing and Reasoning about an Environment 159 Semantic Web 163 Computational Knowledge Discovery 165 The BACON System 165 Automatic Mathematician 166 Ontology 167 Communication of Knowledge 167 Common Sense 168 Summary 169 References 169 Resources 169
  • 14. Exercises 170 Chapter 6 Machine Learning 171-193 Machine Learning Algorithms 171 Supervised Learning 172 Learning with Decision Trees 172 Creating a Decision Tree 174 Characteristics of Decision Tree Learning 176 Unsupervised Learning 176 Markov Models 177 Word Learning with Markov Chains 177 Word Generation with Markov Chains 179 Markov Chain Implementation 180 Other Applications of Markov Chains 184 Nearest Neighbor Classification 185 1NN Example 186 k-NN Example 188 Summary 192 Resources 192 Exercises 192 Chapter 7 Evolutionary Computation 195-247 Short History of Evolutionary Computation 195 Evolutionary Strategies 196 Evolutionary Programming 197 Genetic Algorithms 197 Genetic Programming 198 Biological Motivation 199 Genetic Algorithms 200 Genetic Algorithm Overview 200 Genetic Algorithm Implementation 204 Genetic Programming 212 Genetic Programming Algorithm 212 Genetic Programming Implementation 215 Evolutionary Strategies 220 Evolutionary Strategies Algorithm 221 Evolutionary Strategies Implementation 223 Differential Evolution 227 Differential Evolution Algorithm 228 Differential Evolution Implementation 230
  • 15. Particle Swarm Optimization 236 Particle Swarm Algorithm 236 Particle Swarm Implementation 238 Evolvable Hardware 244 Summary 244 References 245 Resources 245 Exercises 245 Chapter 8 Neural Networks I 249-287 Short History of Neural Networks 249 Biological Motiviation 250 Fundamentals of Neural Networks 251 Single Layer Perceptrons 252 Multi-Layer Perceptrons 254 Supervised vs. Unsupervised Learning Algorithms 257 Binary vs. Continuous Inputs and Outputs 257 The Perceptron 257 Perceptron Learning Algorithm 259 Perceptron Implementation 260 Least-Mean-Square (LMS) Learning 262 LMS Learning Algorithm 262 LMS Implementation 263 Learning with Backpropagation 265 Backpropagation Algorithm 267 Backpropagation Implementation 268 Tuning Backpropagation 274 Training Variants 274 Weight Adjustment Variants 274 Probabilistic Neural Networks 275 PNN Algorithm 276 PNN Implementation 277 Other Neural Network Architectures 281 Time Series Processing Architecture 281 Recurrent Neural Network 283 Tips for Building Neural Networks 283 Defining the Inputs 283 Defining the Outputs 284 Choice of Activation Functions 284 Number of Hidden Layers 285
  • 16. Chapter Summary 285 References 285 Exercises 285 Chapter 9 Neural Networks II 289-328 Unsupervised Learning 289 Hebbian Learning 290 Hebb’s Rule 291 Hebb Rule Implementation 292 Simple Competitive Learning 296 Vector Quantization 297 Vector Quantization Implementation 298 k-Means Clustering 304 k-Means Algorithm 305 k-Means Implementation 307 Adaptive Resonance Theory 313 ART-1 Algorithm 314 ART-1 Implementation 316 Hopfield Auto-Associative Model 322 Hopfield Auto-Associator Algorithm 323 Hopfield Implementation 324 Summary 327 References 328 Exercises 328 Chapter 10 Robotics and AI 329-348 Introduction to Robotics 329 What is a Robot? 330 A Sampling from the Spectrum of Robotics 331 Taxonomy of Robotics 332 Fixed 333 Legged 333 Wheeled 333 Underwater 333 Aerial 333 Other Types of Robots 334 Hard vs. Soft Robotics 334 Braitenburg Vehicles 334 Natural Sensing and Control 336 Perception with Sensors 337
  • 17. Actuation with Effectors 338 Robotic Control Systems 338 Simple Control Architectures 339 Reactive Control 340 Subsumption 340 Other Control Systems 342 Movement Planning 342 Complexities of Motion Planning 342 Cell Decomposition 343 Potential Fields 344 Group or Distributed Robotics 345 Robot Programming Languages 346 Robot Simulators 346 Summary 346 References 346 Resources 347 Exercises 347 Chapter 11 Intelligent Agents 349-391 Anatomy of an Agent 350 Agent Properties and AI 351 Rationale 352 Autonomous 352 Persistent 352 Communicative 352 Cooperative 353 Mobile 353 Adaptive 353 Agent Environments 353 Agent Taxonomies 356 Interface Agents 356 Virtual Character Agents 357 Entertainment Agents 358 Game Agents 358 ChatterBots 360 Eliza and Parry 360 AIML 361 Mobile Agents 362 User Assistance Agent 364 Email Filtering 364
  • 18. Information Gathering and Filtering 365 Other User-Assistance Applications 365 Hybrid Agent 366 Agent Architectures 366 What is Architecture? 366 Types of Architectures 367 Reactive Architectures 367 Deliberative Architectures 368 Blackboard Architectures 369 BDI Architecture 370 Hybrid Architectures 371 Mobile Architectures 371 Architecture Description 372 Subsumption Architecture (Reactive) 372 Behavior Networks (Reactive) 373 ATLANTIS (Deliberative) 375 Homer (Deliberative) 376 BB1 (Blackboard) 377 Open Agent Architecture (Blackboard) 377 Procedural Reasoning System (BDI) 378 Aglets (Mobile) 379 Messengers (Mobile) 380 SOAR (Hybrid) 382 Agent Languages 382 Telescript 382 Aglets 383 Obliq 384 Agent TCL 384 Traditional Languages 385 Agent Communication 385 Knowledge Query and Manipulation Language (KQML) 385 FIPA Agent Communication Language 388 Extensible Markup Language (XML) 388 Summary 389 Resources 389 References 390 Exercises 391 Chapter 12 Biologically Inspired and Hybrid Models 393-432 Cellular Automata 393
  • 19. One Dimensional CA 394 Two Dimensional CA 395 Conway Application 396 Turing Completeness 398 Emergence and Organization 398 Artificial Immune Systems 398 Self-Management Capabilities 399 Touchpoints 400 Touchpoint Autonomic Managers 400 Orchestrating Autonomic Managers 401 Integrated Management Console 401 Autonomic Summary 402 Artificial Life 402 Echo 403 Tierra 403 Simulated Evolution 403 Environment 403 The Bug (or Agent) 404 Variations of Artificial Life 408 Lindenmayer Systems 408 Fuzzy Logic 410 Introduction to Fuzzy Logic 410 Fuzzy Logic Mapping 411 Fuzzy Logic Operators 414 Fuzzy Control 415 Evolutionary Neural Networks 416 Genetically Evolved Neural Networks 416 Simulation Evolution Example 419 Ant Colony Optimization 423 Traveling Salesman Problem 423 Path Selection 425 Pheromone Intensification 425 Pheromone Evaporation 426 New Tour 426 Sample Usage 426 ACO Parameters 430 Affective Computing 430 Characterizing Human Emotion 430 Synthesizing Emotion 431 Resources 432
  • 20. Chapter 13 The Languages of AI 433-483 Language Taxonomy 433 Functional Programming 434 Imperative Programming 437 Object Oriented Programming 438 Logic Programming 441 Languages of AI 442 The LISP Language 443 The History of the LISP Language 443 Overview of the LISP Language 444 Data Representation 444 Simple Expressions 444 Predicates 445 Variables 445 List Processing 445 Programs as Data 447 Conditions 447 Functions in LISP 448 LISP Summary 451 The Scheme Language 451 History of Scheme 452 Overview of the Scheme Language 452 Data Representation 452 Simple Expressions 452 Predicates 453 Variables 453 List Processing 454 Conditions 455 Iteration and Maps 456 Procedures in Scheme 457 Scheme Summary 460 The POP-11 Language 460 History of POP-11 460 Overview of the POP-11 Language 460 Data Representation 460 Predicates 461 Simple Expressions 461 Variables 462 List Processing 462 Conditions 463
  • 21. Iteration and Maps 464 Pattern Matching 465 Procedures in POP-11 465 POP-11 Summary 468 Prolog 468 History of Prolog 469 Overview of the Prolog Language 469 Data Representation 469 List Processing 470 Facts, Rules, and Evaluation 471 Arithmetic Expressions 478 Prolog Summary 480 Other Languages 480 Chapter Summary 481 References 481 Resources 482 Exercises 482 About the CD-ROM 485 Index 487-498
  • 23. T he history of AI is interesting all by itself. It’s a modern-day drama, filled with excitement and anticipation, discovery, and disappointment. From over-promises of early (and later) AI research, to fears of the unknown from the general public, AI’s history is worthy of study by itself. In this chapter, we’ll explore AI’s tumultuous history and also provide a summary introduction to each of the chapters of this book. WHAT IS INTELLIGENCE? To build software that is deemed intelligent, it’s helpful to begin with a definition of intelligence. Intelligence can be simply defined as a set of properties of the mind. These properties include the ability to plan, solve problems, and in general, reason. A simpler definition could be that intelligence is the ability to make the right decision given a set of inputs and a variety of possible actions. Using this simple definition of intelligence (making the right decision), we can apply this not only to humans, but also to animals that exhibit rational behavior. But the intelligence that is exhibited by human beings is much more complex than that of animals. For example, humans have the ability C h a p t e r 1 THE HISTORY OF AI
  • 24. 2 Artificial Intelligence to communicate with language, but so do some animals. Humans can also solve problems, but the same can be said of some animals. One difference then is that humans embody many aspects of intelligence (the ability to communicate, solve problems, learn and adapt) where animals typically embody a small number of intelligent characteristics, and usually at a much lower level than humans. We can use the same analogy on AI applied to computer systems. For example, it’s possible to build an application that plays a world-class game of Chess, but this program knows nothing of the game of Checkers, nor how to make a good cup of tea. A data mining application can help identify fraud, but can’t navigate a complex environment. From this perspective, the most complex and intelligent applications can be deemed intelligent from one perspective, but lack even the simplest intelligence that can be seen in the least intelligent of animals. NOTE Famed author Isaac Asimov once wrote about his experience with aptitude tests in the army. In the army, he scored well above the norm. But what he realized was that he could score well on tests that were developed by others that shared his academic bents. He opined that if the tests were developed by people involved in auto repair, he would have scored very poorly. The issue being that tests are developed around a core of expertise, and scoring poorly on one doesn’t necessarily indicate a lack of intelligence. THE SEARCH FOR MECHANICAL INTELLIGENCE History is filled with stories of the creation of intelligent machines. In the 800s BC, the Iliad described the winged Talos, a bronze automaton forged by Hephaestus to protect Crete. The inner workings of Talos weren’t described, except that he was bronze, and filled with ichor (or a Greek god’s blood). A more recent example is Mary Shelley’s Frankenstein, in which the scientist recreates life from old. In 1921, Karel Capek’s play “Rossum’s Universal Robots” introduced the concept of cheap labor through robotics. But one of the most interesting applications of artificial intelligence, in a non-robitic form, was that of the HAL 9000 introduced by Arthur C. Clark in his his novel “2001: A Space Odyssey.” HAL was a sentient artificial intelligence that occupied the Discovery spaceship (en route to Jupiter). HAL had no physical form, but instead managed the spaceship’s systems, visually watched the human occupants through a network of cameras, and
  • 25. The History of AI 3 communicated with them in a normal human voice. The moral behind the story of HAL was one of modern-day programming. Software does exactly what one tells it to do, and can make incorrect decisions trying to focus on a single important goal. HAL obviously was not created with Isaac Asimov’s three laws of robotics in mind. THE VERY EARLY DAYS (THE EARLY 1950s) While the term artificial intelligence had not yet been conceived, the 1950s were the very early days of AI. Early computer systems were being built, and the ideas of building intelligent machines were beginning to form. Alan Turing In 1950 it was Alan Turing who asked whether a machine could think. Turing not long before had introduced the concept of his universal abstract machine (called the Turing Machine) that was simple and could solve any mathematical problem (albiet with some complexity). Building on this idea, Turing wondered that if a computer’s response were indistinguishable from a human, then the computer could be considered a thinking machine. The result of this experiment is called the Turing Test. In the Turing test, if the machine could fool a human into thinking that it was also human, then it passed the intelligence test. One way to think of the Turing test is by communicating to the other agent through a keyboard. Questions are asked of the peer through written text, and responses are provided through the terminal. This test provides a way to determine if intelligence was created. Considering the task at hand, not only must the intelligent peer contain the necessary knowledge to have an intelligent conversation, it must be able to parse and understand natural language and generate natural language responses. The questions may involve reasoning skills (such as problem solving), so mimicking humans would be a feat! An important realization of Turing during this period was the need to start small and grow intelligence, rather than expecting it to materialize. Turing proposed what he called the Child Machine in which a lesser intelligent agent would be created and then subjected to a course of education. Rather than assume that we could build an adult intelligence, we would build a child intelligence first and then inject it with knowledge. This idea of starting small and at lower levels corresponds with later ideas of so-called “scruffy” thinkers. The human brain is complex and not fully
  • 26. 4 Artificial Intelligence understood, instead of striving to imitate this, why not start smaller at the child (or even smaller organism) and work our way up? Turing called this the blank sheets argument. A child is like a notebook that’s full of blank sheets, but is a mechanism by which knowledge is stored. Alan Turing’s life ended at a young age, but he’s considered the founder of the field of AI (even though the moniker would not be applied for another six years). AI, Problem Solving, and Games Some of the earliest applications of AI focused on games and general problem solving. At this time, creating an intelligent machine was based on the belief that the machine would be intelligent if it could do something that people do (and perhaps find difficult). NOTE In 1950, Claude Shannon proposed that the game of Chess was fundamentaly a search problem. In fact, he was correct, but brute force search isn’t truly practical for the search space that exists with Chess. Search, heuristics, and a catalog of opening and ending moves provides a faster and more efficient way to play Chess. Shannon’s seminal paper on computer Chess produced what is called the Shannon number, or 10^120, which represents the lower bound of the game tree complexity of Chess. [Shannon 1950] The first AI program written for a computer was called “The Logic Theorist.” It was developed in 1956 by Allen Newell, Herbert Simon, and J. C. Shaw to find proofs for equations. [Newell 1956] What was most unique about this program is that it found a better proof than had existed before for a given equation. In 1957, Simon and Newell built on this work to develop the General Problem Solver (GPS). The GPS used means-end analysis to solve problems, but in general was restricted to toy problems. Like complex math, early AI researchers believed that if a computer could solve problems that they thought were complex, then they could build intelligent machines. Similarly, games provided an interesting testbed for the development of algorithms and techniques for intelligent decision making. In the UK at Oxford University in the early 1950s, researchers developed game-playing programs for two complex games. Christopher Strachey developed a Checkers playing program on the Ferranti Mark I. By 1952, his program could play a reasonable game of Checkers. Dietrich Prinz developed a program, again for the Ferranti Mark I, that could play Chess (mate-in-two variety). His program could search a thousand possible moves, but on this
  • 27. The History of AI 5 early computer, it required significant time and played very slowly. In 1952, Arthur Samuel raised the bar for AI programs. His Checkers playing program, which ran on the IBM 701, included learning and generalization. What Samuel did with his learning Checkers program was unique in that he allowed two copies of his program to play one another, and therefore learn from each other. The result was a program that could defeat its creator. By 1962, Samuel’s Checkers program defeated the former Connecticut Checkers champion. NOTE Samuel’s program, and his approach of playing copies against one another, is one of the first examples of computing survival of the fittest and the field which came to be called evolutionary computation. ARTIFICIAL INTELLIGENCE EMERGES AS A FIELD By the mid 1950s, AI began to solidify as a field of study. At this point in AI’s life, much of the focus was on what is called Strong AI Strong AI is focused on building AI that mimics the mind. The result is a sapient entity with human-like intelligence, self-awareness, and consciousness. The Dartmouth AI Summer Research Project In 1956, the Dartmouth AI Conference brought about those involved in research in AI: John McCarthy (Dartmouth), Marvin Minsky (Harvard), Nathaniel Rochester (IBM), and Claude Shannon (Bell Telephone Laboratories) brought together researchers in computers, natural language processing, and neuron nets to Dartmouth College for a month-long session of AI discussions and research. The Summer research project on AI began: We propose that a 2 month, 10 man study of artificial intelligence be carried out during the summer of 1956 at Dartmouth College in Hanover, New Hampshire. The study is to proceed on the basis of the conjecture that every aspect of learning or any other feature of intelligence can in principle be so precisely described that a machine can be made to simulate it. An attempt will be made to find how to make machines use language, form abstractions and concepts, solve kinds of problems now reserved for humans, and improve themselves. We think that a significant advance can be made in one or more of these problems if a carefully selected group of scientists work on it together for a summer.
  • 28. 6 Artificial Intelligence Since then, many AI conferences have been held around the world, and on a variety of disciplines studied under the AI moniker. In 2006, Dartmouth held the “Dartmouth Artificial Intelligence Conference: The Next Fifty Years” (informally known as AI@50). The conference was well attended (even from a few that attended the first conference 50 years prior), and analyzed AI’s progress and how its challenges relate to those of other fields of study. Building Tools for AI In addition to coining the term artificial intelligence, and bringing together major researchers in AI in his 1956 Dartmouth conference, John McCarthy designed the first AI programming language. LISP was first described by McCarthy in his paper titled “Recursive Functions of Symbolic Expressions and their Computation by Machine, Part I.” The first LISP compiler was also implemented in LISP, by Tim Hart and Mike Levin at MIT in 1962 for the IBM 704. This compiler introduced many advanced features, such as incremental compilation. [LISP 2007] McCarthy’s LISP also pioneered many advanced concepts now familiar in computer science, such as trees (data structures), dynamic typing, object-oriented programming, and compiler self-hosting. LISP was used in a number of early AI systems, demonstrating its usefulness as an AI language. One such program, called SHRDLU, provides a natural language interface to a table-top world of objects. The program can understand queries about the table-top “world,” reason about the state of things in the world, plan actions, and perform some rudimentary learning. SHRDLU was designed and implemented by Terry Winograd at the MIT AI Lab on a PDP-6 computer. LISP, and the many dialects that evolved from it, are still in wide use today. Chapter 13 provides an introduction to the languages of AI, including LISP. The Focus on Strong AI Recall that the focus of early AI was in Strong AI. Solving math or logic problems, or engaging in dialogue, was viewed as intelligent, while activities such as walking freely in unstable environments (which we do every day) were not. In 1966, Joseph Weizenbaum of MIT developed a program that parodied a psychologist and could hold an interesting dialogue with a patient. The design of Eliza would be considered simple by today’s standards, but its
  • 29. The History of AI 7 pattern-matching abilities, which provided reasonable responses to patient statements was real to many people. This quality of the program was troubling to Weizenbaum who later became a critic of AI because of its lack of compassion. Constrained Applications While much of early AI was Strong-focused, there were numerous applications that focused on solving practical problems. One such application was called the “Dendral Project,” emerging in 1965 at Stanford University. Dendral was developed to help organic chemists understand the organization of unknown organic molecules. It used as its inputs mass spectrometry graphs and a knowledge base of chemistry, making it the first known expert system. Other constrained applications in this era include Macsyma, a computer algebra system developed at MIT by Carl Engelman, William Martin, and Joel Moses. Macsyma was written in MacLisp, a dialect of LISP developed at MIT. This early mathematical expert system demonstrated solving integration problems with symbolic reasoning. The ideas demonstrated in Macsyma eventually made their way into commercial math applications. Bottom-Up Approaches Emerge Early AI focused on a top-down approach to AI, attempting to simulate or mimic the higher level concepts of the brain (planning, reasoning, language understanding, etc.). But bottom-up approaches began to gain favor in the 1960s, primarily modeling lower-level concepts, such as neurons and learning at a much lower level. In 1949, Donald Hebb introduced his rule that describes how neurons can associate with one another if they are repeatedly active at the same time. The contribution of one cell’s firing to enable another will increase over time with persistent firing, leading to a strong relationship between the two (a causal relationship). But in 1957, the perceptron was created by Frank Rosenblatt at the Cornell Aeronautical Laboratory. The perceptron is a simple linear classifier that can classify data into two classes using an unsupervised learning algorithm. The perceptron created considerable interest in neural network architectures, but change was not far away. NOTE Hebbian learning, perceptrons, and more advanced neural network architectures and learning algorithms are covered in the neural network Chapters 8 and 9.
  • 30. 8 Artificial Intelligence AI’S WINTER Prior to the 1970s, AI had generated considerable interest, and also considerable hype from the research community. Many interesting systems had been developed, but these fell quite short of the predictions made by some in the community. But new techniques such as neural networks breathed new life into this evolving field, providing additional ways for classification and learning. But the excitement of neural networks came to an end in 1969 with the publication of the mongraph titled “Perceptrons.” This monograph was written by Marvin Minsky and Seymour Papert, strong advocates of Strong (or top-down) AI. The authors rightly demonstrated that single-layer perceptrons were limited, particularly when confronted with problems that are not linearly separable (such as the XOR problem). The result was a steep decline of funding into neural network research, and in general, research in AI as a field. Subsequent research would find that the multi-layer networks solved the linear separation problem, but too late for the damage done to AI. Hardware built for AI, such as the LISP machines, also suffered a loss of interest. While the machines gave way to more general systems (not necessarily programmed in LISP), the functional languages like LISP continued to attract attention. Popular editors such as EMACS (developed during this period) still support a large user community with a scripting shell based on LISP. Results-Oriented Applications While there was a reduction in focus and spending in AI research in the 1970s, AI development continued but in a more focused arena. Applications that showed promise, such as expert systems, rose as one of the key developments in this era. One of the first expert systems to demonstrate the power of rules-based architectures was called MYCIN, and was developed by Ted Shortliffe following his dissertation on the subject while at Stanford (1974). MYCIN operated in the field of medical diagnosis, and demonstrated knowledge representation and inference. Later in this decade, another dissertation at Stanford by Bill VanMelles built on the MYCIN architecture and serves as a model for the expert system shell (still in use today). In Chapter 5 we’ll provide an introduction to the representation of knowledge and inference with logic. Other results-oriented applications included those focused on natural language understanding. The goal of systems in this era was in the development of intelligent question answering systems. To understand a question stated in natural language, the question must first be parsed into
  • 31. The History of AI 9 its fundamental parts. Bill Woods introduced the idea of the Augmented Transition Network (or ATN) that represents formal languages as augmented graphs. From Eliza in the 1960s to ATNs in the 1970s, Natural Language Processing (NLP) and Natural Language Understanding (NLU) continues today in the form of chatterbots. Additional AI Tools Emerge John McCarthy introduced the idea of AI-focused tools in the 1950s with the development of the LISP language. Expert systems and their shells continued the trend with tools for AI, but another interesting development that in a way combined the two ideas resulted from the Prolog language. Prolog was a language built for AI, and was also a shell (for which expert systems could be developed). Prolog was created in 1972 by Alain Colmeraur and Phillipe Roussel based on the idea of Horn clauses. Prolog is a declarative high-level language based on formal logic. Programs written in Prolog consist of facts and rules that reason over those facts. You can find more information on Prolog in Chapter 5 Knowledge Representation and Chapter 13, The Languages of AI. Neat vs Scruffy Approaches A split in AI, its focus, and basic approaches was also seen during this period. Traditional, or top-down AI (also called Good-Old-Fashioned-AI, or GOFAI for short) continued during this period but new approaches began to emerge that looked at AI from the bottom-up. These approaches were also labeled Neat and Scruffy approaches segregating them into their representative camps. Those in the neat camp favored formal approaches to AI that were pure and provable. But those in the scruffy camp used methods less provable but still yielding useful and significant results. A number of scruffy approaches to AI that became popular during this period included genetic algorithms (modeling natural selection for optimization) and neural networks (modeling brain behavior from the neuron up). Genetic algorithms became popularized in the 1970s due to the work of John Holland and his students at the University of Michigan. Holland’s book on the topic continues to be a useful resource. Neural networks, while stagnant for a time after the publication of “Perceptrons,” were revived with Paul John Werbos’ creation of the backpropagation algorithm. This algorithm remains the most widely used supervised learning algorithm for training feedforward neural networks. You can learn more about genetic algorithms and evolutionary computation in Chapter 3 and neural networks in Chapters 8, and 9.
  • 32. 10 Artificial Intelligence AI RE-EMERGES Just as spring always follows the winter, AI’s winter would eventually end and bring new life into the field (starting in the mid to late 1980s). The re-emergence of AI had significant differences from the early days. Firstly, the wild predictions of creating intelligent machines were for the most part over. Instead, researchers and AI practitioners focused on specific goals primarily in the weak aspects of AI (as opposed to Strong AI). Weak AI focused on solving specific problems, compared to Strong AI, whose goal was to emulate the full range of human cognitive capabilities. Secondly, the field of AI broadened to include many new types of approaches, for example, the biologically inspired approaches such as Ant Colony Optimization (ACO). The Silent Return An interesting aspect of AI’s return was that it occurred silently. Instead of the typical claims of Strong AI, weak algorithms found use in a variety of settings. Fuzzy logic and fuzzy control systems were used in a number of settings, including camera auto-focus, antilock braking systems as well as playing a part in medical diagnosis. Collaborative filtering algorithms found their way into product recommendation at a popular online bookseller, and popular Internet search engines use AI algorithms to cluster search results to help make finding what you need easier. The silent return follows what Rodney Brooks calls the “AI effect.” AI algorithms and methods transition from being “AI” to standard algorithms and methods once they become practically useful. The methods described above are one example, another is speech recognition. The algorithms behind recognizing the sounds of speech and translating them into symbols were once described within the confines of AI. Now these algorithms are commonplace, and the AI moniker has long since passed. Therefore, the AI effect has a way of diminishing AI research, as the heritage of AI research becomes lost in the practical application of the methods. Messy and Scruffy Approaches Take Hold With AI’s resurgence came different views and approaches to AI and problem solving with AI algorithms. In particular, the scruffy approaches became more widespread and the algorithms became more applicable to real-world problems. Neural networks continued to be researched and applied, and new algorithms and architectures resulted. Neural networks and genetic algorithms
  • 33. The History of AI 11 combined to provide new ways to create neural network architectures that not only solved problems, but did so in the most efficient ways. This is because the survival of the fittest features of the genetic algorithm drove neural network architectures to minimize for the smallest network to solve the given problem at hand. The use of genetic algorithms also grew in a number of other areas including optimization (symbolic and numerical), scheduling, modeling and many others. Genetic algorithms and neural networks (supervised and unsupervised) are covered in Chapters 7, 8, and 9. Other bottom-up and biologically inspired approaches followed in the 1990s and beyond. In early 1992, for example, Marco Dorigo introduced the idea of using stigmergy (indirect communication in an environment, in this case, pheromones). Dorigo’s use of stigmergy was applied to a variety of problems. Ant Colony Optimization (or ACO) is demonstrated with the traveling salesman problem in Chapter 12. Also emerging out of the messy approaches to AI was a new field called Artificial Life. Artificial Life research studies the processes of life and systems related to life through a variety of simulations and models. In addition to modeling singular life, ALife also simulates populations of lifeforms to help understand not only evolution, but also the evolution of characteristics such as language. Swarm intelligence is another aspect of this that grew from ALife research. ALife is interesting in the context of AI because it can use a number of AI methods such as neural networks (as the neuro-controller of the individuals in the population) as well as the genetic algorithm to provide the basis for evolution. This book provides a number of demonstrations of ALife both in the context of genetic algorithms and neural networks. NOTE One of the earliest simulation environments that demonstrated artificial life was the “game of life” created by John Conway. This was an example of a cellular automaton, and is explored later. Another bottom-up approach that evolved during AI’s re-emergence used the human immune system as inspiration. Artificial Immune Systems (or AIS) use principles of the immune system and the characteristics that it exhibits for problem solving in the domains of optimization, pattern recognition, and data mining. A very novel application of AIS is in computational security. The human body reacts to the presence of infections through the release of antibodies which destroy those infectious substances. Networks of computers can perform the same function, for example, in the domain of network security. If a software virus is found on a computer within a given network,
  • 34. 12 Artificial Intelligence other “antibody” programs can be dispatched to contain and destroy those viruses. Biology continues to be a major source of inspiration for solutions to many types of problems. Agent Systems Agents, which are also referred to as intelligent agents or software agents, are a very important element of modern-day AI. In many ways, agents are not an independent aspect of but instead a vehicle for AI applications. Agents are applications that exhibit characteristics of intelligent behavior (such as learning or classification), but are not in themselves AI techniques. There also exists other agent-based methods such as agent-oriented computing and multi-agent systems. These apply the agent metaphor for solving a variety of problems. One of the most popular forms of intelligent agents is “agency” applications. The word agency is used because the agent represents a user for some task that it performs for the user. An example includes a scheduling application. Agents representing users intelligently negotiate with one another to schedule activities given a set of constraints for each user. The concept of agents has even been applied to the operation of a deepspace spacecraft. In 1999 NASA integrated what was called the “Remote Agent” into the Deep Space 1 spacecraft. Deep Space 1’s goal was to test a number of high-risk technologies, one of which was an agent that was used to provide autonomy to the spacecraft for limited durations of time. The Remote Agent employed planning techniques to autonomously schedule experiments based on goals defined by ground operators. Under constrained conditions, the Remote Agent succeeded in proving that an intelligent agent could be used to autonomously manage a complicated probe and satisfy predefined objectives. Today you’ll find agents in a number of areas, including distributed systems. Mobile agents are independent agents that include autonomy and the ability to travel amongst nodes of a network in order to perform their processing. Instead of the agent communicating with another agent remotely, the mobile agent can travel to the other agent’s location and communicate with it directly. In disconnected network situations, this can be very beneficial. You can learn more about intelligent agents (including mobile agents) in Chapter 11. AI INTER-DISCIPLINARY R&D In many cases, AI research tends to be fringe research, particularly when it’s focused on Strong AI. But what’s notable about research in AI is that the algorithms tend to find uses in many other disciplines beyond that of
  • 35. The History of AI 13 AI. AI research is by no means pure research, but its applications grow well beyond the original intent of the research. Neural networks, data mining, fuzzy logic, and Artificial Life (for example) have found uses in many other fields. Artificial Life is an interesting example because the algorithms and techniques that have resulted from research and development have found their way into the entertainment industry (from the use of swarming in animated motion pictures to the use of AI in video games). Rodney Brook’s has called this the AI effect, suggesting that another definition for AI is “almost implemented.” This is because once an AI algorithm finds a more common use, it’s no longer viewed as an AI algorithm but instead just an algorithm that’s useful in a given problem domain. SYSTEMS APPROACH In this book, the majority of the algorithms and techniques are studied from the perspective of the systems approach. This simply means that the algorithm is explored in the context of inputs and outputs. No algorithm is useful in isolation, but instead from the perspective of how it interacts with its environment (data sampling, filtering, and reduction) and also how it manipulates or alters its environment. Therefore, the algorithm depends on an understanding of the environment and also a way to manipulate the environment. This systems approach illustrates the practical side of artificial intelligence algorithms and techniques and identifies how to ground the method in the real world (see Figure 1.1). As an example, one of the most interesting uses of AI today can be found in game systems. Strategy games, for example, commonly occupy a map with two or more opponents. Each opponent competes for resources in the environment in order to gain the upper hand over the other. While collecting resources, each opponent can schedule the development of assets to be used to defeat the other. When multiple assets exist for an opponent (such as a military unit), they can be applied in unison, or separately to lay siege on another opponent. Where strategy games depend on a higher-level view of the environment (such as would be viewed from a general), first-person shooter games (FPS) take a lower-level view (from that of a soldier). An agent in an FPS depends most often on its view of the battlefield. The FPS agent’s view of the environment is at a much lower level, understanding cover, objectives, and local enemy positions. The environment is manipulated by the FPS agent through its own movement, attacking or defending from enemies (through finding cover), and possibly communicating with other agents.
  • 36. 14 Artificial Intelligence An obvious example of the systems approach is in the field of robotics. Mobile robots, for example, utilize an array of sensors and effects that make up the physical robot. At the core of the robot is one or more algorithms that yield rational behavior. FIGURE 1.1 The systems approach to Artificial Intelligence.
  • 37. The History of AI 15 In each case, the AI algorithm that’s chosen is the core of an agent’s sensors (inputs) and effectors (outputs). For this reason, the algorithm can’t truly be useful or understood unless it’s considered from its place in the environment. OVERVIEW OF THIS BOOK This book covers a wide range of AI techniques, each segmented appropriately into their particular genre. The following chapter summaries present the ideas and methods that are explored. Uninformed Search In the early days of AI, AI was a search, whether search involved looking for a plan, or through the various moves that are possible (and subsequent moves) in a game of Checkers. In this chapter on uninformed (or blind) search, the concept of search in various spaces is introduced, the representation of spaces for search, and then the various popular algorithms used in blind search are explored. This includes depth-first, breadth-first, uniform-cost- search, and others. Informed Search Informed search is an evolution of search that applies heuristics to the search algorithm, given the problem space, to make the algorithm more efficient. This chapter covers best-first, a star, hill climbing, simulated annealing, tabu search, and constraint satisfaction. AI and Games One of the earliest uses of blind and informed search was in the application to games. Games such as Checkers and Chess were believed to be an intelligent activity, and if a computer could be endowed with the ability to play a game and win against a human opponent, it could be considered intelligent. Samuel’s Checkers program demonstrated a program that could defeat its creator, and while a feat, this experiment did not produce an intelligent computer except within the domain of Checkers. This chapter explores two-player games and the core of many game-playing systems, the minimax algorithm. A variety of games are then discussed, from the classical games such as Chess, Checkers, and Go to video game AI, exploring movement, behavior, team, and real-time strategy AI.
  • 38. 16 Artificial Intelligence Knowledge Representation Knowledge representation has a long history in AI, particularly in Strong AI research. The goal behind knowledge representation is to find abstractions for knowledge that result in a base of knowledge that’s useful to a given application. For example, knowledge must be represented in a way that makes it easy for a computer to reason with it and understand the relationships between elements of the knowledge base. This chapter will provide an introduction to a number of fundamental knowledge representation techniques as well as introduce the ideas behind predicate and first-order logic to reason with knowledge. Machine Learning Machine learning is best described as learning from example. Machine learning incorporates a variety of methods such as supervised and unsupervised learning. In supervised learning, a teacher is available to define correct or incorrect responses. Unsupervised learning differs in that no teacher is present. (Instead, unsupervised learning learns from the data itself by identifying its) relationships. This chapter provides an introduction to machine learning, and then explores a number of machine learning algorithms such as decision trees and nearest neighbor learning. Evolutionary Computation Evolutionary computation introduced the idea of scruffy approaches to AI. Instead of focusing on the high level, trying to imitate the behavior of the human brain, scruffy approaches start at a lower level trying to recreate the more fundamental concepts of life and intelligence using biological metaphors. This chapter covers a number of the evolutionary methods including genetic algorithms, genetic programming, evolutionary strategies, differential evolution, and particle swarm optimization. Neural Networks I While neural networks are one of the earliest (and more controversial) techniques, they remain one of the most useful. The attack on neural networks severely impacted AI funding and research, but neural networks re-emerged from AI’s winter as a standard for classification and learning. This chapter introduces the basics of neural networks, and then explores the supervised neural network algorithms (least-mean-squares, backpropagation, probabilistic neural networks, and others). The chapter
  • 39. The History of AI 17 ends with a discussion of neural network characteristics and ways to tune them given the problem domain. Neural Networks II Where the previous chapter explored supervised neural network algorithms, this chapter provides an introduction to the unsupervised variants. Unsupervised algorithms use the data itself to learn without the need for a “teacher.” This chapter explores unsupervised learning algorithms, including Hebbian learning, Simple Competitive Learning, k-Means Clustering, Adaptive Resonance Theory, and the Hopfield auto- associative model. Intelligent Agents Intelligent (or Software) Agents are one of newest techniques in the AI arsenal. In one major definition, agents are applications that include the concept of “agency.” This means that those applications represent a user and satisfy the goals of the task autonomously without further direction from the user. This chapter on intelligent agents will introduce the major concepts behind intelligent agents, their architectures and applications. Biologically Inspired and Hybrid Models AI is filled with examples of the use of biological metaphors, from early work in neural networks to modern-day work in artificial immune systems. Nature has proven to be a very worthy teacher for complex problem solving. This chapter presents a number of techniques that are both biologically inspired as well as hybrid (or mixed) models of AI. Methods such as artificial immune systems, simulated evolution, Lindenmayer systems, fuzzy logic, genetically evolved neural networks, and ant colony optimization are explored, to name a few. Languages of AI While most people think of LISP when considering the languages of AI, there have been a large number of languages developed specifically for AI application development. In this chapter, a taxonomy of computer languages is presented followed by short examples (and advantages) of each. Then a number of AI-specific languages are investigated, exploring their history and use through examples. Languages explored include LISP, Scheme, POP-11, and Prolog.
  • 40. 18 Artificial Intelligence CHAPTER SUMMARY The history of AI is a modern-day drama. It’s filled with interesting characters, cooperation, competition, and even deception. But outside of the drama, there has been exceptional research and in recent history an application of AI’s ideas in a number of different settings. AI has finally left the perception of fringe research and entered the realm of accepted research and practical development. REFERENCES [LISP 2007] Wikipedia “Lisp (programming language)”, 2007. Available online at http://en.wikipedia.org/wiki/Lisp_%28programming_ language%29 [Newell 1956] Newell, A., Shaw, J.C., Simon, H.A “Emperical Explorations of the Logic Theory Machine: A Case Study in Heuristics,” in Proceedings of the Western Joint Computer Conference, 1956. [Shannon 1950] Shannon, Claude, “Programming a Computer for Playing Chess,” Philisophical Magazine 41, 1950. RESOURCES Rayman, Marc D., et al “Results from the Deep Space 1 Technology Validation Mission,” 50th International Astronomical Congress, Amsterdam, The Netherlands, 1999. de castr, Leandro N., Timmis, Jonathan Artificial Immune Systems: A New Computational Intelligence Approach Springer, 2002. Holland, John Adaptation in Natural and Artificial Systems. University of Michigan Press, Ann Arbor, 1975. McCarthy, John “Recursive Functions of Symbolic Expressions and their Computation by Machine (Part I),” Communications of the ACM, April 1960. Shortliffe, E.H. “Rule-based Exper Systems: The Mycin Experiments of the Stanford Heuristic Programming Project,” Addison-Wesley, 1984. Winograd, Terry “Procedures as a Representation for Data in a Computer Program for Understanding Natural Language,” MIT AI Technical Report 235, February 1971. Woods, William A. “Transition Network Grammars for Natural Language Analysis,” Communications of the ACM 13:10, 1970.
  • 41. The History of AI 19 EXERCISES 1. In your own words, define intelligence and why intelligence tests can hide the real measure of intelligence. 2. What was the Turing test, and what was it intended to accomplish? 3. Why were games the early test-bed for AI methods? How do you think AI and games are viewed today? 4. How did Arthur Samuel set the bar for learning programs in the 1950s? 5. What was the first language developed specifically for AI? What language followed in the 1970s, developed also for AI? 6. Define Strong AI. 7. What event is most commonly attributed to leading to AI’s winter? 8. What is meant by Scruffy and Neat approaches to AI? 9. After AI’s winter, what was most unique about AI’s re-emergence? 10. This book explores AI from the systems approach. Define the systems approach and how this perspective is used to explore AI.
  • 43. C h a p t e r UNINFORMED SEARCH 2 U ninformed search, also called blind search and naïve search, is a class of general purpose search algorithms that operate in a brute- force way. These algorithms can be applied to a variety of search problems, but since they don’t take into account the target problem, are inefficient. In contrast, informed search methods (discussed in Chapter 3) use a heuristic to guide the search for the problem at hand and are therefore much more efficient. In this chapter, general state space search is explored and then a variety of uninformed search algorithms will be discussed and compared using a set of common metrics. SEARCH AND AI Search is an important aspect of AI because in many ways, problem solving in AI is fundamentally a search. Search can be defined as a problem-solving technique that enumerates a problem space from an initial position in search of a goal position (or solution). The manner in which the problem space is searched is defined by the search algorithm or strategy. As search strategies offer different ways to enumerate the search space, how well a strategy works is based on the problem at hand. Ideally, the search algorithm selected is one whose characteristics match that of the problem at hand.
  • 44. 22 Artificial Intelligence CLASSES OF SEARCH Four classes of search will be explored here. In this chapter, we’ll review uninformed search, and in Chapter 3, informed search will be discussed. Chapter 3 will also review constraint satisfaction, which tries to find a set of values for a set of variables. Finally, in Chapter 4, we’ll discuss adversarial search, which is used in games to find effective strategies to play and win two-player games. GENERAL STATE SPACE SEARCH Let’s begin our discussion of search by first understanding what is meant by a search space. When solving a problem, it’s convenient to think about the solution space in terms of a number of actions that we can take, and the new state of the environment as we perform those actions. As we take one of multiple possible actions (each have their own cost), our environment changes and opens up alternatives for new actions. As is the case with many kinds of problem solving, some paths lead to dead-ends where others lead to solutions. And there may also be multiple solutions, some better than others. The problem of search is to find a sequence of operators that transition from the start to goal state. That sequence of operators is the solution. How we avoid dead-ends and then select the best solution available is a product of our particular search strategy. Let’s now look at state space representations for three problem domains. Search in a Physical Space Let’s consider a simple search problem in physical space (Figure 2.1). Our initial position is ‘A’ from which there are three possible actions that lead to position ‘B,’ ‘C,’ or ‘D.’ Places, or states, are marked by letters. At each place, there’s an opportunity for a decision, or action. The action (also called an operator) is simply a legal move between one place and another. Implied in this exercise is a goal state, or a physical location that we’re seeking. This search space (shown in Figure 2.1) can be reduced to a tree structure as illustrated in Figure 2.2. The search space has been minimized here to the necessary places on the physical map (states) and the transitions that are possible between the states (application of operators). Each node in the tree is a physical location and the arcs between nodes are the legal moves. The depth of the tree is the distance from the initial position.
  • 45. Uninformed Search 23 Search in a Puzzle Space The “Towers of Hanoi” puzzle is an interesting example of a state space for solving a puzzle problem. The object of this puzzle is to move a number of disks from one peg to another (one at a time), with a number of constraints that must be met. Each disk is of a unique size and it’s not legal for a larger disk to sit on top of a smaller disk. The initial state of the puzzle is such that all disks begin on one peg in increasing size order (see Figure 2.2). Our goal (the solution) is to move all disks to the last peg. As in many state spaces, there are potential transitions that are not legal. For example, we can only move a peg that has no object above it. Further, we can’t move a large disk onto a smaller disk (though we can move any disk FIGURE 2.1: A search problem represented as a physical space. FIGURE 2.2: Representing the physical space problem in Figure 2.1 as a tree.
  • 46. 24 Artificial Intelligence to an empty peg). The space of possible operators is therefore constrained only to legal moves. The state space can also be constrained to moves that have not yet been performed for a given subtree. For example, if we move a small disk from Peg A to Peg C, moving the same disk back to Peg A could be defined as an invalid transition. Not doing so would result in loops and an infinitely deep tree. Consider our initial position from Figure 2.3. The only disk that may move is the small disk at the top of Peg A. For this disk, only two legal moves are possible, from Peg A to Peg B or C. From this state, there are three potential moves: 1. Move the small disk from Peg C to Peg B. 2. Move the small disk from Peg C to Peg A. 3. Move the medium disk from Peg A to Peg B. The first move (small disk from Peg C to Peg B), while valid is not a potential move, as we just moved this disk to Peg C (an empty peg). Moving it a second time serves no purpose (as this move could have been done during the prior transition), so there’s no value in doing this now (a heuristic). The second move is also not useful (another heuristic), because it’s the reverse of the FIGURE 2.3: A search space for the “Tower of Hanoi” puzzle.
  • 47. Uninformed Search 25 previous move. This leaves one valid move, the medium disk from Peg A to Peg B. The possible moves from this state become more complicated, because valid moves are possible that move us farther away from the solution. TIP A heuristic is a simple or efficient rule for solving a given problem or making a decision. When our sequence of moves brings us from the initial position to the goal, we have a solution. The goal state in itself is not interesting, but instead what’s interesting is the sequence of moves that brought us to the goal state. The collection of moves (or solution), done in the proper order, is in essence a plan for reaching the goal. The plan for this configuration of the puzzle can be identified by starting from the goal position and backtracking to the initial position. Search in an Adversarial Game Space An interesting use of search spaces is in games. Also known as game trees, these structures enumerate the possible moves by each player allowing the search algorithm to find an effective strategy for playing and winning the game. NOTE The topic of adversarial search in game trees is explored in Chapter 4. Consider a game tree for the game of Chess. Each possible move is provided for each possible configuration (placement of pieces) of the Chess board. But since there are 10120 possible configurations of a Chess board, a game tree to document the search space would not be feasible. Heuristic search, which must be applied here, will be discussed in Chapter 3. Let’s now look at a much simpler game that can be more easily represented in a game tree. The game of Nim is a two-player game where each player takes turns removing objects from one or more piles. The player required to take the last object loses the game. Nim has been studied mathematically and solved in many different variations. For this reason, the player who will win can be calculated based upon the number of objects, piles, and who plays first in an optimally played game. NOTE The game of Nim is said to have originated in China, but can be traced to Germany as the word nimm can be translated as take. A complete mathematical theory of Nim was created by Charles Bouton in 1901. [Bouton 1901]
  • 48. 26 Artificial Intelligence Let’s walk through an example to see how Nim is played. We’ll begin with a single small pile to limit the number of moves that are required. Figure 2.4 illustrates a short game with a pile of six objects. Each player may take one, two, or three objects from the pile. In this example, Player-1 starts the game, but ends the game with a loss (is required to take the last object which results in a loss in the misère form of the game). Had Player-1 taken 3 in its second move, Player-2 would have been left with one resulting in a win for Player-1. A game tree makes this information visible, as illustrated in Figure 2.5. Note in the tree that Player-1 must remove one from the pile to continue the game. If Player-1 removes two or three from the pile, Player-2 can win if playing optimally. The shaded nodes in the tree illustrate losing positions for the player that must choose next (and in all cases, the only choice left is to take the only remaining object). Note that the depth of the tree determines the length of the game (number of moves). It’s implied in the tree that the shaded node is the final move to be made, and the player that makes this move loses the game. Also note the size of the tree. In this example, using six objects, a total of 28 nodes is required. If we increase our tree to illustrate a pile of seven objects, the tree increases to 42 nodes. With eight objects, three balloons to 100 nodes. Fortunately, the tree can be optimized by removing duplicate subtrees, resulting in a much smaller tree. FIGURE 2.4: A sample game of Nim with a pile of six objects.
  • 49. Uninformed Search 27 TREES, GRAPHS, AND REPRESENTATION A short tour of trees and graphs and their terminology is in order before exploring the various uninformed search methods. A graph is a finite set of vertices (or nodes) that are connected by edges (or arcs). A loop (or cycle) may exist in a graph, where an arc (or edge) may lead back to the original node. Graphs may be undirected where arcs do not imply a direction, or they may be directed (called a digraph) where a direction is implicit in the arc. An arc can also carry a weight, where a cost can be associated with a path. Each of these graphs also demonstrates the property of connectivity. Both graphs are connected because every pair of nodes is connected by a path. If every node is connected to every node by an arc, the graph is complete. One special connected graph is called a tree, but it must contain no cycles. Building a representation of a graph is simple and one of the most common representations is the adjacency matrix. This structure is simply FIGURE 2.5: A complete Nim game tree for six objects in one pile. FIGURE 2.6: An example of an undirected graph containing six nodes and eight arcs. FIGURE 2.7: An example of a directed graph containing six edges and nine arcs.
  • 50. 28 Artificial Intelligence an N by N matrix (where N is the number of nodes in the graph). Each element of the matrix defines a connectivity (or adjacency) between the node referenced as the row and the node referenced as the column. Recall the undirected graph in Figure 2.6. This graph contains six nodes and eight arcs. The adjacency matrix for this undirected graph is shown in Figure 2.9. The two dimensions of the graph identify the source (row) and destination nodes (column) of the graph. From Figure 2.6, we know that node A is adjacent to nodes B, C, and D. This is noted in the adjacency matrix with a value of one in each of the B, C, and D columns for row A. Since this is an undirected graph, we note symmetry in the adjacency matrix. Node A connects to node B (as identified in row A), but also node B connects to node A (as shown in row B). For a directed graph (as shown in Figure 2.7), the associated adjacency matrix is illustrated in Figure 2.10. Since the graph is directed, no symmetry can be found. Instead, the direction of the arcs is noted in the matrix. For example, node B connects to node A, but node A has no associated connection to node B. An interesting property of the adjacency matrix can be found by reviewing the rows and columns in isolation. For example, if we review a single row, we can identify the nodes to which it connects. For example, row C shows only a connection to node F (as indicated by the one in that cell). But if we review the column for node C, we find the nodes that have arcs connecting to node C. In this case, we see nodes A, D, and E (as illustrated graphically in Figure 2.7). We can also find whether a graph is complete. If the entire matrix is non-zero, then the graph is complete. It’s also simple to find a disconnected graph (a node whose row and column contain zero values). Loops in a graph can also be algorithmically discovered by enumerating the matrix (recursively FIGURE 2.8: A connected graph with no cycles (otherwise known as a tree).
  • 51. Uninformed Search 29 following all paths looking for the initial node). In the simple case, the values of the adjacency matrix simply define the connectivity of nodes in the graph. In weighted graphs, where arcs may not all be equal, the value in a cell can identify the weight (cost, or distance). We’ll explore examples of this technique in the review of neural network construction (Chapter 11). Adjacency lists are also a popular structure where each node contains a list of the nodes to which it connects. If the graph is sparse, this representation can require less space. UNINFORMED SEARCH The uninformed search methods offer a variety of techniques for graph search, each with its own advantages and disadvantages. These methods are explored here with discussion of their characteristics and complexities. Big-O notation will be used to compare the algorithms. This notation defines the asymptotic upper bound of the algorithm given the depth (d) of the tree and the branching factor, or the average number of branches (b) from each node. There are a number of common complexities that exist for search algorithms. These are shown in Table 2.1. Table 2.1: Common orders of search functions. O-Notation Order O(1) Constant (regardless of the number of nodes) FIGURE 2.9: Adjacency matrix for the undirected graph shown in Figure 2.6. FIGURE 2.10: Adjacency matrix for the directed graph (digraph) shown in Figure 2.7.
  • 52. 30 Artificial Intelligence O(n) Linear (consistent with the number of nodes) O(log n) Logarithmic O(n2 ) Quadratic O(cn ) Geometric O(n!) Combinatorial Big-O notation provides a worst-case measure of the complexity of a search algorithm and is a common comparison tool for algorithms. We’ll compare the search algorithms using space complexity (measure of the memory required during the search) and time complexity (worst-case time required to find a solution). We’ll also review the algorithm for completeness (can the algorithm find a path to a goal node if it’s present in the graph) and optimality (finds the lowest cost solution available). Helper APIs A number of helper APIs will be used in the source code used to demonstrate the search functions. These are shown below in Listing 2.1. LISTING 2.1: Helper APIs for the search functions. /* Graph API */ graph_t *createGraph (int nodes ); void destroyGraph (graph_t *g_p ); void addEdge (graph_t *g_p, int from, int to, int value ); int getEdge (graph_t *g_p, int from, int to ); /* Stack API */ stack_t *createStack (int depth ); void destroyStack (stack_t *s_p ); void pushStack (stack_t *s_p, int value ); int popStack (stack_t *s_p ); int isEmptyStack (stack_t *s_p ); /* Queue API */ queue_t *createQueue (int depth ); void destroyQueue (queue_t *q_p ); void enQueue (queue_t *q_p, int value ); int deQueue (queue_t *q_p ); int isEmptyQueue (queue_t *q_p ); /* Priority Queue API */ pqueue_t *createPQueue (int depth );
  • 53. Uninformed Search 31 void destroyPQueue (pqueue_t *q_p ); void enPQueue (pqueue_t *q_p, int value, int cost ); void dePQueue (pqueue_t *q_p, int *value, int *cost ); int isEmptyPQueue (pqueue_t *q_p ); int isFullPQueue (pqueue_t *q_p ); O N THE C D The helper functions can be found on the CD-ROM at ./software/ common. General Search Paradigms Before we discuss some of the uninformed search methods, let’s look at two simple general uninformed search methods. The first is called ‘Generate and Test.’ In this method, we generate a potential solution and then check it against the solution. If we’ve found the solution, we’re done, otherwise, we repeat by trying another potential solution. This is called ‘Generate and Test’ because we generate a potential solution, and then test it. Without a proper solution, we try again. Note here that we don’t keep track of what we’ve tried before; we just plow ahead with potential solutions, which is a true blind search. Another option is called ‘Random Search’ which randomly selects a new state from the current state (by selecting a given valid operator and applying it). If we reach the goal state, then we’re done. Otherwise, we randomly select another operator (leading to a new state) and continue. Random search and the ‘Generate and Test’ method are truly blind methods of search. They can get lost, get caught in loops, and potentially never find a solution even though one exists within the search space. Let’s now look at some search methods that while blind, can find a solution (if one exists) even if it takes a long period of time. Depth-First Search (DFS) The Depth-First Search (DFS) algorithm is a technique for searching a graph that begins at the root node, and exhaustively searches each branch to its greatest depth before backtracking to previously unexplored branches (Figure 2.11 illustrates this search order). Nodes found but yet to be reviewed are stored in a LIFO queue (also known as a stack). NOTE A stack is a LIFO (Last-In-First-Out) container of objects. Similar to a stack of paper, the last item placed on the top is the first item to be removed.
  • 54. 32 Artificial Intelligence The space complexity for DFS is O(bd) where the time complexity is geometric (O(bd )). This can be very problematic on deep branching graphs, as the algorithm will continue to the maximum depth of the graph. If loops are present in the graph, then DFS will follow these cycles indefinitely. For this reason, the DFS algorithm is not complete, as cycles can prohibit the algorithm from finding the goal. If cycles are not present in the graph, then the algorithm is complete (will always find the goal node). The DFS algorithm is also not optimal, but can be made optimal using path checking (to ensure the shortest path to the goal is found). O N THE C D The DFS implementation can be found on the CD-ROM at ./software/ ch2/dfs.c. Graph algorithms can be implemented either recursively or using a stack to maintain the list of nodes that must be enumerated. In Listing 2.2, the DFS algorithm is implemented using a LIFO stack. Listing 2.2: The depth-first search algorithm. #include <stdio.h> #include “graph.h” #include “stack.h” #define A 0 #define B 1 FIGURE 2.11: Search order of the DFS algorithm over a small tree.
  • 55. Exploring the Variety of Random Documents with Different Content
  • 56. revolutionist to join in the general pursuit, with a big oath, and the cry of "Vive la Republique! à bas les tyrans!" Now again, late in the evening, hurries past a detachment of National Guards. We ask, what now is afloat in a city where every day something new and startling crosses our life's path. We are told that the citizen troops are hastening to the rescue of a newspaper editor, who has ventured to write articles in opposition to the Government. His house is being stormed by an angry and excited mob; they threaten to break his presses, if not burn the whole establishment. In vain he meets the mob with courage, and asserts the right of that "liberty of opinion," which the republic has proclaimed as one of its first benefits. He is not listened to. What is liberty of opinion, or any liberty, in the sense of a mob, compared with its own liberty of doing what it listeth? They advance upon the house with threatening gesture—they pour in: the National Guards arrive, and a scuffle ensues. With difficulty the mob is driven back, and sentinels are posted. But now the crowds, in the dim night, grow thicker on the Boulevards than ever; and violent declamation is still heard from the midst against the man who, whatever be his real ends and aims, has the courage to assert an opinion contrary to the mass. Partisans there are, for and against: and high words arise, and threats are again proffered: and along the damp night air comes ever the murmur of many angry voices far and near: and the rumour ceases not, the crowd disperse not. And in the distracted city, where was firing, and shouting, and singing, and drumming, all day, there is still the agitation and the tumult long and late into the night. But let us take a turn to the neighbourhood of the Hotel de Ville, the seat of the Government; other fresh scenes will there meet our eyes. Daily and hourly pour up into the open space before the fine old building, such troops of drumming, banner-bearing men and women as have been before described. Sometimes they are deputations from the various trades, full of all sorts of grievances, for which the members of the Provisional Government are expected to find immediate remedy;—sometimes they are bands of workmen, all
  • 57. couching, under different expressions, the demand for much pay and little work;—sometimes they bear addresses from various nations all speaking in the name of their country, which probably would disavow them;—sometimes they are delegates from the thousand and one clubs of Paris, who all choose to lay their resolutions, however frantic and impracticable they may be, before the Government, and expect to impose upon it their distracted will;— sometimes they are a body of individuals, who have got some fancy for a remedy of the financial crisis, which, of course, unless it would offend them bitterly, the Government is expected forthwith to adopt. Deputations, addresses, counsels, demands, exactions,—they must all be admitted, they must all be heard, they must all receive flattering promises, that probably never will, and never can be fulfilled. See! they come streaming up from all sides, from streets and quays, in noisy inundating floods; and now the streams mingle and roar together, and struggle for precedence. Generally, delegates are despatched to obtain audiences of the persecuted members of the Government; but sometimes, again, some tired minister or other is forced to appear in front, and harangue their importunate petitioners, amidst cries of "Vive la Republique!" For those who dwell upon this place, Paris must appear to be in a state of constant revolution. The noise, the tumult, the drumming, the shouting, the marching and the countermarching, never cease for a moment. See! to-day there is a tumult before the façade of the old building. Battalions of National Guards have marched up, without arms, to protest against a despotic and arbitrary ordinance of an ambitious and reckless minister. They bring up their petition as thousands of other deputations have brought up theirs; the square is filled for the most part with long military-looking lines of their uniforms. But in a sudden, they have come to a check. Before the long façade of the line of building, are posted bodies of armed men, of the lower classes, with muskets charged and bayonets fixed. The demonstration of the National Guards, who dare to murmur at the will of their governors, spite of the proclamation of the reign of liberty, is not to be received. Anger and indignation is on the faces of
  • 58. all the citizen-soldiers; their feelings are excited; they cry, "down with" the obnoxious minister; they are met by cries from the armed people, of "down with the National Guards! down with the aristocrats!" The middling classes are now considered, then, as the aristocrats of the day; and the people treat them, as they have treated, in days gone by, the titled noblesse—as enemies! But now they advance in rank and file, determined to force an entrance to the Government palace: and the people oppose them with pointed bayonets; and drive them back; disperse them like sheep; pursue them down the quays; and the unarmed mob, collected in countless crowds around, joins in the cry of "down with the National Guards!" The National Guards are vanquished. They were considered in the revolutionary days of combat as the heroes, and allies, and defenders of the people. Only a few weeks are gone by since then; and they, in turn, are overthrown in a bloodless revolution. Their prestige is lost for ever. The last barrier is thrown down between the upper and the lower classes—the breakwater is swept away: and when the day of storm and tempest shall come, when the angry waters shall rise, when the inundation shall sweep on and on in tumultuous tide, what shall there be now to oppose it? On the morrow, what a scene! From a very early hour of the morning, bands of hundreds and of thousands, in marching order, have poured down upon Paris from all the suburbs. From north, south, east, and west, they have come in countless hordes into the central streets and squares of the capital. Along the Boulevards, from the Bastile, from the heights of Montmartre, down the avenues of the Champs Elysées and the quays—from beyond the water and the Faubourg St Martel, they have come, sweeping on like so many mountain torrents. Every where as they advanced they have proferred cries of "Down with the National Guards! down with the aristocrats! down with the legitimists! down with the enemies of the Republic!" Better dressed men in many instances have marshalled them on their way; and among the inhabitants of Paris goes forth a murmur, that they have been roused to this state of tumult by the accolytes of the obnoxious minister, with the intention of overawing
  • 59. his colleagues and displaying his own power. And if, in truth, they shout "long live" any one, it is his name they cry: his noble-hearted and more moderate colleague, lately so popular, has lost a people's favour. And now the hundred torrents have met upon the quays, and before the Hotel de Ville; and hundreds of banners with manifold inscriptions are waving in the air; and troop upon troop is marshalled into some degree of order: but fearful is the mass: awful is the demonstration of a people! And now the members of the Government are compelled, one and all, to come down upon the elevated terrace before the façade of the Hotel de Ville: they are behung with tricolor scarfs, the ends of which stream with long gold fringes; their heads are bared before their masters and the rulers of the land. And now the host of people defiles before them; and they make speeches, and cry "Vive la Republique! Vive le peuple!" And the people, proud of its force, and rejoicing in its demonstration, that shows its power over the bourgeois, answers with shouts that rend the air. Heavens! what a scene! This is Republican Paris, indeed, I trow! But come quickly to the Boulevards: the mighty mass has passed away to the column of liberty in the Place de la Bastile; and it will come down the Boulevards in overwhelming tide, exulting in its triumph. And now it comes. The long line, five abreast—there are nearly two hundred thousand in this great army—stretches on and on, almost from one end to the other of the immense central artery of the capital. It comes, and the chorus of the Marseillaise rolls like thunder along, dying away but to burst forth again. Hark! how it peels along the Boulevards! It comes, and the senses swim as the host goes by, marching on, and on, and on—confusing the sight with the incessant passing of such a stream of living beings, and its waving banners; deafening the ears with the menacing cries of "Down with the aristocrats!" and the discordant chorussing of confused patriotic songs—for the Marseillaise now gives way to the fearful Ca Ira. It comes, and it seems as if it never would end. Awful, indeed, is the display of a people's force, thus excited and inflamed by designing leaders! At last the mighty procession passed away,
  • 60. leaving consternation and alarm behind it. But think not that Paris resumes its usual aspect. The various bands break up at last, but they still parade the streets in several battalions: and the shouting and howling and singing cease not during the day. But the night of the same day is come, and all is not yet done. Not content with its triumph, the people demands that all Paris should honour it with a festival, whether it will or not. Down the Boulevards come the hordes again, slowly, and pausing as they came on: they are chanting, in measured notes, the words "Des lampions! des lampions!" amidst the cries of "Illuminate, or we break your windows! Down with the aristocrats!" Why all Paris should be illuminated, because it has pleased King People to make a demonstration, it would be too insolent to inquire. It is a fancy, a caprice—and autocrats will have fancies and caprices. It is the people's will; and, however fantastic or unreasonable, the will must be obeyed. "Des lampions! des lampions!" The monotonous chant is impressed upon the ears with stunning force, until you believe that you must retain it in your bewildered brain until your dying day. And as they come along, see how readily the will of the people is obeyed! There is no readiness so quick as the readiness of fear. Up and down, from above and from below, right and left, in long irregular lines, until the lines of light become more general and more regular—see the illumination bursts forth from the façades of all the houses. Windows are rapidly opened on every side, in sixth stories as on first floors, on every terrace, on every balcony; and lamps, lanterns, candles, pots of grease, all flaming, are thrust out at every one. See! how the light darts up and down like wildfire, dancing along the houses in the darkness of the night, with an increasing phosphoric flicker. You may mark the progress of the mob, as it goes farther on in dusky mass, and is lost to sight in the gloom, not only by the eternal monotonous cry that bids the inhabitants illuminate, coming from the distance, but by the gleaming track it leaves behind it like a gigantic, broad tail of fire. Presently all the Boulevards will be brightly lighted; and the gleams of the many thousand points of light will illuminate a thickly moving crowd of beings, that look like
  • 61. the uneasy spirits of some gloomy pandemonium. Fairy-like, however, has the magical illumination sprung forth at the people's bidding, and fairy-like does it flicker on all sides in the night. All the other principal streets are burning also on either side, like long bands of spangled stuff glittering in the sun. The Faubourg St Germain, suspected of legitimacy, has long since been the first to yield to threats, and demonstrate at its windows its supposed sympathy in a people's triumph; and to-morrow we shall be told by the republican papers, how Paris was in an ecstasy of joy—how all the population strove in zeal, with one accord, to fêter le peuple généreux—how spontaneous was this illumination of republican enthusiasm. Spontaneous was the feeling that dictated it, certainly; but it was the spontaneity of fear—the fear of the quietly-disposed in the face of a reckless and all-powerful mob! Let us turn now from the glittering illuminated streets. What is that unusual light, streaming dimly, and in blurred rays, across the damp night air, from the windows of the chapel of St Hyacinthe, attached to the church of the Assumption in the Rue St Honoré? In such a place, at such an hour, it has something ghastly and unearthly in its nature. And hark! from within there comes a noise of hoarse murmuring, which swells sometimes suddenly into discordant shouts, that are almost groans. The impression conveyed by both sight and sound is little like any that Paris, even on its murkiest nights, and under its most dismal veil, ever bestowed on you before. The unwary wanderer in Paris streets by night, in search of romance, may have had visions of theft, assassination, misery, crime, before his eyes, in the dark silent thoroughfares, but always visions of a most positive earthly nature; now he cannot help fancying himself transported into some old town of mystic Germany, with some fantastic, mysterious, unearthly, Hoffmannish deed going on near him. Are the headless dead, among the victims of a prior revolution, risen from their bloody vaults, to beckon unto their ghastly crew new victims of another? or are demons rejoicing in that once sanctified building, that the reign of men's most evil passions
  • 62. should have begun again in that disturbed and fermenting city? Such is the first impression the dim scene conveys. Do you ever remember such in other days? Let us follow those dark forms that are gliding across the court of the church, and mounting the steps of the illumined chapel. We enter; and the scene, although neither ghastly nor demoniac, is scarcely less strange than if spectres and demons had animated the interior. Faintly lighted by a few dripping candles is the long dismantled chapel; and damp, dreary, funereal- looking, is the whole scene. A dim crowd, in this "darkness visible," is fermenting, thronging, struggling, and pushing in the aisle. At the further end, in that vaulted semicircle where once stood the altar of the Lord, rises a complicated scaffolding behung with black cloth. With your imagination already excited, you may fancy the dark construction a death-scaffold for the execution of a criminal—it is only the death-scaffold of the social state of France. We are in the midst of a republican club. On the highest platform, occupying the space where was the altar, sit president and secretaries of the society—the new divinities of the consecrated building. Yes! the new divinities; for they arrogate to themselves the same right against which they declaimed as blasphemy in kings—the "right divine." You will not listen long before they tell you so; besides, their first maxim is, "La voix du peuple est la voix de Dieu." On the lower platform before them stand the orators. Hark to the doctrines that they promulgate for the subversion of all existing order in the country, amidst shouts and screams, and cries of violent opposition sometimes, but generally of applause. See! the haggard, lanky- haired republican youths, who have shouted out all their fury, give way to a quiet, respectable-looking old man, whose gray hairs glimmer faintly in the candle-light. A feeling of greater calm comes over you: you imagine, after all this "sound and fury, signifying nothing," his old head will pacify the hot, maddened blood of frantic boys. What does he say?—"Yes, the republic is one and indivisible— it is more than indivisible—it is God!" You shrink back disgusted. Can the rhapsody of republican fanaticism go further? Are these Christian men? or are they really evil unearthly beings in a human form? The confused scene around you is almost enough to make you think so.
  • 63. But real enough is the eternal clatter of the president's hammer on his table. He rolls his eyes furiously; he browbeats every orator who may not be of his own individual opinion, and dares to be "moderate" when he is "exalté;" and when your head aches—your heart has ached long ago—with the furious noise of the president's hammer, which you expect every moment to smash the table to pieces, you edge your way out of the dark fermenting crowd, and hurry forth, glad to breathe the purer air of heaven. Ferment there is ever enough now in the streets of Paris by night: it ceases not. There are throngs pouring in and out of all the various thousand-and-one republican clubs of Paris, like wasps about their nest; but it is in the dim night air, and not in the bright sunlight of day—in dirty coats and smocks, and not with bright wings and variegated bodies. The wasp, too, stings only when he is attacked— the republican wasps seek to attack that they may sting. The al fresco clubs also crowd the Boulevards, in the chance medley confusion of all men and all principles. But see! there is here again, in the Rue du Faubourg du Roule, a confusion of a still more complicated nature—the swarming in and out of the small district school-house is even more virulent than is usual. It is another night- scene, such as the old habitué of Paris never witnessed, certainly. What is occurring? Let us crowd in with the others. What a scene of frantic confusion! A crowd springing upon benches, howling, screeching, yelling. At the further end of the low room is a ruined gallery, in which stands, surrounded by his friends, a man dressed in a red scarf, with the red cap of liberty on his head: he has a pike in his hand, and he vainly endeavours to make himself heard by the excited crowd. For some time you will be unable to comprehend the nature of the scene: at last you discover that an ultra republican, of the most inflamed ideas, wants to establish a Jacobin club. A "Jacobin club!" There is terror in the very word, and in all the fearful recollections it conveys. But here the good sense of the artisans and small tradespeople of the district is against so appalling a reminiscence of a fatal time. "Down with the bonnet rouge!" they cry. "Down with the red scarf! No Jacobins! no Jacobins! their day is
  • 64. gone. No terror!" Thank God! there is some good sense still among the people. "Down with the president—away with him!" they cry. He doffs at last his blood-red Phrygian cap—they are not content: he doffs his blood-red scarf—they are not content: he lays aside his red cravat—they are not content: the pike—all—his very principles, probably, if they would have them. But no. They make a rush at last up into the "tribune;" they drive the would-be Jacobin and his friends down. In vain a small minority declares them all "aristocrats —paid agents of legitimacy"—I know not what republican names of reproach. The honest workmen thrust the party forth from their district school-house. They escort these objects of their contempt with ironical politeness to a side-door, bearing the candles they have seized from the tribune in their hands. The door is closed over the Jacobin party—a shout of triumph resounds. But in the street, before the school, is long a noisy throng. The good moon, although now and then obscured by passing clouds, shines kindly on it. She seems to smile more kindly upon those who have done a good deed, although a deed of suppressed violence, than on most of the distracted throngs she illumines in her course over the disturbed city. Good moon! would we could accept thy augury, and hope for holy calm! The scenes thou shinest upon cannot continue thus, 'tis true. A change must come—a change for the better or the worse. Heaven grant that our foreboding prove not true—that, when thou comest forth in thy fulness again, another month, thou mayest smile on better order, on calmer groups! Before we part company, old habitué of Paris, we must cast a glance at all the public buildings we pass. On all—public offices, columns, fountains, monuments, churches, dismantled palaces—on all alike floats the republican banner—on all are painted in broad characters the words, "Liberté, Egalité, Fraternité!" "Fraternité!" Vain word, when each man grows day by day more and more bitterly his neighbour's enemy. "Egalité!" Vain word again, and vain word ever, spite of the efforts of the rulers of France to bring down to one level all the intelligence, the talent, the feelings, and passions of human nature, that Providence, in its holy wisdom, has made so different and so
  • 65. unequal. "Liberté!" Vainest word of all! In the present state of things, there is constraint in every scheme, tyranny in every tendency, despotism in every doctrine. But enough. We will not begin to discuss and speculate upon the destinies of France. All this sketch would strive to do, is to convey an idea, however vague, of the present outward state of Republican Paris.
  • 66. THE SPANIARD IN SICILY. [5] The insatiable spider, who, after securing in her gossamer meshes ample store of flies for the day's consumption, again repairs, with unwarrantable greed, to the outer circles of the delicate network, in quest of fresh and superfluous victims, must not wonder if, on return to the heart of the citadel, she finds a rival Arachne busy in the larder, and either is expelled from her own cobweb, or suffers seriously in ejecting the intruder. At risk of offending his admiring biographer by so base a parallel, we compare Charles of Anjou to the greedy spider, and think him justly punished for his rash cupidity by the evils it entailed. This French count, who, although a king's brother, had no chance of a crown save through aggressive conquest, found himself, whilst still in the vigour of life, and as the result of papal favour, great good fortune, and of his own martial energy, sovereign of an extensive and flourishing realm. King of Southern Italy, Protector of the North, Count of Provence, Vicar of Tuscany, Senator of Rome, all-powerful with the Pope—whose word had then such weight that his friendship was worth an army, whilst from his malison men shrunk as from the dreaded and inextinguishable fire of Greece—Charles of Anjou was still unsatisfied. The royal spider had cast his web afar; it embraced wide possessions, with whose enjoyment he might well have been content, whose administration claimed his undivided attention. But on their verge an object glittered from which he could not avert his eyes, whose acquisition engrossed his every thought. "'Twas the clime of the East, 'twas the land of the sun," the gorgeous and romantic region so attractive to European conquerors. Doubtless, crusading zeal had some share in his oriental cravings; but ambition was his chief motor. He was willing enough to wrest Palestine from
  • 67. the infidel, but his plan of campaign led first to Constantinople. His notion was to seek at St Sophia's mosque the key of Christ's sepulchre. Whilst thus looking abroad and meditating distant conquest, Charles treated too lightly the projects of a prince, less celebrated, but younger and more crafty than himself, who silently watched the progress of events, and skilfully devised how best he might derive advantage from them. Pedro of Arragon, who had married Mainfroy's daughter, Constance, cherished pretensions to the crown of the Sicilies; and, ever since the year 1279, he had been intriguing with the chiefs of the Ghibellines, with a view to an invasion of Charles's dominions. He spoke publicly of Sicily as the inheritance of his children, and did not dissimulate his animosity to its actual ruler. Whilst Charles prepared a fleet for his Eastern expedition, Don Pedro assembled another in the harbour of Portofangos, and kept it in constant readiness to sail, but none knew whither. Its destination was suspected, however, by some; and the Pope, who entertained no doubt concerning it, demanded to know Pedro's intentions, whilst Philip III. of France, at the request of his uncle, Charles of Anjou, sent ambassadors to the Arragonese monarch to make a similar inquiry. The answer given is variously stated by the archives and chronicles of the time, as evasive, prevaricatory, and even as a direct falsehood. It left no doubt upon Charles's mind that mischief was meant him by the Spaniard. "I told you," he wrote to Philip, "that the Arragonese was a contemptible wretch." Unfortunately, he carried his contempt of his wily foe rather too far; he would not believe that so small a potentate, "un si petit prince," would dare attack him in Italy, but took for a strategem the avowal of his intentions that appears to have escaped Pedro, and thought his views were directed in reality to Provence, whither he accordingly despatched his eldest son. Meanwhile, Don Pedro lingered in port, in hopes of an insurrection in Sicily, which John of Procida and others of his Sicilian adherents were fomenting by every means in their power, until his position became positively untenable, so pressed was he with questions by different European powers, and even by his own great
  • 68. vassals. One of these, a rico hombre, by name the Count of Pallars, having publicly asked him, in the name of the Arragonese nobility, the object of his voyage, and whither it would lead, Don Pedro replied: "Count, learn that if my left hand knew what my right was about to do, I would instantly cut it off." And still he clung to the Catalan coast, always on the eve of departure, but never lifting an anchor, until the tidings, so long and ardently desired, at last reached his car. They were unaccompanied, however, by the popular summons and proffered sceptre he had sanguinely and confidently anticipated. But we are outstripping events, and must revert to the eloquent opening of M. de St Priest's fourth volume. "The name of Sicily is illustrious in history. If the reputation of a people had for sole foundation and measure the number of inhabitants, the extent of its territory, the duration of its influence, the Sicilians, impoverished by continual revolutions, decimated by sucessive tyrannies, more isolated from the general progress by their internal organisation, than from the mainland by their geographical position, would hold, perhaps, in the annals of the world, no more room than their island occupies on the map of Europe. But they need not fear oblivion: they have known glory,—and what glory touches, though but transitorily, for ever retains the mark. For individuals as for nations, it suffices that their lot be cast in those rare and splendid epochs whose contact ennobles every thing, which illuminate all things by their brilliancy, and stamp themselves indelibly upon the memory of the remotest generations. Happy who then lives, for he shall never die! Vast kingdoms, boundless regions, peopled by numerous races, powerful by material force, but intellectually vulgar, then yield in dignity and grandeur to the least nook of land, to some petty peninsula or remote island. Such was Greece, such also was Sicily, her rival, her competitor, and the asylum of her illustrious exiles. "In the middle ages there was no vestige of the ancient Trinacria—of that land of art and learning, the home of every branch of human knowledge—of that politic and warlike power which yielded to Rome
  • 69. and Carthage only when she had made them dearly pay a long- disputed victory—of that Sicily, in short, which Plato taught and Timoleon governed—which Archimedes defended and Theocritus sang. Formerly the whole island was covered with cities. In the thirteenth century, most of these had disappeared. Agrigentum could boast but the ruins of its colossus and temples. Syracuse still retained some shadow of past greatness: she was not yet reduced, as now, to the quarries whence she sprung; she had not yet become less than a ruin; but her splendour was extinct. Catania, overthrown by earthquakes, found it difficult again to rise. Nevertheless other Sicilian towns preserved their importance, and Christendom could not boast cities handsomer and more populous—more abounding in wealth and embellished by monuments—than commercial Messina and kingly Palermo." These two cities were at the time referred to the abode of luxury and pleasure. Messina, at once the market and the arsenal of the island, "portus et porta Siciliæ," as Charles of Anjou called it, was the principal posting-house upon the road from Europe to Asia, and was enriched by the constant passage of pilgrims and crusaders. Sumptuary laws were deemed necessary to repress the extravagance of a population whose women wore raiment of silk, then more precious than silver and gold, with tiaras upon their heads, encrusted with pearls and diamonds and other precious stones. Asia and Europe were there united; Catholics and Mussulmans lived side by side in peace and amity. In the streets, the Arab's burnous and the turban of the Moor moved side by side with priestly robe and cowl of monk. The pleasures there in vogue were no longer the simple and innocent ones vaunted by Virgil and Theocritus. It was a hotbed of debauchery, frequented by pirates, gamblers, and courtesans—a mart of commerce, whither traders of all nations repaired. Palermo, on the other hand, was the residence of kings. The Normans established there the seat of their power, inhabiting it constantly; and although the wandering life of Frederick of Swabia denied him a fixed abode, he loved Palermo the Happy, and dwelt there whenever able. Very different were the predilections
  • 70. of Charles of Anjou. He disliked Sicily as much as he loved Naples. By an effect, perhaps, of that love of contrast often found implanted in the human breast, his stern and sombre gaze took pleasure in the bright and joyous scenery of his continental dominions, which it could not derive from the more sad and serious beauties of the opposite island. Moreover, he held the Sicilians disaffected to his rule, and his hand was heavy upon them. Heavier still, doubtless, were those of his delegates and officers, who presumed upon his known dislike, and upon his preoccupation with schemes of foreign aggrandisement, to exceed the measure of oppression he prescribed and authorised. A very different course should have been adopted with a nation already abundantly prepared to detest their French masters. The antagonism of character was alone sufficient cause for mutual aversion. There was no point of sympathy between conquerors and conquered—nothing that could lead to friendly amalgamation. On the one hand, reserve, dissimulation, silence; on the other, an indiscreet frankness, vivacity, and noise. On both sides, a strong attachment to their native country, and conviction of its superiority over all others—a strong partiality for its language, usages, and customs—a sincere contempt for all differing from them. M. de St Priest, who strives earnestly, but not very successfully, to vindicate the memory of his countrymen of the thirteenth century, is still too veracious a historian not to admit that they treated with shameful insolence and rudeness a people whom the kindest treatment would with difficulty have induced to look kindly upon their conquerors. He is painfully anxious to make out a good case for those he calls his "brothers," (very old brothers by this time,) but succeeds so little to his satisfaction, that he is fain to throw himself on the mercy of his readers, by asking the rather illogical question, whether the crime of a few individuals is to be imputed to a nation, or even to a part of a nation? Then he enumerates some of the grievances which brought on the massacre known as the Vespers. "It is certain," he says, "that Charles of Anjou, not by himself, but by military chiefs, to whom he abandoned himself without reserve, abused of the means necessary to retain in subjection a people hostile to his cause, and whom that very excess
  • 71. of oppression might drive to shake off an iron yoke. He abused of the feudal prerogative which gave him right of controlling the marriages of the vassals of the crown, by compelling rich heiresses to marry his Provençal adherents, or by retaining in forced celibacy noble damsels whose inheritance the royal exchequer coveted." This is pretty well for a beginning, and enough to stir the bile of a more patient race than the Sicilians, even in an age when such acts of feudal tyranny were less startling and odious than they now would seem. But this is merely the first item. Charles also abused of an old law that existed both in Sicily and Spain, and which has been but recently abolished in the latter country. The law of the mesta gave the sheep of the royal domain right of range of all the pastures in the country, no matter who the proprietors. With this vexatious privilege Charles combined exorbitant monopolies. He compelled the rich landholders to take on lease his horses, flocks, cattle, bees, and fruit-trees, and to account to him for them every year at a fixed rate, even when disease decimated the animals, and the sirocco had withered and uprooted the trees and plants. And nothing was less rare, M. de St Priest acknowledges, than the personal ill-treatment of those who delayed to pay the impost, often twice levied upon the same persons, under pretence of chastising their unwillingness. Imprisonment, confiscation, and the bastinado, punished their indigence. The nefarious tricks played with the currency completed the measure of misery poured out upon the unhappy Sicilians. Like Alphonso X. of Castile, and most of the potentates of the period, Charles coined pieces of money with much alloy, which he named, after himself, Carlini d'oro, and exchanged them by force against the augustales, an imperial coinage of the purest gold. The public voice was loud against such tyranny and abuse, but it reached not the arrogant ears of the Beaumonts, the Morhiers, and other haughty Frenchmen who successively governed Sicily. The Bishop of Patti and brother John of Messina, complained to the Pope in presence of Charles himself. The king heard them in silence, but, after the pontifical audience, he had his accusers seized. Brother John was thrown into a dungeon, and the bishop only escaped prison by flight.
  • 72. Besides the heavy griefs above stated, other grounds of complaint, more or less valid, were alleged against Charles I. Amongst these, he was accused of persecuting highwaymen and banditti with overmuch rigour. The nations of southern Europe have ever had a sneaking tenderness for the knights of the road. He was also reproached with the abolition of certain dues, unjustly exacted in the ports of Patti, Cefalu, and Catania, by the bishops of those towns. M. de St Priest brands the Sicilians as barbarians for thus quarrelling with their own advantage. But it is a fair query how far Charles made the diminution of episcopal exactions a pretext for the increase of royal ones, and whether the draconic system adopted for the repression of evil-doers, may not have been occasionally availed of for the oppression of the innocent. Then the Sicilian nobles, lovers of pomp, show, and external distinctions, grumbled at the absence of a court; and this was in fact so weighty a grievance, that its removal might perhaps have saved Sicily for Charles, or at any rate have retarded the revolt, and given him time to prosecute his designs on the East. Palermo might have been conciliated by sending the Prince of Salerno to live there. A gay court, and the substitution of the heir to the throne for obscure and detested governors, would have made all the difference. Charles did not think of this, and moreover he had no great affection for his eldest son, "a prince of monkish piety, timid and feeble, although brave; a dull and pale copy of his uncle Louis IX., and whose faults and virtues were not altogether of a nature to obtain his father's sympathy. When speaking of the Prince of Salerno, the King of Naples sometimes called him 'That Priest!'" The strongest motive of discontent, however, the most real, and which placed the nobility and higher classes amongst the foremost of the disaffected, was the bestowal of all public offices upon foreigners. At the beginning of his reign Charles had left to Neapolitans and Sicilians all fiscal and judicial posts, lucrative to the holders and productive to him; the strangers who accompanied him, ignorant of the country, would not have known how to squeeze it properly, as did Gezzolino della Marra, Alaimo de Lentini, Francesco Loffredo, and other natives. In these he reposed confidence, and, even after the defeat of Conradin, he still
  • 73. left Sicilians in the places of Maestri razionali, Segreti, Guidizieri, &c. But about 1278, we find Italian names disappearing from the list, and replaced almost entirely by those of Provençals and Frenchmen. At that date there seems to have been a clean sweep made of the aborigines. Such a measure was sure to cause prodigious dissatisfaction and hatred to the government. Those who depended on their places were reduced to beggary, and those who had private fortunes regretted a state of things which swelled these, besides giving them influence and power. To the latter class belonged Alaimo de Lentini, one of the richest and best born of the Sicilian barons, possessed of great political and military talents. He had served Mainfroy, had quarrelled with and been proscribed by him, and then, espousing the interests of Charles, had shown himself an implacable persecutor of his countrymen. His good qualities were frequently clouded and neutralised by his versatility and evil passions; his life was a mingled yarn of noble actions and frequent treachery. Left to himself, he might have bequeathed a higher reputation to his descendants, but he was led astray by the evil influence of his wife. He was already in the decline of life when he married this woman, who was of plebeian birth and Jewish origin, but the widow of Count Amico, one of the principal nobles of Sicily. Her name was Maccalda Scaletta, and soon she obtained complete empire over Alaimo. Of dissolute morals, ironical wit, and of an insolent and audacious character, that feared nothing and braved every thing, Maccalda's youth had been more adventurous than reputable, and amongst other pranks she had rambled over all Sicily in the disguise of a Franciscan monk. Her love of pleasure was not more insatiable than her vanity, and she eagerly desired to figure in the first rank at a court. So long as Alaimo retained the high office of chief magistrate of Sicily, her gratified pride allowed him to remain a faithful subject: but towards the year 1275, Charles of Anjou suspected and dismissed him, and thenceforward Alaimo, instigated by his wife, was the mortal enemy of the French. He joined the intrigue set on foot by John of Procida
  • 74. in favour of the King of Arragon, and laboured efficiently in the cause of his new patron. M. de St Priest does not himself narrate the oft-told tale of the Sicilian Vespers, but gives the accounts of Saba Malaspina and Bartolomeo de Neocastro, asserting that of the former writer to be the most correct, as it is certainly the most favourable to the French. He then enters into a long argument on points of no great importance; his logic being principally directed to show that if the French fell an easy prey to the infuriated Sicilians, it was through no lack of courage on their part, but because they were unarmed, surprised, and overmatched. He also takes some useless trouble to upset the story generally accredited of the immediate cause of the massacre, namely, an insult offered to a bride of high birth. The spirit of exaggerated nationality, apparent in this part of his book, stimulates his ingenuity to some curious hypotheses. It is a French failing, from which the best and wisest of that nation are rarely quite exempt, never to admit a defeat with temper and dignity. There must always have been treachery, or vastly superior numbers, or some other circumstance destructive to fair play. Not a Frenchman from Strasburg to Port Vendres, but holds, as an article of faith, that, on equal terms, the "grande nation" is unconquered and invincible. M. de St Priest seems to partake something of this spirit, so prevalent amongst his countrymen, and actually gets bitter and sarcastic about such a very antiquated business as the Sicilian Vespers. "Who does not recognise in this story (that of the insulted lady) an evident desire to exalt the deed of the Sicilians of the thirteenth century by assimilating it to analogous traits, borrowed from Roman history? Who does not here distinguish a Lucretia, or, better still, a Virginia; a Tarquin, or an Appius? The intention is conspicuous in the popular manifestos that succeeded the event. In these, reminiscences of antiquity abound. The heroes of the Vespers sought to make themselves Romans as quickly as possible, lest they should be taken for Africans." And so on in the same strain. "It is clearly seen," says the French historian in another place, "that the first outrage upon that day was perpetrated by the Sicilians, and not
  • 75. by the French; we behold brave and unsuspicious soldiers, inspired by good-humoured gaiety and deceitful security, barbarously stricken, in consequence of demonstrations, very indiscreet certainly, but whose inoffensive character is deposed to by a contemporary, hostile to the French and to their chief." The facts of the case are told in ten words. By a long course of injustice and oppression the French had dug and charged, beneath their own feet, a mine which a spark was sufficient to ignite. It is immaterial what hand applied that spark. Enough that the subsequent explosion involved the aggressors in universal destruction, and freed Sicily from its tyrants. The statement of Saba Malaspina is not, however, altogether so exculpatory of the French, on the unimportant point of ultimate provocation, as might be inferred from some of M. de St Priest's expressions. "When the Signor Aubert (Herbert) d'Orleans governed Sicily," says the chronicler, "several citizens of Palermo, of both sexes, went out of the town to celebrate the festival of Easter. Some young strangers joined them, and perhaps amongst those were many who carried weapons, concealing them on account of the edict forbidding them to be borne under very severe penalties. Suddenly some French varlets, probably servants of the justiciary of the province, associated themselves with the public rejoicings, less, however, to share than to trouble them. Would to heaven they had never been born, or had never entered the kingdom! At sight of all this crowd which danced and sang, they joined the dancers, took the women by the hands and arms, (more, perhaps, than was decent and proper,) ogling the handsomest, and provoking, by significant words, those whose hands or feet they could not press. At these excessive familiarities, which may be said, however, to have been inspired only by gaiety, several young men of Palermo, and certain exiles from Gaéta, lost their senses so far as to assail the foreigners with injurious words, such as the French do not easily suffer. Then said the latter amongst themselves, 'It is impossible but that these pitiful Patarins[6] have arms about them, otherwise they would never venture such insolent language; let us see if some of them have not concealed swords, or, at any rate, poignards or knives.' And they
  • 76. began to search the Palermitans. Then these, very furious, threw themselves upon the French with stones and weapons, for a great number came up who were armed. The varlets fell for the most part stoned and stabbed to death. Thus does play engender war. The entire island revolted, and every where was heard the cry, 'Death to the French!'" The details of the ensuing massacre are as horrible as they are well known; and M. de St Priest passes lightly over them. Men, women, and children, soldiers and priests, all fell before the vengeful steel of the insurgents. The little fortress of Sperlinga alone afforded shelter to the fugitive Frenchmen, giving rise to the proverb still current in Sicily, "Sperlinga negó."[7] Messina, however, at first took no part in the movement, and continued tranquil in the possession of a French garrison. This was cause for great alarm to the Palermitans, already somewhat embarrassed with their rapid victory and sudden emancipation. Messina hostile, or even neuter, nothing was done, and Sicily must again fall into the vindictive hands of Charles of Anjou. As usual, in Sicilian revolutions, Palermo had given the impulse, but a satisfactory result depended on the adhesion of Messina. Flattering overtures were made by the insurgents to the Messinese; but the latter still hesitated, and, far from joining the massacre, sent six galleys to blockade Palermo, and armed two hundred cross-bowmen to reduce the fortress of Taormine. The effort was in vain. Instead of attacking Taormine, the bowmen re-entered Messina, and pulled down the fleurs-de-lis, whilst the inhabitants of Palermo, upon the appearance of the galleys, hoisted the Messinese cross beside their own flag, and fraternised with the fleet that came to block their port. This completed the revolution, and Messina also had its massacre. The viceroy, Herbert of Orleans, finding it impossible to hold out longer in his fortress of Mattagriffone, capitulated, and embarked for Calabria with five hundred Frenchmen, amidst the menacing demonstrations of a furious mob. Sicily was declared a republic, and a deputation was sent to the Pope, to place it under his protection. An attempt made by the Arragonese party to obtain the preference for Don Pedro was premature, and consequently failed.
  • 77. Charles of Anjou was with the Pope at Montefiascone, when news reached him of the revolt and massacre at Palermo. His first emotion was a sort of religious terror, which expressed itself in the following singular prayer, recorded by Villani and all the historians:—"Lord!" he said, "you who have raised me so high, if it be your will to cast me down, grant at least that my fall be gradual, and that I may descend step by step." Although he as yet knew nothing but the insurrection of a single town, he seems to have beheld the shadow cast before by the evil day at hand. He left Montefiascone, having obtained from Martin IV., whose indignation equalled his own, a bull of conditional interdiction against the Sicilians, should they not return to their allegiance. The Pope also sent Cardinal Gerard of Parma to Sicily, to bring about the submission of the rebels. But at Naples Charles learned the insurrection of Messina, and his fury knew no bounds. Neocastro and other chroniclers represent him as roaring like a lion; his eyes full of blood, and his mouth of foam, whilst he furiously bit the baton he bore in his hand—a favourite practice of his when angry and excited. After writing to his nephew, Philip of France, for a subsidy and five hundred men, he set sail himself with his queen, Margaret of Burgundy, at the head of the formidable armament fitted out for the conquest of the East. There were two hundred vessels bearing an army composed of French and Provençals, of Lombards and Tuscans, including fifty young knights of the noblest families in Florence, and (a strange spectacle in the host of Mainfroy's conqueror) a thousand Lucera Saracens. The total was fifteen thousand cavalry and sixty thousand infantry, and the rendezvous was at Catona, a Calabrian town opposite Messina, where, by the king's orders, forty galleys already awaited him. Undaunted by the formidable array, the Messinese prepared a vigorous defence, repairing their walls, barricading their port with beams, and even assuming the offensive with their galleys, which chased some of the King's into the port of Scylla. Yet a bold and sudden assault would probably have taken the town, and the reduction of all Sicily must necessarily have followed. This course was urged by Charles's principal officers; but he preferred the advice
  • 78. of the Count of Acerra, who, from cowardly or perfidious motives, urged him to wait the result of the legate's negotiations with the rebels. This was a fatal error. Delay was destruction. At the very moment it would well have availed him, Charles abdicated his usual fiery impetuosity in favour of temporising measures. Encamping four leagues to the south of Messina, he lost precious time in idle skirmishes. Whilst he burned their woods and vines, the Messinese raised fortifications, and named Alaimo de Lentini captain of the people, the chief office in the new republic. Whilst Alaimo took charge of the defence of Messina, his wife Maccalda, with helm on head and cuirass upon breast, armed and valiant like another Pallas, marshalled the garrison of Catania. Hostilities were about to commence when Cardinal Gerard of Parma reached Messina. Alaimo received him with the greatest respect, and offered him the keys of the town in token of liege homage to the holy see. The Cardinal replied by a vague offer of pardon if they submitted to the King. "At the word submission, Alaimo snatched the keys from the legate's hand, and exclaimed in a voice of thunder, 'Sooner death than a return to the odious French yoke!' After this theatrical burst, probably a piece of mere acting on the part of a man who had served under so many banners, serious negotiations began." It was impossible to agree. The exasperation of the Messinese reached a height that terrified the legate, who made his escape, after placing the city under interdict. The proposals he took to Charles were "the immediate raising of the siege, and return of the army to the Continent; taxes as in the time of William the Good; and, finally, a formal engagement that the island should no longer be garrisoned by French or Provençals, but by Italians or Latins. "If these conditions are refused," said the bold Messinese, "we will resist till death, though we should eat our children!" The Cardinal admonished Charles of the prudence of accepting these terms, hinting that it might be less necessary to observe them, when the island was again in his hands. Charles was too angry and too honourable to listen to the jesuitical insinuation, and war was the word. The legate returned to Rome, in despair at the hot-headed
  • 79. monarch's intractability. Charles's knights and officers were clamorous for an instant assault; but he preferred a blockade, not wishing, he said, to punish the innocent with the guilty. M. de St Priest discredits the motive, and attributes such unusual forbearance on the part of the Lion of Anjou to the fear of losing, by the indiscriminate pillage that would follow a successful assault, the great riches Messina was known to contain. The foe's decision published, Messina threw away the scabbard. A life of freedom, or a glorious death, was the unanimous resolve of its heroic inhabitants. Every man became a warrior; the very women gave example of the purest patriotism and sublimest devotedness. "Matrons who, the preceding day, clothed themselves in gold and purple, young girls, brought up in the lap of luxury and ease—all, without distinction of rank or riches, with bare feet and dresses tucked up to the knee, bore upon their shoulders stones and fascines, and heavy baskets of bread and wine. They helped the labourers, supplied them with food, attended to all that could increase their physical and moral strength. From the summit of the ramparts they hurled missiles on the besiegers. They held out their children to their husbands, bidding them fight bravely, and save their sons from slavery and death. Oh! it was a pity, says a song still popular in Sicily, great pity was it to see the ladies of Messina carrying chalk and stones."
  • 80. "Deh com' egli é gran pictate Delle donne di Messina, Veggiendo iscapighate, Portando pietre e calcina." Not long ago a wall was still shown, built by these heroines. The names of two of them, Dina and Clarentia, have been handed down to posterity. Whilst Dina upset whole squadrons by hurling stones from warlike engines, Clarentia, erect upon the ramparts, sounded the charge with a brazen trumpet. Such incidents gave a fine field to the superstitious and imaginative; and persons were not wanting who affirmed they had seen the Virgin Mary hover in white robes above the city, whilst others maintained she had appeared to Charles of Anjou's Saracens. The great assault was on the 14th September 1282. "You have no need to fight with these boors and burgesses," said Charles to his knights; "you have merely to slaughter them." He undervalued his foe. In vain did his chivalry advance against the town like a moving wall of steel; in vain did his fleet assail the port. Beams and chains, hidden under water, checked and destroyed his shipping; men and horses fell beneath the missiles of the besieged. One of these would have killed Charles, had not two devoted knights saved him. They covered the King with their bodies, and fell crushed and lifeless at his feet. On the side of the Sicilians, Alaimo displayed great military talents and personal courage. He was every where to be seen, animating his men by his example. When the French were finally repulsed with terrible loss, and compelled to raise the siege, Charles tried to corrupt Alaimo by immense offers, and went so far as to send him his signature upon a blank paper. The Sicilian resisted the temptation—rejecting treasures and dignities, to yield, at a later period, to the influence of a treacherous woman. Meanwhile the deputation charged to offer Sicily to the Pope, returned with a refusal. Martin IV. would have nothing to say to them. He would have better served Charles by acceptance. Subsequently he might have restored the island to the King. As it
  • 81. was, he drove the Sicilians into the snares of the aristocratic league that supported Pedro of Arragon. The republican government was unequal to the task it had undertaken, and the Pope's rejection of the protectorate threw them into great perplexity. A meeting was held to debate the course to be adopted; and the Spanish party, schooled by former failure, achieved a decisive triumph. Its leaders remained mute; but an old man, of such obscure condition that his name was not exactly known, harangued the assemblage, recalled the memory of the house of Swabia, reminded his countrymen that Constance was the legitimate heiress to the crown, and proposed to offer it to her husband, the King of Arragon, then at the port of Collo, on the coast of Africa, near Constantina. The words were scarcely spoken, when a thousand voices extolled the wisdom of the speaker, and ambassadors were immediately named from the people of Palermo to the King of Arragon. Don Pedro had lingered at Portofangos, in expectation of such a summons, for more than a month after the insurrection at Palermo; but finding the secret negotiations of John of Procida with the chiefs of the Sicilian aristocracy less immediately successful than he had hoped, he had sailed for the coast of Africa, on pretext of interfering in a quarrel between the King of Constantina and two of his brothers, but in reality to be nearer the stage on which he hoped soon to play an important part. He affected surprise at the arrival of the Sicilian envoys, who threw themselves at his feet, bathed in tears and dressed in deep mourning, and in a studied harangue implored him to reign over Sicily, and relieve them from the intolerable yoke of the Count of Provence. They said nothing of Conradin's glove,—the anecdote, M. de St Priest says, not having been yet invented. Don Pedro delayed reply till he should have consulted his principal vassals. Most of them urged him not to engage in a hazardous enterprise, that would draw upon him the displeasure of the King of France; "but to be content with what he already possessed, without seeking to acquire what would assuredly be valiantly defended. Don Pedro heard their objections in silence, and broke up the council, merely announcing that the fleet would sail next day, without saying
  • 82. whether for Catalonia or Sicily. According to one account, scarcely credible, and bearing strong resemblance to a popular report, he declared the wind should decide his destination. The wind blew for Sicily, much to the discontent of some of the barons, and to the secret and profound joy of the King. After a prosperous voyage of only three days' duration, Don Pedro landed at the port of Trapani. The inhabitants received him as a liberator, and he proceeded to Palermo, where his stay was one unbroken triumph." He did not remain there long. He was as active and indefatigable as Charles of Anjou; like him sleeping little, and rising before the sun. He resolved to march to the succour of Messina, and to intercept the French army's communications with Calabria. He sent forward two noble Catalan knights to warn the King of Naples off the island, with the alternative of war should he refuse. A judge from Barcelona accompanied them,—it being the custom of the time to compose such embassies partly of military men, and partly of persons learned in the law. The envoys were courteously received in the French camp, but their lodging did not correspond with their reception. Either through contempt or through negligence, they were quartered in a church, without bed or chair, and had to sleep upon straw. At night they received two jugs of black wine, six loaves equally dark coloured, two roasted pigs, and an enormous quantity of bacon- soup. Coarse fare and hard couch did not, however, prevent their sleeping soundly, and repairing next morning to the royal presence, richly attired in fine cloth lined with vair. Charles, who was unwell, received them reclining under curtains of magnificent brocade, and with a little stick between his teeth, according to his habit. He listened patiently whilst the chief of the embassy summoned him to evacuate the island, and replied, after a few minutes' reflection, that Sicily belonged neither to him nor to the King of Arragon, but to the holy see. "Go then," he said, "to Messina, and bid the people of that city declare an eight days' truce, for the discussion of necessary things." This the ambassadors agreed to do, but got a rude reception from Alaimo, who would not credit their quality of Arragonese envoys, when he heard them advocate a truce. Don Pedro was no longer at liberty to treat with Charles, even had he
  • 83. wished it: the Sicilians, at least that party of them that had invoked his aid, had done so for their own ends, and would permit no transaction. The ambassadors returned to Charles and announced their ill success, and the King bade them repose till next morning, when he would speak further with them. But the next morning they learned that he and the Queen had left the camp during the night, and had embarked for Calabria. Many historians have severely blamed this retreat; M. de St Priest vindicates its wisdom and propriety. Defection was increasing in Charles's army, weary of a fruitless siege that had lasted seventy-four days, and he was in danger of being cut of from Calabria; for although he still had his fleet, it consisted of heavy, unwieldy transports, and was very unmanageable. Soon after his departure from Sicily it was destroyed and captured by the Arragonese fleet. He began also to form a juster estimate of his formidable adversary, whose politic and generous conduct contrasted with his own severity, often pushed to barbarity. He resolved to try a system of conciliation with the Sicilians; and, being too proud and stiff-necked to adopt it in person, he sent his son Charles, Prince of Salerno, to carry it out. "It was necessary to find a pretext in order honourably to absent himself. The customs of the time furnished him with one. He did not show himself their slave, as has often been said, but made them serve his purpose, and skilfully used them to mask the difficulties of his position. It was not, then, from a Quixotic and foolish impulse, unbecoming at his age, but with a political object,—in order to escape from the scene of his disappointments and defeats, and to draw his enemy from that of his victories and triumphs,—that he took the resolution to challenge Pedro of Arragon to single combat." A friar bore the cartel; Pedro accepted it; and this strange duel between two powerful kings was fixed to take place in a plain near Bordeaux, an English town, as the chroniclers call it, Bordeaux then belonging to Edward I. of England. Pending the preliminary negotiations and arrangements for this combat, hostilities continued, and the results were all in favour of Don Pedro. His natural son, Don Jaime Pâris, or Peres, admiral of the Catalan fleet, made a night excursion from Messina to Catona, upon the opposite coast,
  • 84. surprising and massacring five hundred French soldiers. Carried away by youthful ardour, he then pushed on to Reggio; but fell into an ambush, and lost a dozen men. Although the final result of the enterprise was highly satisfactory, Pâris returning victor with a rich booty, his father, indignant that his orders had been overstepped, spared his life only at the entreaties of his courtiers, degraded and banished him, and gave the command of the fleet to Ruggiero de Lauria. This was a lucky hit. Lauria, although violent and perfidious by character, was of courage as great as his good fortune was invariable. Once at the head of the Arragonese fleet, the success of Don Pedro ceased to be doubtful. The conditions of the projected duel being arranged and agreed to by both parties, Charles left Reggio, the Prince of Salerno remaining there at the head of an army brought in great part from France. The war was now transported in great measure into Calabria. There every thing was favourable to the Arragonese. His soldiers found themselves in a climate, and amongst mountains, reminding them of their native country. The Almogavares, hardy and reckless guerillas, lightly equipped, and with sandalled feet, were more than a match for the French knights and men-at-arms, with their heavy horses and armour. "One day, whilst the Prince of Salerno was at Reggio, an Almogavare came alone to his camp to defy the French. At first they despised the challenge of the ill-clad savage, but finally a handsome young knight left the ranks, and accepted the defiance. He was conquered by his opponent, who, after bringing him to the ground, buried his knife in his throat. The Prince of Salerno, true to the laws of chivalry, dismissed the conqueror with rich guerdon. The King of Arragon would not be surpassed in courtesy, but sent in exchange ten Frenchmen, free and without ransom, declaring that he would always be happy to give the same number for one Arragonese." This piece of Spanish rodomontade was backed, however, by deeds which proved Pedro no impotent boaster; and the Prince of Salerno was compelled to retire from Reggio—whose inhabitants, favourable to his rival, hypocritically affected grief at his departure—to an adjacent level, known as the pianura di San Martino.
  • 85. Charles of Anjou was now at Rome, whose Pope he found friendly and supple as ever. A crusade was promulgated, the usurper of Sicily was excommunicated, and his Arragonese crown was declared forfeit and given to Charles de Valois, second son of Philip the Bold, whom the Italians called Carlo Senza Terra, because he tried many crowns but could never keep one. To cloak his manifest partiality, Martin IV. strove to make Charles give up the duel, and, failing to do so, declared himself openly against a project which he treated as mad and impious. He declared null and void the agreement and conditions fixed between the champions, and exhorted the King of England to forbid the encounter of the two sovereigns upon his territory. Edward I. was not the man to spoil sport of this kind; he neither made nor meddled in the matter. On the appointed day, (25th May 1283,) Charles, coming from Paris, where his intended duel had excited the enthusiasm of the French youth, entered Bordeaux, armed cap-à-pie, at the head of a hundred knights, established himself with them in the lists, and waited from sunrise till sundown. Then, the King of Arragon not appearing, he sent for Jean de Grailly, seneschal of Guienne, had a certificate of his presence at Bordeaux drawn up in due form, and set out for his county of Provence. Various causes have been assigned for Pedro's non-appearance. It is certain that he left Sicily, after having summoned thither his queen and all his children, excepting the eldest, Alphonso, who remained in Arragon. The only distinct cause assigned by M. de St Priest, for his defalcation in the lists, is the Arragonese version. "Don Pedro had gone from Valentia to Collioure, and already the hundred chevaliers he had chosen to accompany him were assembled at Jaca, on the frontier, ready to enter Guienne, when he was suddenly informed that, at the request of Charles of Anjou, Philip of France had accompanied his uncle to Bordeaux, and lay near that town with twenty thousand men. Warned by the King of England that the King of France was in ambush for him, Pedro decided not to show himself publicly at Bordeaux; but being at the same time fully resolved to acquit his promise by going thither, he disguised himself as a poor traveller, and took with him two gentlemen dressed with less simplicity, all three mounted on good
  • 86. horses, and without other baggage than a large bag full of provisions, that they might not be obliged to stop any where. The King acted as servant to his companions, waiting on them at table, and giving the horses their corn. In this manner they arrived very quickly at Bordeaux, where Don Pedro was received and concealed by an old knight, a friend of one of the two gentlemen. Upon the morrow, which was the day appointed for the duel, Pedro repaired to the lists, with the seneschal, who was devoted to him, before the sun rose, consequently earlier than Charles of Anjou. There he caused his presence to be certified by a notarial act, then fled precipitately, and put an interval of several hours between his departure and the pursuit of the Kings of France and Sicily." This is rather an improbable story, as M. de St Priest justly remarks; and, even if true, it is a sort of evasion that does little credit to the King of Arragon's chivalry. It appears likely that Pedro, standing upon his well-established reputation of personal bravery, thought himself justified for once in consulting prudence, and felt little disposed to stake his life and crown upon the goodness of his lance and charger. Abandoning to his rival the honours of the tourney, he gained, with his fleet and army, more solid advantages. Soon after Charles's return to Provence, twenty-nine galleys despatched by him from Marseilles to the succour of Malta were attacked and destroyed by Ruggiero de Lauria, in spite of the valiant efforts of the Provençal admiral, William Cornut. "In the heat of a terrible and prolonged combat, and seeing himself about to be vanquished, Cornut jumped upon Lauria's galley and attacked the admiral, axe in one hand and lance in the other. The lance point pierced Ruggiero's foot, and, nailing him to the deck, broke off from the pole; the Provençal raised his axe, when the Sicilian, active and furious as a tiger, snatched the iron from his bleeding wound, and, using it as a dagger, stabbed his enemy to the heart." The sea was the real field of battle, and, unfortunately for Charles of Anjou, the French lacked the naval skill and experience of the Catalans. Pedro was detained in Arragon by some turbulent proceedings of his nobility, but he was ably replaced by his wife.
  • 87. Queen Constance was no ordinary woman. Adored by the Sicilians, who persisted in regarding her as the rightful descendant of their kings, her influence exceeded that of Pedro himself. Surrounded by her children, and followed by her Almogavares, she traversed the island in all directions, going from Palermo to Messina, from Messina to Catania, encouraging the people by kind and valiant words, giving bread to the necessitous, and followed by the blessings and admiration of her new subjects. By the advice of John of Procida, she resolved to anticipate the Prince of Salerno, who only awaited his father's arrival to make a descent upon Sicily. "She sent for Ruggiero de Lauria, who was the son of Madonna Bella, her nurse, and spoke to him thus: 'Friend Ruggiero, you know that you have been brought up, from your earliest infancy, in my father's house and in mine; my lord the King of Arragon has loaded you with favours, making you first a good knight and then an admiral, such confidence has he in your valour and fidelity. Now, do better still than heretofore; I recommend to you myself, my children, and all my family.' When the Queen had spoken, the admiral put knee on ground, took the hands of his good mistress in his in sign of homage, kissed them devoutly, and replied: 'Madonna, have no fear; the banner of Arragon has never receded, and still shall conquer. God gives me confidence that I shall again work to your satisfaction, and that of my lord the King.' Then the Queen made the sign of the cross over the admiral, who quitted her to put himself at the head of thirty galleys, and of a host of light vessels armed at Messina. With these he entered the gulf of Salerno." The son of Charles of Anjou had no suspicion of the sortie of the Arragonese fleet, and an officer whom he sent to reconnoitre brought back a false account of the enemy's strength, diminishing the number of their vessels. Thereupon the Prince of Salerno resolved to give battle, being urged to do so by the Count of Acerra, the same who had formerly advised Charles to postpone the assault of Messina. The count's advice, whether treacherous or sincere, proved fatal in both instances. The Sicilian fleet, which had advanced to the very Molo of Naples, passed under the windows of the Castello Nuovo, insulting the Prince of Salerno by words injurious to his nation, his father, and himself. Too
  • 88. angry to be prudent, and forgetting Charles's orders on no account to stir before his arrival, the prince, covered with new and brilliant armour, bravely embarked, lame though he was, on board the royal galley, followed by the flower of the French chivalry. Lauria, cunning as skilful, feigned to fly at his approach. Riso, the Messinese, and other Sicilian exiles, showed chains to Lauria, calling out, "Brave admiral, here is what awaits you; turn and look!" Lauria obeyed their order, turned about, and fell furiously upon the Neapolitan fleet, which was defeated by the very first shock. The Prince of Salerno and the French knights defended themselves with the courage of despair. The royal galley alone held out, until at last the Prince, seeing it about to sink with the weight of combatants, and having bravely fought and dearly sold his liberty, gave up his sword to Ruggiero, who offered him his hand to conduct him on board the admiral's galley. "Sir Prince," said the Arragonese, "if you do not covet the fate of Conradin, order your captive, the Infanta Beatrix, sister of our Queen, and daughter of King Mainfroy, to be instantly delivered up to us." With the fierce Lauria it was unsafe to trifle or delay. The Prince wrote to his wife, Mary of Hungary, that, vanquished and a prisoner, his life depended on the release of Beatrix. On receiving his letter, the Princess of Salerno hurried to the prison of Mainfroy's daughter, embraced her, clothed her in her richest apparel, and instantly gave her up to Lauria's envoy. At the news of the Prince's capture, the Neapolitans were on the point of revolt. An incident occurred that did not leave him the least doubt of their sentiments. When seated on the deck of Ruggiero's galley, in the midst of a circle of knights who kept respectful silence, he saw approach a number of boats filled with peasants, who asked permission to come on board. They brought baskets of those large figs called palombale, and also a present of gold augustales. Taking the Prince, on account of his magnificent armour, and of the respect of those around him, they knelt before him and said, "Admiral, accept this fruit and this gold; the district of Sorrento sends them you as an offering, and may you take the father as you have taken the son!" Notwithstanding his misfortunes, the young man could not
  • 89. help smiling, as he said, "Truly these are very faithful subjects of my lord the King." He was taken to Sicily and landed at Messina, where Queen Constance and the Infante Don Jaime then resided. When Charles of Anjou learned the double disaster that had befallen him in the capture of his fleet and son, his first expression was one of bitter irony. "The better," he exclaimed, "that we are quit of that priest, who spoiled our affairs and took away our courage!" Bitter grief succeeded this factitious gaiety. He shut himself up in a private chamber of the Castel Capuano, sent away the attendants and torches, repulsing even the tender caresses of his queen, and groaned and lamented in solitude and darkness. When day appeared he forgot his sorrow to think of vengeance. In his absence, Naples had nearly escaped him. From Pausilippo to the Molo, shouts for Pedro of Arragon had been heard. Naples must expiate the crime. Charles prepared to shed an ocean of blood, but the Pope's legate interceded; and the enraged sovereign contented himself with hanging a hundred and fifty of the most guilty from the battlements of the Castel Nuovo. Then, with his usual impetuous activity, he armed a fleet, and sailed for Messina, but was met by a message from Constance, that if he touched the shore of Sicily his son's head should roll upon the scaffold. What could the murderer of Conradin reply to this threat? Trembling with fury, he returned to Calabria. The position of his son justified great anxiety. A large majority of the Sicilians were clamorous for his death, as an expiatory sacrifice to the manes of Conradin. Queen Constance, who had nobly resolved to save him, was compelled so far to yield to public clamour that a parliment was assembled to deliberate on his fate. With the exception of Alaimo de Lentini, all the members voted for the Prince's death. But Constance would not ratify the sentence till she heard from Don Pedro, to whom she had already despatched intelligence of the important capture. As she had foreseen, Pedro ordered the Prince, and the chief amongst his companions, to be sent immediately to Arragon. This was done, and Sicily seemed guaranteed for a long time from the aggressions of the house of Anjou.
  • 90. To foreign warfare internal strife succeeded. The Sicilian nobles, the same men who had entreated Pedro of Arragon to reign over them, now repented of their choice. They had found a master where they had intended a crowned companion. Already the failure of a rebellion had cost several of them their heads, when a second plot was got up, in which Alaimo de Lentini took a prominent part. The rank, influence, and services of this man, the first in Sicily, rendered Pedro uneasy, and excited the jealousy of his two ministers, John of Procida and Ruggiero de Lauria. Alaimo's indulgent vote upon the trial of the Prince of Salerno, although conformable to the wishes of the King, yet had increased suspicions he for some time had entertained. These, however, would not have broken out but for the imprudent audacity of Maccalda, Alaimo's wife, who had flattered herself she should be able to govern Pedro of Arragon. During the siege of Messina, she presented herself before him in her Amazonian garb, a silver mace in her hand; but this warlike equipment could not restore her youth, and, notwithstanding the King's passionate admiration of the fair sex, he passed the night in talking to her of his ancestors, and finally fell asleep. Irritated by this contempt of her charms, Maccalda vowed hatred to Queen Constance. Although of very low origin, the insolent matron pretended herself at least the equal of the daughter of Mainfroy the bastard. She refused her the title of queen, and never spoke of her but as the mother of the Infante Don Jaime. Every advance made by Don Pedro's wife was insolently rejected by her. The Queen wished to become godmother to one of her children; Maccalda disdainfully declined the honour. The Queen had a litter made to take air in Palermo, a piece of luxury unprecedented in Sicily. Maccalda immediately rambled about the island in a litter twice the size, eclipsing her sovereign by her presumptuous splendour. In short, the court of Arragon could not endure this incessant struggle, and soon serious grounds for vengeance were found. All powerful with her husband, Maccalda excited him to revolt. He corresponded with Charles of Anjou, then in Calabria; one of his letters, in which he promised to deliver Sicily to the King of Naples, fell into the hands of John of Procida. Don Pedro, informed of Alaimo's treason, dissimulated and wrote him an
  • 91. Welcome to our website – the perfect destination for book lovers and knowledge seekers. We believe that every book holds a new world, offering opportunities for learning, discovery, and personal growth. That’s why we are dedicated to bringing you a diverse collection of books, ranging from classic literature and specialized publications to self-development guides and children's books. More than just a book-buying platform, we strive to be a bridge connecting you with timeless cultural and intellectual values. With an elegant, user-friendly interface and a smart search system, you can quickly find the books that best suit your interests. Additionally, our special promotions and home delivery services help you save time and fully enjoy the joy of reading. Join us on a journey of knowledge exploration, passion nurturing, and personal growth every day! ebookbell.com