Artificial Intelligence

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/126

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

127 Terms

1
New cards

Strong AI

… - addressing abstract general-purpose problem solving

2
New cards

Weak AI

… - addressing concrete domain-specific task performance

3
New cards

Expert systems

… - Explicitly code the entirety of the information contained in the adult mind

4
New cards

Supervised learning

… - Code only the core mechanisms of the child mind and then expose it to supervised education

5
New cards

Reinforcement learning

… - Supplement learning with (unemotional) punishment/reward in a symbolic communication language

6
New cards

Weak criterion of ML

… -
1. System uses training data for improved performance
2. International ML meetings … operating … unspoken community criterion (p.107) ...“satisfies weak criterion and also involves some biology”
3. Scope of ML: Neural Networks / Genetic Algorithms / Symbolic Methods

7
New cards

Strong criterion of ML

… -
1. and also can communicate its internal updates in explicit symbolic form.
2. New dictum: “Until you have figured out a way for the machine to tell you what it has learned, it is not going to be very interesting to have it learn things anyway”.

8
New cards

Ultra-strong criterion for ML

… -
1. and also can “communicate its internal updates in explicit and operationally effective symbolic form
2. It must also show skill in the role of coach

9
New cards

Prolog

… is the most common logic programming language. … is a variation of clausal form where exactly one atom must be used in the head of each clause (but nested conjunctions, disjunctions and negations of atoms may be used in the body).

10
New cards

facts, rules, queries

INPUT1, INPUT2, INPUT3 - 3 key parts of a Prolog/Datalog program

11
New cards

Facts

… (cf. relational database):
- Extensional definition (one fact per table row)
- Predicate (terms,…)
movie(american_beauty, 1999).

12
New cards

Rules

… (cf. relational views):
- Intentional definition; materialised when needed
- operators
:- if
, and
; or
\+ not
released_after(M,Y) :- movie(M,Z), Z > Y.

13
New cards

Queries

… (cf. relational algebra):
Prolog is much easier than database queries like SQL.
?- (actor(M,A,_) ; actress(M,A,_)), director(M,A), released_after(M,1999).

14
New cards

listing.

… SWI command - shows current predicate definitions.

15
New cards

make.

… SWI command - detect and reload any modified definitions.

16
New cards

ground numbers

Comparison operators for … :
<
>
=<
>=
\==

17
New cards

arbitrary terms

Comparison operators for … :
@<
@>
@=<
@>=
==
\==

18
New cards

term

A … is a constant c, variable X or function f of artity n applied to an n-tuple of terms f(t1 , ... , tn)

19
New cards

atom

An … a proposition p or a predicate r of arity n applied to an n-tuple of terms r(t1 , ... , tn)

20
New cards

formula

A … is an atom a; a logical constant T or ⊥; a negation ¬θ of a formula θ; a conjunction θANDɣ,

disjunction θORɣ or conditional (if) θ←ɣ of formulae θ and ɣ; a universal quantification AllXθ or an existential quantification ExistsXθ of a formula θ with respect to a variable X

21
New cards

prenex normal forms

… - only allow formulae of the form <prefix><matrix> where the prefix is a string of quantifiers and the matrix is a quantifier-free formula

22
New cards

conjunctive normal form

… - most common Prenex Normal Form, where the prefix is further restricted to a string of universal quantifiers and the matrix is further restricted to a conjunction of disjunctions (aka clauses) of atoms or their negations (aka literals)

23
New cards

transitive closure

… allows to define patrilineal ancestorship:

<p>… allows to define patrilineal ancestorship:</p>
24
New cards

Lists

… - prototypical structured term:
empty … : []/0
… constructor: [|]/2
‘[|]’(Head, Tail) is written [Head|Tail]
[Head|[]] is written [Head]
[Head1|[Head2|Tail]] is written [Head1, Head2 | Tail]

25
New cards

list length

Primitive definition of … :

<p>Primitive definition of … :</p>
26
New cards

list member

Primitive definition of … :

<p>Primitive definition of … :</p>
27
New cards

list append

Primitive definition of … :

<p>Primitive definition of … :</p>
28
New cards

bagof(C,Q,L), setof(C,Q,L), findall(C,Q,L)

… formulas: collect all instantiations of term C generated by solutions to query Q all together in list L.

29
New cards

bagof/3

