Intro til AI høst 2022

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Consistent heuristic

- All consistent heuristics are admissible - h(n) <= c(n,a,n') + h(n')

A*

- Best-First search with f(n) = g(n) + h(n) - complete - cost optimality depends on the heuristic. - if heuristic is admissible => cost-optimal - if heuristic is consistent => cost-optimal - if heuristic is inadmissible => sometimes cost-optimal

Greedy best-first search

- Best-first search with f(n) = h(n) - Informed - complete in finite state spaces - incomplete in infinite ones - worst space complexity: O(|V|) - best space complexity: O(bm)

Iterative-deepening A* search (IDA*)

- Dosent keep reached states in memory - At each iteration the cutoff value is the smallest f-cost of any node that exceeded the cutoff on the previous iteration.

"The solution to any problem is a fixed sequence of actions." What environment is talked about?

- Fully observable - Deterministic - Known

Depth-limited search

- Has a depth limit, l, to avoid infinite paths - O(b^l) time complexity - O(b*l) space complexity - not cost-optimal - incomplete

Hill climbing

- Heads in the direction that provides the steepest ascent. - sometimes called greedy local search

Beam search

- Limits the size of the frontier (so it dosent fill up the memory) - Keeps only the k nodes with the best f-values - incomplete - suboptimal

Search problem

- Set of possible states --> state space - Initial state - One or more goal states - Actions available to an agent - Transition model (Result(state, action) = new_state) - Action cost function

How to solve getting stuck on shoulders with hill climbing?

- Sideways move - Difficult on a flat local maximum

Bidirectional search

- Two simultaneous searches, one from the initial state and from the goal state - complete - cost optimal - uninformed - O(b^(d/2)) time and space complexity

Breadth-first search

- Uses a FIFO queue. - All edges must have the same cost - Uninformed - f(n) = depth of the node - O(b^d) time and space complexity - Complete - Optimal

AND-OR search trees

- about finding contingent solutions to nondeterministic problems. - OR nodes - choose an outcome - AND nodes - every outcome must be handled

Uniform-cost search

- aka Dijstras algorithm - Uninformed - The same as Best-First search with g(n) - Complete - Optimal - O(b^(C*/e)) time and space complexity

Problems with hill climbing

- getting stuck in a local maxima - navigation ridges (a sequence of local maxima) - plateaus/shoulders (flat area)

Simplified memory-bounded A* (SMA*)

- just like A* - when memory becomes full, this deals with it

Iterative deepening search

- limits DFS by depth 0, then 1, then 2, ... etc. - Stops when solution is found, or reports failure - Complete - Cost optimal - O(b^d) time complexity - O(b*m) space complexity - uninformed

Weighted A*

- may overestimate - f(n) = g(n) + W * h(n) - bounded suboptimal search

Nodes in search algorithms

- node.State - node.Parent - node.Action - node.Path-Cost (g(n))

Recursive best-first search (RBFS)

- resembles a recursive DFS - uses f_limit

Depth-first search

- same as Best-first search where f(n) = -depth - not cost-optimal --> returns the first solution - Incomplete - O(bm) space complexity (branching factor, max depth) - O(b^m) time complexity

Local search

- searching from start states to neighboring states - does not keep track of paths - does not keep track of reached states - use very little memory - can find reasonable solutions in a large or infinite state space - can solve optimization problems according to an objective function

Evolutionary algorithm

- variant of stochastic beam search - populates the next generation with a process called recombination

3 positive aspects of AI

1. AI in crop management and food production 2. Drive assistance 3. Automation for tedious and dangerous tasks

3 privacy protection methods

1. De-indentification 2. Generalizing fields 3. K-anonimity

3 principles of Robotics

1. Ensure safety 2. Ensure fairness 3. Respect privacy

Fairness in ethics

1. Individual fairness 2. Group fairness 3. Fairness through unawareness

Monte Carlo tree search steps

1. Selection 2. Expansion 3. Simulation 4. Backpropagation

What three components are key in CSPs?

1. X, a set of variables 2. D, a set of domains 3. C, a set of constraints that specify allowable combinations of values.

Genetic algorithm

1. start with k random states 2. choose the fittest (best) states 3. combine the parent states to get a children 4. Introduce random changes (mutations) to child 5. Add child to population 6. repeat from (2) until child is fit enough or because of time

