• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/99

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

99 Cards in this Set

  • Front
  • Back

Problem Types :


deterministic, fully observable

single-state problem




agent knows the state and what do outcomes are, solution is a sequence

Problem Types :


Deterministic, non-observable

conformant problem




agent does not know where he is, solution (if it exists) is a sequence

Problem Types :


Nondeterministic and/or partially observable

contingency problem




gain more information through percepts, solution is tree or policy

Unknown state space

exploration problem




online learning

Single-state problem formulation (components)

state (initial state)




actions




goal-test




path cost definition

State vs node

state is representation of physical space




node is data strcture with parent, child, depth, path-cost

fringe - tree search

the list of currently open nodes, where an open node is one that has been reached, but not fully analysed




FIFO for BFS, LIFO for DFS

Size of Graph

b - maximum branching factor of the tree




d - depth of the least-cost solution




m - max-depth of the state space

BFS

Fifo fringe




complete if b is finite


time.complex: O(B^(d+1))


space.complex: O(b^(d+1))


optimal: yes, not generally

Uniform-cost search

fringe = ordered by path cost




complete if step cost >= e


time: O(b^(C/e)) where e is epsilon, C is the cost of optimal solution


space: O(b^(C/e))


optimal: yes - nodes are expanded in increasing order of path-cost

DFS

fringe = LIFO




complete: finite only


time: O(b^m), but practical in certain cases


space: O(bm)


optimal: no if prematurely terminated

iterative deepending / depth limited

limit to certain depth (DFS until there)




increase depth iteratively




complete: yes


time: O(b^d)


space: O(bd)


optimal: yes for step cost = 1

Repeated state

Trees fail exponentially




use graph search

Best First search

tree search, but with a strategy concerning expansion of nodes




rate nodes according to desirability

Greedy search

uses evaluation function h(n) as estimated cost from n to goal




complete: only with repeated-state checking


time: O(b^m) but heuristic can improve


space: O(b^m) - stores all nodes


optimal: no

A* search

avoids already expensive paths




f(n) = g(n) + h(n)




g(n) is cost so far, h(n) estimated cost




h(n) <= true cost, admissibility




A* is optimal

A* optimality proof

optimal, because for any suboptimal goal, f(n) is accurate




Then the final goal will have smaller cost than suboptimal, but since h is admissible, f(suboptimal) >= f(node on optimal path)




then suboptimal goal will never be expanded




A* is optimistic, so when least-cost solution is found, optimistic estimates could only be worse

A* performance

complete: yes unless infinitely smaller than goal


time: exponential in (rel.error of h x length of solution)


space: all nodes


optimal: yes

Dominance of evaluation functions

if a function h(n) dominates h2(n),




then for all n h(n) >= h2(n)




dominating functions preferred for search

Iterative improvement algorithms

path is irrelevant, goal state is solution




keep only current state, and improve it (instance based)

Hill-climbing

neighbour is highest value successor of currentNode




if neighbour is better than currentNode, then replace

Simulated Annealing

escaping local minima/maxima




time-temperature mapping




replace currentNode by Neighbour not only if bette,r but also when the probability of T allows




e^(D/T) where T is the time and D is the delta between neighbour and currentNode

CSP (def)

state is defined by variables X with values from a domain D




goal test is a set of constraints specifying the allowable combinations of values for given variables




solution to CSP is assignment of values to variables that satisfy constraints

Constraint Graph

graph where all edges show certain constraints, nodes are the variables

Types of constraints

unary: certain variables must have or cannot have certain values




binary: certain variables must be equal to each other or different




high-order: 3 or more variables




preferences: some form of cost for certain assignments

basic CSP solution (backtracking search)

provide empty initial assignment




attempt to assign value to given selected variable with no conflict




- if no legal assignment exists, terminate unsuccessfully




backtracking: return result only if not failure, try all combinations if necessary

Improving backtracking

select variable to test which is most constrained, or selectively the variable which is most constraining on others




use the least constraining value, such that most possibilities are provided for other variables




forward checking to eliminate options which creates impossible options




propagation (separate card)



improving backtracking - constraint propagation

arc consistency:




for every value of x, there is some allowed y




check in both directions and all directions, eliminating options that are not possible because of arcs. Then re-check neighbours