… Prolog formula allows explicit (existential) quantification of (free) query variables (in Q but not in C); and fails if Q fails​.

30
New cards

setof/3

… Prolog formula is like bagof/3, but returns a sorted list (without duplicates)

31
New cards

findall/3

… Prolog formula is like bagof/3 but with all implicit quantification over all free query variables, it succeeds with L=[] if Q fails

32
New cards

Selection rule

A query literal is chosen by a … (which, by default, returns the leftmost literal)

33
New cards

Search rule

A clause is chosen by a … (which, by default, returns clauses from top-to-bottom)

34
New cards

variant of the database clause

A fresh … is created by renaming all of the variables to new ones (alternative clauses can be considered in backtracking).

35
New cards

Substitution

A … is a set of bindings of (distinct) variables to terms:
θ = {X1/t1, …, Xn/tn} where ε is used to denote the empty … . The application of a … θ to an expression E is denoted Eθ and obtained by replacing any (free) variable Xi in E by the corresponding term ti from θ, if one exists.

36
New cards

More general substitution

A substitution θ1 is (as or) … than a θ2 iff there exists some θ3 such that θ1θ3 = θ2

37
New cards

Unifier

A substitution θ is a … of two expressions E1 and E2 iff E1θ=E2θ

38
New cards

Most general unifier (mgu)

A substitution θ is a … of two expressions E1 and E2 iff θ is a unifier of E1 and E2 that is more general than all other unifiers of E1 and E2. We can compute an … as follows:
…(E1,E2,θ)=…(E1{X/t}, E2{X/t}, θ{X/t}) where X is a variable from one expression at the first syntactic position where the two expressions differ, and t is the corresponding term in the other; neither is a variable if there is no …; if both are variables then we can bind either to the other; strictly we should fail if t mentions X but this ‘occurs check’ is usually omitted in Prolog.

<p>A substitution θ is a … of two expressions E<sub>1</sub> and E<sub>2</sub> iff θ is a unifier of E<sub>1</sub>&nbsp;and E<sub>2</sub>&nbsp;that is more general than all other unifiers of E<sub>1 </sub>and E<sub>2</sub>. We can compute an … as follows:<br>…(E<sub>1</sub>,E<sub>2</sub>,θ)=…(E<sub>1</sub>{X/t}, E<sub>2</sub>{X/t},&nbsp;θ{X/t}) where X is a variable from one expression at the first syntactic position where the two expressions differ, and t is the corresponding term in the other; neither is a variable if there is no …;&nbsp;if both are variables then we can bind either to the other; strictly we should fail if t mentions X but this ‘occurs check’ is usually omitted in Prolog.</p>
39
New cards

Search (SLD) Tree

… - shows the search space reachable through backtracking. Nodes are queries: the root is the initial query and children of a node are the resolvents of the parent query on its first literal.
Success branches are leaves with an empty clause, denoted [] (or □).
Failure branches (with no further resolvents) are denoted # (or †,■, _).
A proof tree can be obtained for each success branch by reconstructing the implicit side clauses and their corresponding MGUs.
The computed answer is shown underneath each success branch.

<p>… - shows the search space reachable through backtracking. Nodes are queries: the root is the initial query and children of a node are the resolvents of the parent query on its first literal.<br>Success branches are leaves with an empty clause, denoted [] (or □).<br>Failure branches (with no further resolvents) are denoted # (or †,■, _).<br>A proof tree can be obtained for each success branch by reconstructing the implicit side clauses and their corresponding MGUs.<br>The computed answer is shown underneath each success branch.</p>
40
New cards

Proof tree

… corresponding to the second answer of member(X, [a,b,c]).

<p>… corresponding to the second answer of <strong>member(X, [a,b,c]).</strong></p>
41
New cards

Cut

… operator - has a procedural side-effect of pruning choice points made until now by the current and parent clause.

42
New cards

Green cut

… (for efficiency) - avoid branches that contain no additional answers. … prune redundant failure branches (to avoid unnecessary tests when guards are mutually exclusive).

<p>… (for efficiency) - avoid branches that contain no additional answers. … prune redundant failure branches (to avoid unnecessary tests when guards are mutually exclusive).</p>
43
New cards

Red cut

… (for correctness) - avoid branches that contain “incorrect”/”unwanted” answers. Can further increase efficiency (and also program compactness) by letting us make some guards completely implicit!