Graphplan

A classical planning approach, which uses a planning graph to encode constraints on how actions are related to their preconditions and effects, and on which things are mutually exclusive.

What is the solution of a CSP? In other words, what kind of assignment is the solution of a CSP?

A complete and consistent assignment.

How is state represented in PPDL?

A conjunction of ground atomic fluent

Clause

A disjunction (∨) of literals.

Horn clause

A disjunction of literals of which at most one is positive.

Definite clause

A disjunction of literals of which exactly one is positive

Goal clauses

A disjunction of literals of which none are positive.

Situation Calculus

A method of describing planning problems in first-order logic.

What is a partial solution?

A partial assignment that is consistent, meaning it does not violate any constraints.

circumscription

A powerful tool of the closed world assumption. Allows sentences to cut down.

extrinsic

A property of a. substance, that is not retained under subdivision. Example: The weight of a loaf of bread, when it is divided in half.

Intrinsic

A property that belongs to the very substance of the object

Satisfiability

A sentence is satisfiable if it is true in, or satisfied by, some model.

What is a sound sentence?

A sentence which is derived only from entailed sentences.

What is validity?

A tautology.

Arc Consistency

All values in a variable's domain satisfy its binary constraints. It also reduces the domains of variables before one begins the search.

Node Consistency

All values in a variable's domain satisfy its unary constraints.

Why is variable assignment fail-first, and value assignment fail-last?

All variables have to be assigned eventually. By choosing the ones that will fail first, there will be on average fewer successful assignments to backtrack over. For value ordering, we only need one solution. It makes to try to look for the most likely first.

Utility-based agents

An agent quantifies how satisfied it is, or have much utility a given a state. This is done with a utility function. Not the only way to be rational.

Fully observable

An agent's sensors give it access to the complete state of the environment at each point in time. Does not need to maintain any internal state to keep track of the world. Examples: Crosswords puzzle, Chess, Backgammon, Image analysis

Cost optimality

An algorithm that finds the lowest path cost of all solutions.

Completness

An algorithm that is guaranteed to find a solution when there is one. Can also correctly report failures.

Partition

An exhaustive decomposition of disjoint sets.

What is the property of completeness in relation to inference?

An inference algorithm is complete if it can derive any sentence that is entailed.

Utility function

An internalization of an agent's performance measure

Closed-world assumption

Any fluent not mentioned in a state is false.

Learning agents

Any type of agent can be built as a learning agent. Learning element, performance element, problem generator, critic

Agent

Anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators. agent = architecture + program

What it is meant by a degree heuristic?

Attempts to reduce the branching factor on future choices by selecting the variable with largest number of constraints.

Stochastic hill climbing

Chooses at random from among the uphill moves

Examples of non-monotonic logics

Circumscription and default logic

Random-restart hill climbing

Conducts a series of hill-climbing searches from randomly generated initial states, until a goal is found.

If an assignment does not violate any constraints? What is it called?

Consistent or a legal assignment.

Continuous

Continuous states, time, percepts and actions. Examples: Taxi, Medical diagnosis, Image analysis, Part-picking robot, Refinery controller.

MAC (Maintaining Arc Consistency)

Detects inconsistencies in forward checking. Strictly more powerful than forward checking because forward checking does the same thing as MAC on the initial arcs in MACs queue; but unlike MAC, forward checking does not recursively propagate constraint when changes are made to the domains of variables.

Forward chaining

Determines if a single proposition symbol q - the query - is entailed by a knowledge base of definite clauses. Also, it is data-driven.

Discrete

Discrete (quantifiable) states, time, percepts and actions. Examples: Crossword puzzle, Chess, Poker, Backgammon, English tutor

Individuation

Division into disjunct objects

Uninformed algorithms

Does not have access to a heuristic function. Examples: Best-first search, Breadth-first search, Uniform-cost search, DFS, Iterative DFS, Bidirectional search

Partially observable

Does not know the complete state of the environment. Needs to maintain some internal state to keep track of the world. Reasons for such an environments could be because inaccurate sensors. Examples: Poker, Taxi, Medical diagnosis, Refinery controller, English tutor, Part-picking robot

Information gathering

Doing actions in order to modify future percepts

