Artificial Intelligence Exam 1
planning agents
(discussed later, these agents use a structured or factored representation of the environment)
IDA*
*iterative-depeening A*. Sets the limit to the smallest cost of an successor nodes, and then proceeds in a depth first until we can't find the limit. Saves tremendously on memory, however has a worse time complexity than A*
path cost
A component of a problem: a function that assigned a numeric cost for a path. The *step cost* is the cost of taking an action from one particular state to the next
transition model
A component of a problem: a function that maps a state and action to a next state
goal test
A component of a problem: determines whether the current state is a goal
actions
A component of a problem: possible next things that an agent can do in any state. Only some might be applicable for a particular state
initial state
A component of a problem: the state that the agent starts in
OR Node
A node in an AND-OR tree that represents the current state in the problem. At this node, we could choose next possible actions.
AND Node
A node in an AND-OR tree that represents, the possible states an environment can be after an action
consistency
A second stronger condition of the heuristic. States that h(n) ≤ c(n, a, n) + h(n'), where: n = an arbitrary node n' = successor node c(n, a, n') = cost of an action from n to success n' AKA, *monotonicity*, which in functional analysis, means the heuristic function is never not increasing or never not decreasing
Turing test
A test proposed by Alan Turing in which a machine would be judged "intelligent" if the software could use a chat conversation to fool a human into thinking it was talking with a person instead of a machine.
A* search
A type of best-first search. search based on a priority queue, where the evaluation function f(n) = g(n) + h(n) where h(n) is the heuristic and h(n) is the path cost from the start node to node n
greedy best-first search
A type of best-first search. search based on a priority queue, where the evaluation function f(n) = h(n) (i.e., the heuristic)
SMA*
A* but we have a set memory space. We expand best nodes until we run out of memory; then we delete the old nodes.
contour
Because f(n') >= f(n) (i.e., the heuristic function is nondecreasing), we can draw contours around certain node n in the graph and say that all nodes in that contour is less than f(n)
iterative-deepening search (plus, what are it's problem-solving performance measures?)
DLS, with levels going from 1 to infinity until we found the goal node Is complete Is optimal (on same conditions as BFS) TC: O(b^d) SC: O(bd)
diameter
For any graph, this give the maximum node hops to go from one arbitrary node to another for depth-limited search, this gives us an ideal choice for l
pruning
In AI, any particular nodes not explored in A* because its f(n) is larger than the C* (the cost of getting to the successor)
node
In a search tree, contain the state as well as the associated metadata
competitive multiagent
In an environment, the other agents have the same objective function than the agent ex: chess
cooperative multiagent
In an environment, the other agents might have different objective functions than the agent ex: taxi driving
thrashing
Just like OS, SMA* falls pray this problem of swapping memory in and out inefficiently
Monte Carlo simulation
MiniMax instead of going through every possibility, sample only a handful of terminal nodes As opposed to that, it could mean run a lot of random games against yourself and see which moves lead to desired outcomes
completeness
One of the 4 measures of problem-solving performance: If the solution can be found, it will be found
time complexity
One of the 4 measures of problem-solving performance: how long does it take to find the solution?
space complexity
One of the 4 measures of problem-solving performance: how much memory is needed to perform the search?
optimality
One of the 4 measures of problem-solving performance: is the solution that is found optimal?
expanding
Our successor function. Takes a node and *generates* the next states The originating node is called the *parent node* and the generated nodes are called the *child nodes*
Example of PEAS for Amazon recommendation engine
P: a count of how many recommended products the customer actually buys E: customers A: a GUI that displays recommendations in a sorted order. S: the number of buys, returns, comments that all of the customers
PEAS stands for
Performance Criteria: how to evaluate how the agent behaves Environment: everything that the agent perceives or acts upon Actuators: components that the agent has to act upon the environment Sensors: components that the agent has to sense the environment
hill-climbing search
Version: *steepest ascent* local search algorithm, in which the climber simply moves in the direction of increasing value AKA, *greedy local search*
rectangular grid
a Euclidean 2d grid. Route-finding on this grid usually causes redundant paths
linear programming
a constrained optimization problem defined by constraints being linear equalities and the objective function is also linear. the linear inequalities are known as the *convex set*
queue
a data structure for holding the frontier
plateaux
a flat area of a state-space landscape. A *shoulder* is a plateau that is not a local maximum
agent function
a function that maps the percept sequence to the an agent's actions
successor function
a function that returns all possible successors
Newton-Raphson Method
a general technique of finding the root of a function through line tangent to the function
safely explorable
a goal state is reachable by every state
problem-solving agent
a goal-based agent that uses an atomic representation of the environment in order to reach the goal
ply
a half-move. A full move would be my move and the opponent's move
admissible heuristic
a heuristic which doesn't overestimate the actual path cost Allows the A* algorithm to be optimal
precept sequence
a history of inputs that the agent has perceived
explored set
a list of all of the already explored nodes in order to prevent redundant paths AKA, a *closed list*
hessian
a matrix of second derivatives necessary for calculating the Newton-Raphson efficiently
backtracking search
a modification to DFS, in which we modify the node in memory and revert the node if a solution is not found. Has O(m) memory, as we need to keep track of the up to m actions performed on the node
expectedminimax value
a new minimax function, which incorporates a chance player that is the sum of s and r
leaf node
a node with no children nodes. Their expansion causes the frontier
local maxima
a peak higher than its neighboring states but lower than the global maximum
optimism under certainty
a principle of LRTA* actions that have not been tried in a state s are assumed to lead to goal state
exploration problem
a problem in which the agent must use its actions as experiments in order to learn
subproblem
a problem that is a subset of another problem
priority queue
a queue that pops the element with the highest priority
information gathering
a rational agent that doesn't have knowledge might have to perform actions that modify future precepts. This is _
model-based agent
a rational agent that uses precept history to create a model of the current state of the world
ridge
a sequence of local maximums that make greedy search hard to go throuh
cyclic solution
a solution for a nondeterministic problem that requires a cycle *label*: how to represent a cycle in a cyclic solution
optimal solution
a solution minimizes the path cost
coercion
a solution that works for all possible initial states
FIFO queue
a standard queue, popping the oldest out
first-choice hill climbing
a stochastic hill climbing, in which successors are randomly chosen until one is found that higher than the current one
search tree
a tree that is superimposed on the full game tree and examines enough node to determine where to move
AND-OR tree
a tree that represents the complete state-space in a non-deterministic environment
exploration
a type of information gathering in which an agent performs a series of action to get information in a "partially-observable" environment
line search
a way of adjusting the step size so that we could converge rapidly without overstepping. Way it does this is by doubling step size in the gradient direction until f is decreasing again.
sideways move
a way to combat shoulders. If all neighbors are equal height, then we should keep exploring
factored representation
a way to define the environment as a set of variables / attributes which can have values. Slightly more expressive than atomic representation, but less expressive than a structured representation
effective branching factor
a way to evaluate the A* heuristic effectiveness by noting what the branching factor would be for a particular number of visited nodes
discretization
a way to make a continuous space into a __ space, by adding a small delta value as the neighboring node. If k variables, there will be 2k neighbors for each point (correlating to +- the delta value on each variable)
incremental belief-state search
a way to solve non-observable environments, in which we solve one initial state and proceed to the next one. If it doesn't, it backtracks, finds another solution, proceeds. It does until it finds a solution that works for all the states.
execution
after a solution is found, the agent can began the action sequence. It's call this phase
learning
after the information gathering, the agent needs to do this to process and improve from what it perceives
solution
after the process of looking at sequences of possible actions (or a search), the search algorithm finds this in the terms a fixed action sequence works best in a static environment
simple reflex agent
agents that determine an action based on the current precept. Does not use a precept sequence
software agents
agents that exist only in the software world. Like the Amazon recommendation engine
uninformed search algorithms
algorithms that know nothing more about the problem other than its definition Ie, blind expands nodes, bfs/dfs/itt/depth limited
frontier
all of the unexpanded leaf nodes form this. Usually this is stored in some sort of stack, queue, or priority queue AKA: open list
LIFO queue
also known as a stack
adversary argument
an adversary constructing the state space while the agent explores by placing goals and dead ends willy nilly
agent
an agent is something that views its environment through sensors, and acts upon the environment through actuators.
interleaving
an agent that acts before it has found guaranteed plan in an nondeterministic environment is doing this
rational agent
an agent that does the right thing for any particular percept sequence, by maximizing a particular performance measure, it's dependent on what given knowledge the agent has
utility-based agent
an agent that has a function that evaluates that "happiness" of a particular state, and uses that to determine future actions
omniscient agent
an agent that is all knowing
precept
an agent's input at a given instance
fully observable
an environment in which the agent knows the complete relevant state of the environment at all times. No need for an internal state or exploration
atomic representation
an environment representation composed of wholes ex: map of cities with distance separations. In this case, the cities would be the "atoms"
utility function
an internalization of the performance measure for an agent
redundant path
another path that leads to the same node, that is usually longer than the previous path
triangle inequality
any length of the side of a triangle is less than the sum of the length of the other two sides A way to think of a consistent heuristic, with points of the triangle being n, n', and the goal state
internal state
any memory that is within an agent, for storing precept history
game
any multi agent environment, regardless if the agents are cooperative or competitive
successor
any state reachable by the current state through an action
expected utility
average utility based on a probability distribution
goal-based agent
builds on top of a model-based agent. This agent has not only a working model but a __, that describes a desired final state. With the model, the agent can choose actions that accomplish this __
empirical gradient
calculating the gradient using a small delta. Useful if the objective function is not differentiable
acting humanly
can simulate and emulate humans, so it's more familiar well known test is the Turing test
stochastic hill climbing
chooses randomly from a uphill moves, as a probability function on the hills steepness
real-world problem
compared to a toy-problem, is one whose solutions people actually care about
offline search
computing a complete solution before setting and executing the solution
random-restart hill climbing
conduct a series of hill-climbing searches from randomly generated initial states
erratic vacuum world
contrived example for the showing off nondeterministic environments
environment generator
could be a state generator, to generate possible next states from a current state. Book defines though as a way to train agents by throwing them into a particular simulated environment.
thinking rationally
creating provable correct systems. Example: constraint satisfaction problems and expert systems. Problematic in the health field due to a knowledge cliff.
problem formulation
decide what actions and states to consider, given a goal
open-loop
defines a system that ignores percepts while executing an action
depth-limited search (plus, what are it's problem-solving performance measures?)
depth-first search with a specified depth limit, call it l Is not complete Is not optimal TC: b ^ l SC: bl
known
describe an environment the laws of the physics are known
unknown
describes an environment in which the laws of physics are not known. Can be fully observable but unknown. Ex: a new video game in which you don't know the rules.
continuous
describes the way state, time, and precepts and actions in the environment are. If they are this, then they can have continuous values.
discrete
describes the way state, time, and precepts and actions in the environment are. If they are this, then they can have distinct values.
transposition
different permutation of the move sequence that end up in the same position *transposition table*: a hash table of transpositions, so that they don't have to be explored again
acting rationally
doing the best / optimal action. Usually this is based on some sort of objective function. If the objective function(s) is not aligned with human values, it might not behave humanly. Example: studying for an exam.
episodic
each sequence of action is independent from the others ex: spotting defective parts in an assembly line
8-queens problem
eight queens on a chessboard so they don't attack
uncertain
either not fully observable OR not deterministic
nondeterministic
even more extreme than stochastic, because we do not know the probability distributions of each possible outcome from an action
Sliding Block Puzzles
example is the 8-puzzle. Randomized positions for numbers, try the moves that bring them back in order
uniform-cost search (plus, what are it's problem-solving performance measures?)
expand the tree using a priority queue on order of its step cost Is complete Is always optimal TC = SC: O( b ^ (1 + C* / e) )
localization
finding out where a robot is, given a map of the world and a sequence of percepts and actions
VLSI layout problem
fitting components on board to optimize certain parameters
chance nodes
for *stochastic games* (games that combine luck and skill), the minimax must include these nodes, drawn in circles. Each {0} has an *expected value* based on its probability function
contingency plan
for a nondeterministic problem, it is if-then sequence of actions that solve the system AKA *strategy*
belief state
for a partially or non observable environment, the set of all states that the agent believes that the environment could be
goal formulation
for a problem-solving agent, determine what the desired goal is
condition-action rule
for a simple reflex agent, this is the rule that defines an action for a particular current precept
pattern database
for heuristics, we can store subproblems in this type of database, in which we know the solution and step cost. This way, our heuristics become more accurate and faster to compute
genetic programming
genetics applied to the program instead of the bit strings
unobservable
have absolutely no knowledge about the environment. Seemingly impossible, but sometimes still able to solve the problem
heavy tailed distribution
heavier tails than the exponential distribution
search strategy
how to determine which node to expand next in a search tree
search cost
how to evaluate the effectiveness of an algorithm: this is the algorithm's time complexity + (maybe memory complexity)
total cost
how to evaluate the effectiveness of an algorithm: this is the search cost + the path cost of the solution found
zero-sum game
if one person loses, the other one wins
autonomy
if the agent can learn and adapt on its own, it has this. Otherwise, the agent behaves completely on prior knowledge and is very fragile
deterministic
if the agent's actions have predictable effects. Ie, given a current state and the agent's action, we could predict the next state
dynamic
if the environment can change while the agent is deliberating. Ex: an actual Roomba room.
static
if the environment cannot change while the agent is deliberating. Ex: Our particular Roomba simulation
dead-end
if the environment is irreversible, an agent might reach this, in which no goal state is reachable.
simulated annealing
imagine a ping pong ball trying to get to the global minimum. We shake hard first (T is very high) to bump it out of local maxima. As the temperature decreases, the shaking is lowered. Implemented by randomly choosing next move. If next move is less, go. If more, then prob is related to temperature and how much worse it is.
terminal test
in a game search, checks to see if the game is over
schema
in a genetic algorithm, this refers to the substring in which some portions are unspecified. String that match this schema are called *instances* Schemas that have a high fitness functions will become more populous
step size
in a gradient ascent / gradient descent algorithm, this is the size of alpha (multiply by gradient to find Δx)
randomization
in order to prevent infinite loops, a simple reflex agent might use this in order to pick a next action
cutoff test
instead of the terminal test, if using a evaluation an evaluation function, we use this test that checks if we've reached the maximum depth
evaluation function
instead of traversing all the down a minimax tree, cut the search off early and use a heuristic this. This turns nonterminal nodes into terminal leaves
intelligent
intelligent agents are agents that behave rationally
toy problem
just a useful contrived example to illustrate AI problems
local beam search
k parallel threads that run search in their areas to generate successors. The k best are chosen for the next run. Unlike random restart, the k states talk to each other, and tell unfruitful nodes to come to them.
irreversible
leads to a infinite competitive ratio. If some actions that an exploring agent takes cannot be untaken.
LRTA*
learning real-time A*, an exploring algorithm with memory
genetic algorithm
like stochastic beam search, except instead of choosing k nodes asexually, k nodes are chosen as population, and sexually combine to form the k new start nodes on the weight of their *fitness functions* the genetic mating occurs through crossovers between two substring representation of the
stochastic beam search
like stochastic search, this is a variation of local beam search in which the next k chosen nodes is chosen randomly based on their fitness
convex optimization
linear programming is a special class of this. a constrained optimization problem in which the constraint is any convex region and the objective be any function that is convex within the region.
current node
local search operates on this, rather than on paths in the graph
monitoring
maintaining one's belief state at any time AKA *filtering*, *state estimation*
branching factor
max(the number of successors for any arbitrary node) In other words, the most children that any node can have. For example, discrete roomba has b=5 (suck, north, south, east west)
randomized behavior
might be beneficial in competitive multi agent environments in order to thwart predictability
partially observable
might have noisy inaccurate sensors, or missing data. Like our local Roomba robot.
multiagent
more than one agent in the environment ex: chess, or taxi driving
killer moves
moves that are explored first in alpha-beta pruning so as to make the algorithm more efficient
repeated state
nodes that already have been expanded that are part of the frontier again. Generating them is called generating a loopy path
optimally efficient
of all optimal algorithms with a particular heuristic function, A* is the most efficient one
single agent
only one agent in the environment (such as a crossword puzzle)
local search
operate using a single current node and move to neighbors of that node
incremental formulation
operators that augment the state description Ex: 8-queens problem, but add queens one by one in such that none of the queens are attacked
sequential
opposite of episodic ex: chess and taxi driving
gradient descent
opposite of hill climbing, find the minimization of a function
performance element
part of a learning system, this adaptive component of the learning agent takes sensor data and turns them into actions
critic
part of the learning agent, this component gives feedback from the sensors to the *learning element*, which in turns adapts the *performance element*
problem generator
part of the learning agent, this component suggests future actions that will lead to informative experiences for the learner
route-finding problem
problem defined in terms of locations and links between them
touring problem
problem defined in terms of locations and links, but also must complete a circuit (so must have the a store of visited cities)
optimization problem
problem for finding what is the optimal values for a particular objective function
constrained optimization
problem search in which certain hard constraints must be met, as well as the objective function maximized
task environments
problems spaces for which agents are the solutions. Can be specified through PEAS
random walk
randomly chooses action, will eventually find the goal or complete exploration given a finite space
metareasoning
reasoning about what computation to do. An example of this is alpha-beta pruning, in which we decided to do only a subset of computations because it was more efficient. "reasoning about reasoning"
game tree
represents state of the game and all possible next states after all actions a player or opponent takes. Can be very large
search tree
root node is initial state, nodes are possible states and edges are actions to reach those states
bidirectional search
search forward on the initial node, and backwards on the goal node
uninformed search
search strategies that have no additional information about the states provided beyond the problem definition AKA *blind search*
real-time search
searching happens in real-time
terminal states
set of states in which the game has ended
prediction
simply generating a new belief state
thinking humanly
simulating and emulating the thought processes of humans. Example: neural networks
complete-state formulation
start with the full complete state but then find a goal state Ex: 8-queens problem, start with all 8 queens on the board, and move them such that none of the queens are attacked
state space
state of states reachable from the initial state by a sequence of actions. Defined by: initial state, actions, and transition model It forms a graph. A path in the graph is the sequence of states connected by a sequence of actions
canonical form
states in this form have the same data representation if the they are equivalent This makes it possible to store the state as a hash map
informed search
strategies that know when one goal state might be more promising than the other AKA *heuristic search*
utility
the "happiness" of the agent. Ie, out of the many possible goal states that the agent could be in, which is the best
agent program
the actual implementation internally of how the agent maps an percept sequence to an action
semidynamic
the environment doesn't change; however, the time affects the agent's performance criteria score
objective function
the goal of an optimization function. Ex: reproductive fitness in nature
global minimum / maximum
the lowest and highest spot (respectively) of a state-space landscape
minimax decision
the move that chooses the optimal move for you
depth
the number of steps to the shallowest goal node
stochastic
the opposite of deterministic. Ex: taxi driving. Might have erratic traffic, action might not lead to expected consequences.
competitive ratio
the ratio of total path cost that an exploring agent traveled : the total path cost if we knew the environment in advance
abstraction
the simplified representation of a problem
object-level state space
the state space of a standard search problem, like route finding.
state-space landscape
the state-space of a local search. Has location and elevation, determined by the objective function or the cost function
Manhattan distance
the sum of horizontal and vertical displacements to its goal state AKA, *city block distance*
minimax value
the value of the move, being the defined by the minimax function Minimax algorithm is depth first
gradient
the vector of the partial derivative of the objective function with respect to each variable. Gives the magnitude and direction of the steepest increase Then, can find the maximum by setting to 0, or using gradient ascent / descent algorithm
horizon effect
there's an unavoidable move that causes serious damage, but we could temporarily avoid it. So it does stupid moves, due to an early cutoff test
separator
this type of search algorithm distinguishes nodes into two types: explored and unexplored
traveling saleperson problem
touring problem, with aim of finding shortest tour that visits every city
breadth-first search (plus, what are it's problem-solving performance measures?)
traverse the tree using a FIFO queue. Is complete Is optimal if path cost is non-decreasing TC: O(b^d) SC: O(b^d)
depth-first search (plus, what are it's problem-solving performance measures?)
traverse the tree using a LIFO queue (aka stack) Is complete in finite state spaces, as long as there is redundancy checks. Otherwise, incomplete Non optimal TC: O(b^d) SC: O(bm) Where m is the maximum length any path in the state space
structured representation
unlike factored representations, these representation stores relationships between a set of variables as well.
types of problems local search can solve
useful for optimization problems (i.e., minimize an objective function) also for continuous state problems
online search
uses interleaving, takes action, observes the environment, and computes the next action
informed search algorithm
uses node info to look for solutions Ie, uses node info or heuristics to decide what to expand next
variables
ways to define the six-dimensional space
imperfect information
we don't have all of the information beforehand, like Poker
perfect information
we have all of the information in the game beforehand, like in chess
alpha-beta pruning
when applied to a minimax, helps to prune away game states that will never be played alpha = highest-value choice we've found so far beta = lowest-value we've found so far
sensorless problem
when there is no percept information at all for the agent AKA *conformant*
Examples of AI Problems
Roomba Spam filtering Voice Assistants (like Siri) Chess and board game players