<p>… (for correctness) - avoid branches that contain “incorrect”/”unwanted” answers. Can further increase efficiency (and also program compactness) by letting us make some guards completely implicit!</p>
44
New cards

If-Then-Else

… - unline !/0, the choice point of the predicate as a whole (due to multiple clauses) is not destroyed.

45
New cards

new operator

op/3 Prolog directive is used to declare a … :
op(900, fy, \\+).
900 - precedence of new operator (900 is similar to built-in \+).
fy - type of operator. f means prefix - comes before its argument. y means it can take arguments of same/lower precedence.
\\+ - name of the new operator being defined.

46
New cards

Negation-as-failure

… can be defined in terms of cut as shown by the following definitions of the new user-defined operators \\+, \\\+ and \\\\+ which are logically equivalent to Prolog’s built-in \+ operator (at least for calls X not containing explicit cuts):
]

<p>… can be defined in terms of cut as shown by the following definitions of the new user-defined operators \\+, \\\+ and \\\\+ which are logically equivalent to Prolog’s built-in \+ operator (at least for calls X not containing explicit cuts):<br>]</p>
47
New cards

include(:Goal, +List1, ?List2)

… - filter elements for which Goal succeeds. True if List2 contains those elements Xi of List1 for which call(Goal, Xi) succeeds.

48
New cards

exclude(:Goal, +List1, ?List2)

… - filter elements for which Goal fails. True if List2 contains those elements Xi of List1 for which call(Goal, Xi) succeeds.

49
New cards
<p>maplist(:Goal, ?List1, ?List2)</p>

maplist(:Goal, ?List1, ?List2)

… - true if Goal is successfully applied on all elements of the list.

50
New cards

sort/2

… Behaviour - first sort on the values of the first item (if it exists), and then sort on the values of the second items(if it exists):
…([ [g,b], [c,d,e], [f], [] ], S). returns S = [ [], [c, d, e], [f], [g, b] ].

51
New cards

Numeric evaluation

… - 

<p>… -&nbsp;</p>
52
New cards

Term equivalence

… - 

<p>… -&nbsp;</p>
53
New cards

meta-predicate

… clause/2 - succeeds once for every clause in the knowledge base that resolves with the given Goal in order to leave a corresponding Resolvent, which is returned.

<p>… clause/2 -&nbsp;succeeds once for every clause in the knowledge base that resolves with the given Goal in order to leave a corresponding Resolvent, which is returned.</p>
54
New cards

vanilla meta-interpreter

… - Prolog predicate that simulates the evaluation of Prolog queries with respect to (pure) Prolog programs:

<p>… - Prolog predicate that simulates the evaluation of Prolog queries with respect to (pure) Prolog programs:</p>
55
New cards

Depth-bounded meta-interpreter

… - The vanilla meta-interpreter can easily be adapted to customise the search strategy.

<p>… - The vanilla meta-interpreter can easily be adapted to customise the search strategy.</p>
56
New cards

Blind search

… methods - look for goals in a systematic way, but do not take the quality of partial solutions into account (using heuristics).

57
New cards

Agenda-based search

… - makes abstraction of the order in which search nodes are added to and removed from agenda.
Given an +Agenda (represents a set of nodes at the frontier, initially set to start node)
Returns -Goal node (identified by a Goal function), that is accessible from the nodes on the agenda

<p>… - makes abstraction of the order in which search nodes are added to and removed from agenda.<br>Given an +Agenda (represents a set of nodes at the frontier, initially set to start node)<br>Returns -Goal node (identified by a Goal function), that is accessible from the nodes on the agenda</p>
58
New cards

Depth-first search

… -
- Agenda = stack (LIFO)
- Incomplete: may get trapped in infinite branch
- No shortest-path property
- Requires O(B*n) memory; B is branching factor (number of children), n is the depth

<p>… - <br>- Agenda = stack (LIFO)<br>- Incomplete: may get trapped in infinite branch<br>- No shortest-path property<br>- Requires O(B*n) memory; B is branching factor (number of children), n is the depth</p>
59
New cards

Breadth-first search

… -
- Agenda = queue (FIFO)
- Complete: will find all solutions
- First solution found along shortest path
- Requires O(Bn) memory

<p>… -<br>- Agenda = queue (FIFO)<br>- Complete: will find all solutions<br>- First solution found along shortest path<br>- Requires O(B<sup>n</sup>) memory</p>
60
New cards