Ignore preconditions heuristic

Drops all preconditions from actions. Every action becomes applicable in every state, and any single goal fluent can be achieved in one step.

How can one constraint be written? Suppose X1 and X2 both have the domain {1,2,3}. How can the constraint that X1 > X2 be written as?

Each constraint consists of a pair <scope, relation>. Possible answers: <(X1,X2), {(3,1), (3,2), (2,1)}> <(X1, X2), X1 > X2>

Structured representation

Each state consists of objects which may have attributes of the their own and relationships to other objects. Planning agents

Atomic representation

Each state of the world is indivisible, it has no internal structure.

What is a literal?

Either an atomic sentence (positive) or a negative atomic sentence.

Monte Carlo mainidea

Estimate value of a state as the average utility over a number of simulation of complete games starting from this state. Simulation = playout = rollout

Heuristic function h(n)

Estimates the cost of the cheapest path from the state at node n to a goal state.

Performance measure

Evaluates any given sequence of environment states. A general rule is to design performance measures according to what one actually wants to be achieved in the environment, rather than according to how one thinks the agent should behave.

What does it mean that an assignment is complete?

Every variable is assigned a value.

Action schema (how is it written?)

Example: Action(Fly(p, from, to), Precond: .... Effect: ....

Best-first search

Expands nodes based on an evaluation function. Uses a priority queue. Child nodes are added into frontier if they have not been reached. Re-added to frontier if there is a better path.

Monte Carlo selection policy

Exploration - states that have had few playouts Exploration - states that have done well in the past playouts

What representation does PDDL have?

Factored representation

Monte Carlo Cons

Fails for games where a single move can often change the course of the game

Solving a CSP is not a NP-complete problem. True/false?

False, it is indeed a NP-complete problem.

There are some sentences of propositional logic that is not logically equivalent to a conjunction of clauses. True or false?

False.

Rational agent

For each possible percept sequence, a rational agent should select an action that is expected to maximize its performance measure, given the evidence provided by the percept sequence and the agents built-in knowledge.

Informed algorithms

Has access to a heuristic function. Examples: Greedy BFS, A*, Bidirectional A*, IDA*, RBFS, SMA*, Beam search, Weighted A*

Time complexity

How long an algorithm takes to run.

Space complexity

How much memory an algorithm needs.

Semidynamic

If the environment does not change, but its performance score does, the environment is semidynamic. Examples: Chess (with a clock), Image analysis

First-choice hill climbing

Implements stochastic hill climbing by generating successors randomly until one is generated that is better than the current state

Goal-based agent

In addition to a current state description, there is goal information. Flexible.

What search method is used in relation to sensorless agents or conformant problems?

Incremental belief-state search

Local beam search

It begins with k randomly generated states. At each step, all the successors of all states are generated. If one is the goal the algorithm halts. Otherwise it selects the k best successors from the complete list and repeats.

What is meant by minimum-remaining-values (MRV) heuristic?

It is about what variable one wants to check next when going down the tree in backtracking search. The idea is to go for the variable with the fewest "legal values". Also, one chooses in fact the variable that is most likely to cause a failure soon, thereby contributing to pruning the search tree.

What uninformed search method is preferred when the search space is larger than what can fit in memory and the depth of the solution is not known?

Iterative deepening search

Stochastic beam search

Local beam search can lack diversity as all k searches become focused in a small region. A variant called stochastic beam search can alleviate this. Chooses successors with probability proportional to the successor's value.

MRV heuristic vs. degree heuristic?

MRV heuristic is usually a more powerful-guide, but the degree heuristic can be useful as a tie-breaker.

Agent function

Maps any given percept sequence to an action. It is an abstract mathematical description.

What heuristic is used in relation to local search for CSPs?

Min-conflicts heuristic.

Multi agent

More than one agent in the environment. Competitive multiagent environment if the agents to win over each other. Cooperative multiagent environment if the agents benefit each other with their actions. Examples: Chess, Poker, Backgammon, Taxi, English tutor

Does it exists an algorithm that solves general nonlinear constraints on integer values?

NO

Admissable heuristic

Never overestimates the cost to reach a goal

Does tree-like search check for redundant paths?

No

Is forward search, or backwards search efficient without a good heuristic function? (Planning)

No, one needs good heuristic functions for forward and backwards search.

The least-constraining-value

Once a variable has been selected, the algorithm must decide on the order in which to examine its values. Hence, this heuristic rules out the fewest choices for the neighboring variables in the constraint graph. The selection of values are made to be "fail-last".

Task environment

Performance Environment Actuators Sensors (PEAS)

PDDL

Planning Domain Definition Language. Can handle classical planning domains, and extensions can handle non-classical domains that are continuous, partially observable, concurrent and multi-agent.

Problem-solving agent

Planning ahead. Considers a sequence of actions that form a path to a goal state.

Monte Carlo Pros

Pros: * Better for high branching factor than alpha-beta search * Less sensitive to evaluation function errors than alpha-beta search * Can be applied to new games without evaluation function

Global constraint

Relates the value of an arbitrary number of values. Alldiff is a global constraint in which all of the variables involved in the constraint must have different values.

Binary constraint

Relates the value of two variables. In other words, since each constraint is written as <scope, relation>. In this case the scope is two variables. Example <(SA, NSW), SA != NSW>

Partial-order planning

Represents a plan as graph rather than a linear sequence: each action is a node in the graph, and for each precondition of the action there is an edge from another action that indicates that the predecessor action establishes the precondition.

Learning element

Responsible for making improvements in a learning agent.

Performance element

Responsible for selecting external actions in a learning agent.

Problem generator

Responsible for suggesting actions that will lead to new and informative experiences.

Unary constraint

Restricts the value of single variable. In other words, since each constraint is written as <scope, relation>. In this case the scope is only one variable. Example: <(SA), SA != green>

Backward (regression) search

Searches through state descriptions, starting at the goal and using the inverse of the actions to search backward for the initial state.

Forward (progression) search

Searches through the space of ground states, starting in the initial state and using the problem's actions to search forward for a member of the set of goal states.

Simple reflex agent

Selection actions based on the current percept, ignoring the previous percepts. A correct action can be made if the environment is fully observable.

Simulated Annealing

Selects a random successor of the current state. If the current state is an uphill move it is chosen. If it is not an uphill move it is selected with some probability 0<p<1. This probability decreases with time and the "badness" of the move.

What is a partial assignment?

Some variables are unassigned.

Factored representation

Splits up each state into a fixed set of variable or attributes, each of which can have a value. Planning agents

Open-world assumption

States can both contain positive and negative fluents, and if a fluent does not appear, its value is unknown. Used in sensorless (partially observable) environments

Agent program

The agent function is implemented by an agent program. An agent program is a concrete implementation, running within some physical system.

Unobservable environment

The agent has no sensors to receive percepts from the environment.

Unknown

The agent has to learn how the environment works. Does not refer to the environment, but the agent's (or designer's) knowledge about the "laws of physics" of the environment.