Tree structured CSP

can be solved in O(n * d^2) time.




Select root, order variables from root to leaves such that parents come before the children in the ordering




remove inconsistencies from n to 2




then assign from 1 to n, whatever is consistent with parent

Iterative algorithms for CSP

typically work with complete states, but can be modified




allow states to have unsatisfied constraints, variables are reassigned by operators




assign value that has fewest constraints

Minimax

min and max players, utility at leaves of tree




complete: yes if finite solution


optimal: yes against optimal opponent


time: O(b^m) exact solution pretty infeasible


space: O(bm)

Evaluation functions

function (linear, polynomial) to predict desirability of a state given features




act as orderings, exact values don't matter

Cut-off search

limiting depth of prediction




4 ply chess is a typical noobie

ply

depth of search

alpha-beta pruning

prune what cannot be used




can reach O(b^(m/2)) - twice the depth

non-deterministic games (probabilities)

introduce an additional chance layer between min and max




value of chance node, is average of children

pruning in non-deterministic trees

not really effective, if in exam, just deal with it

Knowledge bases agent

agent is given knowledge




can then ask itself what actions to pursue




knowledge is independent of implementation

Entailment

one thing follows form another




KB entails a, then a is true if KB is true

Models

m is a model of sentence a, if a is true in m




M(a) is the set of all models of a




then KB entails a IFF M(KB) subset M(a)

Inference i

i is a procedure with which a can be derived from KB

Soundness of an inference

i is sound if




whenever a can be inferred from KB, it holds true that KB entails a

Completeness of an inference

i is complete if




whenever KB entails a, a can also be inferred from KB

Horn Form

conjunction of atomics in single implication or basic atomics




used for forward and backward chaining

forward chaining

fire any rules whose premises are satisfied in KB and add conclusion to KB until query q

backward chaining

prove query q:




check if q is known, otherwise prove by backward-chaining the premises of a rule which concludes q




avoid loops

FC vs BC (chaining for horn-clauses)

FC is data-driven, may do unnecessary work




BC is goal-driven - may be less than linear

Conjunctive Normal Form

conjunction of disjunctions (with negations allowed)




so an AND chaining of clauses which are internally OR chained, and may have NOTs




Required for Resolution

Resolution inference rule

rule in which there exists a TRUE and NOT in a combination of two clauses, they can both be removed and the remainders are the result




sound and complete for propositional logic

Conversion steps to CNF (propositional)

1. remove IFF with two IF inferences


2. eliminate a->b with NOT(a) OR (b)


3. move NOT inwards with Morgan's rule or double-negation

Resolution algorithm

add negation of provable desired item,




if contradiction then it must hold

Basics of Logic



Truth for FOL

based on a model and interpretation




model contains >=1 objects and their relations

Universal Quantifier and FOL

usually used with "->" implication, not with AND




true in model m IFF predicate/function holds for every x in the model

Existential Quantifier FOL

usually used with "AND" connective




true if in the model, there is an object to make it satisfy

Situation calculus

method of recording change in FOL




adds a situation argument to non-eternal predicates

Universal Instantiation for FOL

For all objects / ground-terms for variable v apply certain rule





Existential Instantiation

we replace the variable v with a new constant symbol, a Skolem Constant




hence the term Skolemize

propositionalizing FOL KB

removing Existential and Universal Claims, only inferences and predicates-with-objects remain

Unification

propositionalization creates many instantiations, too many




get inference more quickly if we find substitution that matches premises required directly

Generalized Modus Ponens

just like normal MP




used where exactly one positive literal exists

Forward Chaining for FOL

sound and complete for first-order definite clauses




matching rules to new literals is expensive - NP-hard

backwards chaining for FOL

space is linear




incomplete (loops), and inefficient due to repetitions




used for logic programming

Conversion to CNF (FOL)

1. eliminate biconditionals and implications


2. move negations inwards


3. standardize variables: use different variables


4. Skolemize: remove existential quantifiers with function


5. Drop universal quantifiers


6. distribute ANDs and ORs

Search vs Planning (systems)

Search fails with complex, sequential tasks

Planning System (3 points)

1. open action and goal representation for selection




2. divide and conquer by creating sub-goals




3. relax requirements for sequential construction of solutions