Iterative Deepening Search

… -
- Combines good features of BFS and DFS
- Optimality of BFS + Memory footprint of DFS
- Repeats work, but works well in practice
In a binary tree, half the nodes are in the leaves

<p>… - <br>- Combines good features of BFS and DFS<br>- Optimality of BFS + Memory footprint of DFS<br>- Repeats work, but works well in practice<br>In a binary tree, half the nodes are in the leaves</p>
61
New cards

Best-First

… search - when adding children into the agenda, we can order them with respect to some easily-computed metric (function) that tries to assess the quality of each node (by estimating the cost of the best solution path through that node). Thus we should put nodes with low scores at the front of the agenda.
Agenda - Priority Queue.
Behaviour - depends on heuristic employed.

<p>… search - when adding children into the agenda, we can order them with respect to some easily-computed metric (function) that tries to assess the quality of each node&nbsp;(by estimating the cost of the best solution path through that node). Thus we should put nodes with low scores at the front of the agenda.<br>Agenda - Priority Queue.<br>Behaviour - depends on heuristic employed.</p>
62
New cards

“A algorithm”

… -best-first search algorithm that aims to minimise the total cost of solution paths via some node n using a metric f which combines the actual cost g of reaching n from the start together with an estimate of the cost of reaching a goal from n.
f(n) = g(n) + h(n)
estimate of total cost along path through n = actual cost to reach n from start + estimate of cost to reach goal from n
h(n) == 0 at any goal

63
New cards

Breadth-first search

An “A" algorithm with f(n) = g(n) gives … 

64
New cards

Greedy best-first search

An “A" algorithm with f(n) = h(n) gives … 

65
New cards

Globally optimistic / admissible

A heuristic is … the estimated cost of reaching a goal is always less than the actual cost (from any node n), h(n) <= h*(n). With … heuristic, an A algorithm is guaranteed to return a solution if one exists.

66
New cards

Monotonic / locally optimistic / consistent

A heuristic is … if it never decreases by more than the cost c of an edge from a node n1 to a child n2.
… is a stronger condition than admissibility. It means that the estimated cost from a node n to the goal, plus the cost of one step to a successor n′, is no greater than the estimated cost from the successor to the goal: h(n)≤cost(n,n′)+h(n′).
With … heuristic, an A algorithm is guaranteed to return an optimal solution if one exists.

67
New cards

Manhattan distance

… formula:

<p>… formula:</p>
68
New cards

Euclidean distance

… formula:

<p>… formula:</p>
69
New cards

Minkowski distance

… formula:

<p>… formula:</p>
70
New cards

The negation operator

… can be defined in Prolog as follows:
neg(G) :- call(G), !, fail.
neg(_) :- true.
?- neg(round(earth)).

71
New cards

c = 1

Define value of cost c in this unit.

72
New cards

Procedure box model

… - the debugger executes a program step by step tracing an invocation to a predicate (call) and the return from this predicate due to either a success (exit) or a failure (fail). When a failure occurs the execution backtracks to the last predicate with an alternative clause. The predicate is then re-invoked (redo). Another source of change of the control flow is due to exceptions. When an exception is raised from a predicate (exception) by throw/1, the control is given back to the most recent predicate that has defined a handler to recover this exception using catch/3.

<p>… - the debugger executes a program step by step tracing an invocation to a predicate (call) and the return from this predicate due to either a success (exit) or a failure (fail). When a failure occurs the execution backtracks to the last predicate with an alternative clause. The predicate is then re-invoked (redo). Another source of change of the control flow is due to exceptions. When an exception is raised from a predicate (exception) by throw/1, the control is given back to the most recent predicate that has defined a handler to recover this exception using catch/3.</p>
73
New cards

Deterministic predicate

… - well-behaved: closing off the REDO port, i.e. “leaving no choicepoint”

<p>… - well-behaved: closing off the REDO port, i.e. “leaving no choicepoint”</p>
74
New cards

Nondeterministic predicate

… - well-behaved if it closes off the REDO port at the last solution, i.e. “leaves no choicepoint”

<p>… - well-behaved if it closes off the REDO port at the last solution,&nbsp;i.e. “leaves no choicepoint”</p>
75
New cards

Semi-deterministic predicate

… - well-behaved: closing off the REDO port, i.e. “leaving no choicepoint”