Model-based reflex agent

The agent keeps track of some internal state that depends on the percept history. How to keep track of the world? Transition model (knowledge about how the world works) + Sensor model (how the world is reflected through an agents percepts)

Omniscience

The agent knows the actual outcome of its actions, and acts accordingly.

Agent architecture

The agent program runs on some computing device with physical sensors and actuators. This computing device is the agent architecture.

Episodic

The agent's experience is divided into atomic episodes. Receives one percept, then performs one action. The next episode does not depend on the actions takin in previous episodes. Examples: Image Analysis, Part-picking robot

Percept sequence

The complete history of everything the agent has ever perceived.

What is grounding?

The connection between logical reasoning processes and the real environment in which the agent exists. All sentences may not be grounded, i.e. some sentences in the KB may not be true in the real world.

Percept

The content of an agent's sensors that are perceived.

Sequential

The current decision could affect all future decisions. Examples: Crossword puzzle, Chess, Poker, Backgammon, Taxi, Medical diagnosis, Refinery controller, English tutor

Dynamic

The environment does change while an agent is deliberating. Examples: Taxi, Medical diagnosis, Refinery controller, English tutor

Static

The environment does not change while an agent is deliberating. Examples: Crossword Puzzle, Chess (without clock), Poker, Backgammon

Critic

The learning element uses feedback from the critic on how the agent us doing and determines how the performance element should be modified to do better in the future. (about learning agents)

Non-deterministic

