Grokking Artificial Intelligence Algorithms Index
Return to Grokking Artificial Intelligence Algorithms
index
Symbols
-1 value, 56
A
accuracy, improving, 255–256
actions, simulating, 74–83
activation functions, 314–315, 318
adjacency lists, 56–57
adversarial problems, 72–73
adversarial searches, 72–89
algorithms for, 88–89
alpha-beta pruning, 84–88
choosing best future, 74–84
min-max search, 74–84
optimizing by exploring sensible paths, 84–88
simple adversarial problems, 72–73
simulating actions, 74–84
agents with AI algorithms, 17–18
agriculture, algorithms for, 14–15
AI (artificial intelligence)
AI algorithms
biology-inspired, 12–13
deep learning, 13–14
for agriculture, 14–15
for AI agents, 17–19
for art, 19–20
for banking, 15
for cybersecurity, 15–16
for games, 17–18
for health care, 16
for logistics, 17
for optimization, 17
for optimizing networks, 17
for routing, 17
for telecoms, 17
machine learning, 13
overview of, 2–3
role of data in, 3–4
search algorithms, 12
use cases for, 14–19
brief history of, 6–7
defining, 2
humanlike solutions, 11
new AI, 11–12
old AI, 11–12
overview of, 1
problem-solving paradigms, 8–9
problem types, 8–9
specific-purpose solutions, 10
super intelligence, 11
algorithms
biology-inspired, 12–13
evolutionary, 91–129
glossary of terms, 149
hierarchies, 144–148
life cycle of, 131–133
order encoding, 141–144
overview of, 91
problems applicable to, 95–99
real numbers, 137–141
real-value encoding, 137–141
selection strategies, 133–137
sequences, 141–144
tree encoding, 144–148
types of, 148–149
use cases for, 127–129, 150–151
algorithms (continued)
for adversarial searches, 88–89
for ant colony optimization, 153–188
ants, 160–164
paths, 160–164
problems applicable to, 156–159
representing state, 160–164
swarm intelligence, 153–156
use cases for, 187–188
for artificial intelligence
agriculture, 14–15
art, 19
banking, 15
creating agents with, 17–18
cybersecurity, 15–16
games, 17–18
health care, 16
logistics, 17
optimization with, 17
optimizing networks with, 17
role of data in, 3
routing, 17
telecoms, 17
for deep learning, 13–14
for machine learning, 13, 275
for particle swarm optimization, 189–191
optimization problems, 192–195
overview of, 189–191
problems applicable to, 195–197
use cases for, 223–226
for searching, 12, 25–27
for uninformed searches, 53
genetic configuring parameters of, 126–127
overview of, 4–5
smart algorithms, 24–25
alpha-beta pruning, 84–88
ambiguous values, 238
ANNs (artificial neural networks), 279–322
backpropagation of, 303–314
training, 305–314
defining, 287–295
designing, 316–319
activation functions, 318
bias, 317–318
cost function, 318
hidden layers, 317
inputs, 317
learning rate, 318
nodes, 317
outputs, 317
weights, 317
forward propagation of, 295–303, 305
options for activation functions, 314–315
overview of, 280–282
perceptron, 283–287
representing neurons, 283–287
training, 303–312
types of, 319–322
CNNs (convolutional neural networks), 319
GANs (generative adversarial networks), 320–322
RNNs (recurrent neural networks), 320
ant colony optimization algorithm, 153–188
ants, 160–164
paths, 160–164
problems applicable to, 156–159
representing state, 160–164
swarm intelligence, 153–156
use cases for, 187–188
arithmetic crossover, 139
arithmetic mutation, 140–141
art, AI algorithms for, 19–20
artificial neural networks (ANNs), 279–322
A* search, 63–70
B
backpropagation of ANNs, 303–314
setup, 305
training, 305–314
banking, AI algorithms for, 15
bias, 317–318
biology-inspired algorithms, 12–13
blind searches, 34–36
boundary mutations, 140
breadth-first searches, 36–45
C
categorical data, encoding, 238–239
classification
problems applicable to, 9, 256–257
with decision trees, 258–274
classifying examples with, 271–274
overview of, 258
training, 260–271
clustering, problems applicable to, 9
CNNs (convolutional neural networks), 319
collecting data, 233–235
computations, cost of, 24–25
context of data, 233–235
convolutional neural networks, 319
cost
functions, 318
of computations, 24–25
crossover
arithmetic crossover, 139
tree crossover, 146–147
cybersecurity, AI algorithms for, 15–16
D
data
categorical, 238–240
collecting, 233–235
context of, 233–235
fitting line to, 241–242
identifying patterns in, 9
in AI algorithms, 3–4
learning from patterns in, 9
missing, 235–238
preparing, 235–240
separating, 252
testing, 240
training, 240
data structures
for decision trees, 260–271
representing graphs as, 31–32
decision trees
classification with, 256–257
classifying examples with, 271–274
data structures for, 260–271
learning life cycle, 261–271
overview of, 258–260
training, 260–271
deep learning
algorithms for, 13–14
approaches to reinforcement learning, 349–350
depth-first search (DFS), 45–53
designing ANNs, 316–318
activation functions, 318
bias, 317–318
cost function, 318
hidden layers, 317
inputs, 317
learning rate, 318
nodes, 317
outputs, 317
weights, 317
deterministic models, 9
DFS (depth-first search), 45–53
E
elitism selection, 136–137
encoding
categorical data, 238–240
order encoding, 141–144
fitness functions, 142–143
order mutation, 143–144
overview of, 141
permutation encoding, 143–144
real-value encoding, 137–141
arithmetic crossover, 139
arithmetic mutation, 140–141
boundary mutation, 140
overview of, 137–138
trees, 144–148
changing node mutation, 147–148
changing values of nodes, 147–148
inheriting portions of trees, 146–147
overview of, 146
tree crossover, 146–147
evolutionary algorithms, 91–129
configuring parameters of genetic algorithms, 126–127
glossary of terms, 149
hierarchies, 144–148
changing node mutation, 147–148
changing values of nodes, 147–148
inheriting portions of trees, 146–147
tree crossover, 146–147
tree encoding, 146
life cycle of, 131–133
order encoding, 141–144
fitness functions, 142–143
order mutation, 143–144
overview of, 143
overview of, 91
evolutionary algorithms (continued)
permutation encoding, 143–144
populating next generation stopping conditions, 124–126
problems applicable to, 95–99
real-value encoding, 137–141
arithmetic crossover, 139
arithmetic mutation, 140–141
boundary mutation, 140
overview of, 138–139
selection strategies, 133–137
elitism selection, 136–137
rank selection, 133–135
tournament selection, 135–136
sequences, 141–144
fitness functions, 142–143
order encoding, 143–144
order mutation, 143–144
permutation encoding, 143–144
tree encoding, 144–148
changing node mutation, 147–148
changing values of nodes, 147–148
inheriting portions of trees, 146–147
tree crossover, 146–147
types of, 148–149
evolutionary programming, 149
genetic programming, 148–149
use cases for, 127–129, 150–151
evolutionary programming, 149
examples, classifying, 271–274
F
features, finding mean of, 242–243
financial trading, 351
fitness functions, 142–143
forward propagation of ANNs, 295–303, 305
frameworks
representing problem spaces with, 28–34
representing solutions with, 28–34
functions
activation functions, 314–315, 318
cost functions, 318
fitness functions, 142–143
future, choosing, 74–84
G
games
AI algorithms for, 17–18
playing, 351–353
GANs (generative adversarial networks), 320–322
genetic algorithms
parameters of, 126–127
genetic programming, 148–149
graphs, 29–31
categories of, 54–55
representing, 56–57
adjacency lists, 56–57
as data structures, 31–32
incidence matrix, 56
H
health care, AI algorithms for, 16–17
heuristics, 59–63
for choosing best future, 74–84
for min-max search, 74–4
for simulating actions, 74–84
hidden layers, 317
hierarchies, 144–148
changing node mutation, 147–148
changing values of nodes, 147–148
inheriting portions of trees, 146–147
tree crossover, 146–147
tree encoding, 146
humanlike solutions, 11
I
incidence matrix, 56
informed searches, 63–71
algorithms for, 71
A* search, 63–71
inheriting portions of trees, 146–147
inputs, 317
L
layers, hidden, 317
learning
decision-tree life cycle for, 261–271
from patterns in data, 9
model-based, 348–349
model-free, 348–349
rates, 318
supervised, 231
unsupervised, 231
least-squares method, 244–251
life cycle
of decision tree learning, 261–271
of evolutionary algorithms, 131–133
of reinforcement learning, 329–349
linear regression, 240–251
finding mean of features, 242–243
finding regression lines with least-squares method, 244–251
fitting line to data, 241–242
lines
fitting to data, 241–242
measuring performance of, 253–254
lists, adjacency, 56–57
logistics, AI algorithms for, 17
M
machine learning, 227–277
algorithms for, 13, 275–277
classification with decision trees, 256–274
classification problems, 256–257
classifying examples with decision trees, 271–274
overview of decision trees, 258–260
training decision trees, 260–271
overview of, 227–229
problems applicable to, 230–231
workflow of, 232–256
collecting data, 233–235
context of data, 233–235
improving accuracy, 255–256
linear regression, 240–251
preparing data, 235–240
testing models, 251–254
training models, 240–251
matrix, incidence, 56
mean of features, finding, 242–243
methods, least-squares, 244–251
min-max search, 74–84
missing data, 235–238
model-based learning, 348–349
model-free learning, 348–349
models
testing, 251–254
measuring performance of line, 253–254
separating training and testing data, 252
training, 240–251
finding mean of features, 242–243
finding regression lines with least-squares method, 244–251
fitting line to data, 241–242
mutations
arithmetic mutation, 140–141
boundary mutation, 140
of nodes, changing, 147–148
order mutation, 143–144
N
networks
optimizing with AI algorithms, 17
neurons, representing, 283–287
next generations, populating
stopping conditions, 124–126
nodes, 317
changing mutation of, 147–148
changing values of, 147–148
O
optimization
AI algorithms for, 17
ant colony optimization algorithm, 153–188
ants, 160–164
paths, 160–164
problems applicable to, 156–159
representing state, 160–164
use cases for, 187–188
optimization (continued)
exploring sensible paths for, 84–88
of networks, 17
particle swarm optimization algorithms, 189–226
overview of, 189–191
problems applicable to, 195–197
use cases for, 223–226
problems applicable to, 8–9, 192–195
order encoding, 141–144
fitness functions, 142–143
order mutation, 143–144
overview of, 142–143
order mutation, 143–144
outputs, 317
P
parameters of genetic algorithms, configuring, 126–127
particle swarm optimization algorithms, 189–191
optimization problems, 192–195
overview of, 189–191
problems applicable to, 195–197
use cases for, 223–226
patterns in data
identifying, 9
learning from, 9
performance
of lines, measuring, 253–254
of training, measuring, 348
permutation encoding, 143–144
populating next generation
stopping conditions, 124–126
prediction, problems applicable to, 9
preparing data
ambiguous values, 238
encoding categorical data, 238–240
missing data, 235–238
testing data, 240
training data, 240
probabilistic models, 9
probability, 9
problem spaces, representing, 28–34
graphs, 29–30
graphs as concrete data structures, 31–32
search problems, 29–30
search solutions with concrete structures, 32–34
solutions, 29–30
trees, 32–34
pruning, 84–88
Q
Q-learning
reinforcement learning with, 323–327
deep learning approaches to, 349–350
financial trading, 351
game playing, 351–353
life cycle of, 329–350
overview of, 323–325
problems applicable to, 327–328
recommendation engines, 351
robotics, 350–351
training with simulations, 335–346
R
rank selections, 133–135
real numbers, 137–141
arithmetic crossover, 139
arithmetic mutation, 140–141
boundary mutation, 140
real-value encoding, 138–139
real-value encoding, 137–141
arithmetic crossover, 139
arithmetic mutation, 140–141
boundary mutation, 140
overview of, 138–139
recommendation engines, 351
recurrent neural networks (RNNs), 320
reinforcement learning, 231
RL (reinforcement learning)
deep learning approaches to, 349–350
inspiration for, 325–327
life cycle of, 329–349
data, 330–335
measuring performance of training, 348
model-based learning, 348–349
model-free learning, 348–349
simulations, 330–335
testing with Q-table, 347
testing with simulations, 347
training with simulations using Q-learning, 335–346
overview of, 323–325
problems applicable to, 327–328
with Q-learning, 323–353
financial trading, 351
game playing, 351–352
recommendation engines, 351
robotics, 350
RNNs (recurrent neural networks), 320
robotics, 350–351
routing, AI algorithms for, 17
S
search
adversarial, 72–89
alpha-beta pruning, 84–88
choosing best future, 74–84
optimizing by exploring sensible paths, 84–88
simple problems, 72–73
simulating actions, 74–84
use cases for, 88–89
algorithms for, 12–14, 25–27, 53
A* search, 63–71
blind, 34–36
breadth-first, 36–45
cost of computations, 24–25
depth-first, 45–53
for solutions in changing environments, 72–89
for solutions with guidance, 63–71
frameworks to represent solutions, 28–34
graph categories, 54–55
heuristics for, 59–63
informed, 63–71
min-max, 74–84
planning, 21–23
problems applicable to, 8–9
representing graphs, 56–57
adjacency lists, 56–57
as concrete data structures, 31–32
incidence matrix, 56
representing problems, 29–30
representing solutions, 29–30, 32–34
representing state, 28–34
graphs, 29–30
trees, 32–34
smart algorithms, 24–25
uninformed, 34–36, 53
search algorithms, 12, 25–27, 53
selection
elitism selection, 136–137
rank selection, 133–135
strategies for, 133–137
tournament selection, 135–136
sequences, 141–144
fitness function, 142–143
order encoding, 143
order mutation, 143–144
permutation encoding, 143–144
simulations, 330–349
of actions, 74–84
testing with, 347
training with, 335–346
smart algorithms, 24–25
solutions
blind search for, 34–36
finding, 8
for specific-purpose, 10
humanlike, 11
in changing environments, 72–89
adversarial search algorithms, 88–89
alpha-beta pruning, 84–88
choosing best future, 74–84
min-max search, 74–84
optimizing by exploring sensible paths, 84–88
simple adversarial problems, 72–73
simulating actions, 74–84
paths to, 8
representing, 29–30
with concrete structures, 32–34
with frameworks, 28–34
with guidance, 63–71
A* search, 63–71
specific-purpose solutions, 10
state, representing, 28–34
graphs, 29–32
search problems, 29–30
solutions, 29–30, 32–34
trees, 32–34
stochastic models, 9
stopping conditions, 124–126
super intelligence, 11
supervised learning, 231
swarm intelligence, 153–188
ant colony optimization algorithms
problems applicable to, 156–159
use cases for, 187–188
ants, 160–164
overview of, 153–156
particle swarm optimization algorithms, 189–226
optimization problems, 192–195
overview of, 189–191
problems applicable to, 195–197
use cases for, 223–226
paths, 160–164
representing state, 160–164
T
telecoms, AI algorithms for, 17
testing
data, 240
models, 251–254
measuring performance of line, 253–254
separating training and testing data, 252
with Q-table, 347
with simulations, 347
tournament selection, 135–136
training
ANNs, 303–314
forward propagation, 305
setup, 305
data, 240
decision trees, 260–271
data structures for, 260–261
learning life cycle, 261–271
measuring performance of, 348
models, 240–251
finding mean of features, 242–243
finding regression lines with least-squares method, 244–251
fitting line to data, 241–242
with simulations using Q-learning, 335–346
trees, 32–34
crossover, 146–147
decision trees
classification with, 256–271
classifying examples with, 271–274
overview of, 258–260
training, 260–271
encoding, 144–148
changing node mutation, 147–148
changing values of nodes, 147–148
overview of, 146
inheriting portions of, 146–147
U
uninformed search algorithms, 53
uninformed searches, 34–36
unsupervised learning, 231
V
values
ambiguous, 238
of nodes, changing, 147–148
real-value encoding, 137–141
arithmetic crossover, 139
arithmetic mutation, 140–141
boundary mutation, 140
overview of, 138–139
W
weights, 317