<p>… - well-behaved: closing off the REDO port, i.e. “leaving no choicepoint”</p>
76
New cards

Multi predicate

… - well-behaved if it closes off the REDO port at the last solution, i.e. “leaves no choicepoint”

<p>… - well-behaved if it closes off the REDO port at the last solution, i.e. “leaves no choicepoint”</p>
77
New cards

Evolutionary computing

… refers to a family of optimization algorithms inspired by biological evolution and natural selection. They're used to find solutions to NP-hard optimization problems. Such techniques are:
- Heuristic (opposite of “exact”) - not guaranteed to find the best solution.
- Stochastic (opposite of “deterministic”) - use random number generators and return different answers every time. Kinds: Genetic Algorithms (GA), Genetic Programming (GP); Evolutionary Strategies; Differential Evolution etc..

78
New cards

metaheuristic

Evolutionary Computing problems are examples of … approaches:
A … is a way to guide search - some are nature or population-based, some build an explicit model of the problem as it’s being solved.

79
New cards

Individual-based metaheuristics

… - in contrast to Evolutionary Computing approaches, … do not use a population of solutions, e.g. hill climbing, simulated annealing, tabu search, etc. .

80
New cards

Simple hill climbing

… algorithm exploits current local knowledge of the search space - not even interested in fully exploring the local neighbourhood:
1. Make a random starting solution.
2. Change it a little.
3. If new solution is better - keep it, else discard it.
4. If stuck - stop (local optimum solution found), else - go to 2.

<p>… algorithm exploits current local knowledge of the search space - not even interested in fully exploring the local neighbourhood:<br>1. Make a random starting solution.<br>2. Change it a little.<br>3. If new solution is better - keep it, else discard it.<br>4. If stuck - stop (local optimum solution found), else - go to <strong>2</strong>.</p>
81
New cards

Steepest ascent hill climbing

… algorithm - Explores the local neighbourhood fully before greedily exploiting the best local next step

<p>… algorithm - Explores the local neighbourhood fully before greedily exploiting the best local next step</p>
82
New cards

Simple Tabu Search

… algorithm -hill climb, but don’t consider solutions on a finite list of previously visited solutions. More exploratory than hill climbing, keeps a record of solutions that haven’t been fully exploited.

<p>… algorithm -hill climb, but don’t consider solutions on a finite list of previously visited solutions. More exploratory than hill climbing, keeps a record of solutions that haven’t been fully exploited.</p>
83
New cards

Simulated Annealing

… algorithm - hill climbing, but moves to worse solutions with a probability (temperature) that is initially high, but decreases as more steps are made. Starts exploratory at high steps, gets more exploitative as temperature falls.

<p>… algorithm - hill climbing, but moves to worse solutions with a probability (temperature) that is initially high, but decreases as more steps are made. Starts exploratory at high steps, gets more exploitative as temperature falls.</p>
84
New cards

Genetic Algorithms

… maintain a population of solutions to help balance the explore/exploit trade-off. They share the same basic form: assess, breed, mutate a population of solutions.

85
New cards

Competition and crossover

… allow success in one part of the space to be exploited by the rest of the population.

86
New cards

Population of solutions

… allows exploration to take place in multiple parts of the solution space.

87
New cards

Population

… - the set of individual solutions that the GA is acting on.

88
New cards

Individual

… - a member of the population

89
New cards

Genotype

… - a string of symbols from some alphabet that encodes a particular solution (aka genome or chromosome)

90
New cards

Phenotype

… - the actual solution encoded by a genotype (blue eyes, blonde hair)

91
New cards

Genotype-phenotype mapping

… - analogous to development

92
New cards

Genes

… (aka loci) - chunks of genome, each taking a value “allele”

93
New cards

Fitness

… - the value or quality of an individual solution phenotype

94
New cards

Selection

… - choosing which current individuals reproduce

95
New cards

Parents

… - individuals selected to reproduce

96
New cards

Offspring

… - the new individuals that result from reproduction

97
New cards

Crossover

… - the recombination of alleles from multiple parents

98
New cards

Mutation

… - replacing offspring alleles with random alternatives

99
New cards

Fitness landscape

… - an evolutionary search space organising all possible solutions according to the neighbourhood relationships that result from GAs “Genotype Structure” and “Genetic Operators”, with landscape “altitude” set by each solution’s fitness.

100
New cards

Simple genetic

… algorithm:

<p>… algorithm: </p>