The next state of the environment is NOT completely determined by the current state and the action executed by the agent. Also called stochastic if probabilities are quantified explicitly. Examples: Poker, Backgammon, Taxi, Medical diagnosis, Part-picking robot, Refinery controller, English tutor

Deterministic

The next state of the environment is completely determined by the current state and the action executed by the agent. Examples: Crossword puzzle, Chess, Image analysis

Known

The outcomes (or outcome probabilities if the environment is non-deterministic) for all actions are given. Does not refer to the environment, but the agent's (or designer's) knowledge about the "laws of physics" of the environment.

Distributed representation

The representation of a concept is spread over many memory locations, and each memory location is employed as part of the representation of multiple different concepts.

Two examples of planning problems

The spare tire problem and the blocks world

Frontier

The states to consider searching next.

Classical planning

The task of finding a sequence of actions to accomplish a goal in a discrete, deterministic, static, fully observable environment.

Single agent

There is only one agent in the environment. Examples: Crossword puzzle, Medical diagnosis, Image analysis, Part-picking robot, Refinery controller

Path consistency

Tightens the binary constraints by using implicit constraints that are inferred by looking at triples of variables.

If elevation in a state-space landscape corresponds to an objective function, what then is the aim?

To find the highest peak, the global maximum. This process is called Hill climbing.

If elevation in a state-space landscape corresponds to cost, what then is the aim?

To find the lowest valley, the global minimum. This process is called gradient decent.

Local Consistency

Treat each variable as a node in the graph. An edge between two nodes is the binary constraint between two variables. The idea is to enforce local consistency in each part of the graph, which causes inconsistent values to be eliminated throughout the graph. Examples: Node consistency, Arc consistency, Path consistency, K-consistency.

A resolution-based theorem prover can, for any sentences a and b in propositional logic, decide whether a ⊨ b. True or False?

True

Perform resolution on the following problem: P ∨ ¬Q ∨ R, ¬P ∨ Q

Two accepted answers: 1. ¬Q ∨ Q ∨ R 2. P ∨ ¬P ∨ R

Exhaustive decomposition

Undergrad student and graduate student from a exhaustive decomposition of university students.

Constraint propagation

Using the constraints to reduce the number of legal values for a variable, which in turn can reduce the legal values for another variable, and so on.

Disjoint

When two or more categories do not have any members in common

Forward checking

Whenever a variable X is assigned, there is established arc consistency for it, for each variable Y that is connected to X.

Backwards chaining

Works backwards from the query. If q is known to be true, then no work is needed. Otherwise, the algorithm finds those implications in the knowledge base whose conclusion is q. If all the premises of those implications can be proved true (by backwards chaining), then q is true. Also, it is goal-directed.

Does graph search check for redundant paths?

Yes

Can inconsistencies arise with forward checking?

Yes, in these situations it is good to use an algorithm called MAC (Maintaining Arc Consistency)

Are CSPs commutative?

Yes. For instance there is no difference in assigning NSW = red and then SA = blue, or the other way around.

Conjuncts

^

a is logically equivalent to b if and only if ....?

a entails b, and b entails a.

What does it mean that a entails b?

a entails b, if and only if, in every model in which a is true, b is also true.

Deduction theorem

a ⊨ b if and only if (a → b) is valid (meaning tautology).

What does proof by refutation (contradiction) try to prove?

a ⊨ b if and only if the sentence (A ^ ¬B) is unsatisfiable.

Two example heuristics for the 15-puzzle

h_1 = The number of misplaced tiles h_2 = Manhattan distance

What is meant by monotonicty?

if KB ⊨ a then KB ^ B ⊨ a

Ground resolution theorem

if a set of clauses is unsatisfiable, then the resolution closure of those clauses contains the empty clause

Localist representation

one-to-one mapping of concepts and memory locations.

disjuncts

the symbol for OR, idk how to get it here lol.


Ensembles d'études connexes

Chapter 5 Terms - Small Business management

View Set

Total Health: Choices for a Winning Lifestyle - Chapter 5

View Set

PUCH61 NEUROLOGIC DYSFUNCTION PART 1

View Set

AP2 Chapter 20 Blood Vessels and Circulation Buie Steele

View Set

Understanding Business Chapter 8

View Set

Business Law Chapter 8 Smartbook

View Set