Strips Operator

action (with parameters)


pre-conditions: must be conjunction of positive literals only


post-conditions/effect: conjunction of literals (can be negative)




must show all changes states for post-conditions

Partial Order Plan

has start, finish, causal links and temporal ordering




causal link between post and preconditions, temporal between steps




complete if every precondition is achieved

Properties of POP

sound, complete and systematic




heuristics can be applied to it





Product Rule for Probabilities

P( a + b ) = P(a|b) P(b) - reduction from simple conditional formula

Chain rule for Probabilities

recursively using the product rule to break down a string of conjunctions into product of conditionals

Normalization

removing the denominator of conditional with a factor of the entire solution

Conditional Independence

when some of the "given" terms do not affect the conditional probability of the "query" term

Unit-preference Resolution strategy

only resolving two variables if the resulting variable has less literals

Bayes Rule

P(a|b) = P(b|a)P(a) / P(b)




or in other words: P(cause | effect) = P(certain effect with given cause) / P(effect regardless of cause)

Bayesian Network

acyclic graph, directed




conditional distribution for each node given its parents

Conditional Probability Table (CPT)

All possible combinations of outcomes of parents and the probability of current node given that set

Compactness of CPT and Bayesian Network

2^k rows for k parents




Entire network thus n * 2^k values

full joint distribution

all possible combinations of variables - inefficient




Bayesian network uses less (linear for n)

Local Semantics (M. blanket)

every node is conditionally independent of non-descendents given its parents




(only dependent on parents)




Markov's blanket: conditionally independent of all nodes given: parents, children, parents of children

Constructing Bayesian Net

Iteratively add all variables




for every variable, add as parents if conditional probability is affected by potential parent




prefer causal - simpler to construct

Compacting the CPT

Noisy-OR




Independent Failure Probability is stored




the probability of the negation is stored for the instance where only one of the parents is true. Then all other combinations can be computed

Cases of Continuous variables

1: continuous variable with discrete+cont. parents


2: discrete variable, continuous parent(s)

Continuous child in Bayesian Network

create conditional density function for every assignment of discrete parents using continuous parents' value




linear Gaussian

Discrete variable (cont. parents) in Bayesian

using probit (similar to sigmoid, but sigmoid has longer tails)

Inference by enumeration

Sum all according probabilities




Where conditional is expanded into the conjunction of all terms




Then summed over all hidden (or unnecessary variables)




time O(d^n) with n=variables, d=branching

Inference by variable elimination

Inferencing (improvement over by enumeration): storing intermediate results (factors) by summations from right-to-left




summing out: combine factors as function of given variable. Then summed out variables are combined and marked as summed

Irrelevant variables in Bayesian

can be removed, and irrelevant if not in ancestors or evidence





moral graph of Bayes

all parents are married and the graph is undirected

Stochastic Simulation

drawing n samples from distribution S




compute approx. posterior prob P'




show that P' converges to P

Rejection sampling

only samples where all evidence variables hold true are selected




for small many variables, P(e) is exponentially small

Likelihood weighting

every sample is weighted according to its likelihood to correspond to evidence




Evidence variables are fixed, and their probability multiplied, originally with w=1

Constraints of Rational Preferences

agent must obey the following for pref. of actions:




orderability: one must exist


transitivity: by def


continuity: continuous range that can be balanced for item


substitutability: can be balanced with parameter


monotonicity: can force preference with unequal parameter

Maximising Expected Utility (MEU)

U(A) >= U(B) IFF A >= B




choose action for which the expected utility is maximised

Examples of Utility

Russian roulette, micromorts (1:1M of dying)




money not so great - people are risk-averse

Dominance of Utility

strict dominance: for any multi-attribute, choice A is preferred over B (so utility is preferable)




stochastic dominance: if for every value of integral better, then it dominates (and for every attribute)




can be shown on arcs in "graph"

Preference Independence

x3 is independent of x1 and x2 (preferentially) IFF for all values of x1 and x2, x3 does not affect the preference

Value of Information

E(bestAction|info) - E(bestAction|no-info)

Qualitative Behaviour of value of Information

distinct utilities: information worth little




much overlap, spread wide: information worth much




much overlap: tight spread: information worth little (cannot indicate much)