03 Logical agents Flashcards

1
Q

Knowledge-based agents

A

Knowledge-based agents are able to:
• Maintain a description of the environment
• Deduce a course of action that will achieve goals

Knowledge-based agents have:
• A knowledge base
• Logical reasoning abilities

The performance of a knowledge-based agent is determined by its knowledge base. A knowledge base is a set of representations of facts about the world, called sentences, expressed in a knowledge representation language.

Knowledge base (KB) interface:
• TELL(KB,fact) - Add a new fact
• fact <= ASK(KB,query) - Retrieves a fact
• RETRACT(KB,fact) - Removes a fact

A knowledge-based agent can be built by TELLing it what it needs to know (declarative approach). The agent can be used to solve problems by ASKing questions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Knowledge representation languages should be…

A

Knowledge representation languages should be:
Expressive and concise
Unambiguous and independent of context
• Able to express incomplete knowledge
• Effective inference of new knowledge

Existing languages not suited:
• Programming languages - precise descriptions and recipes for machines
• Natural languages - flexible communication between humans

In AI, logic is used for knowledge representation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Aspects of knowledge representation languages

A

Syntax
– How are legal sentences in the language composed?

Semantics
– What do the sentences mean?
– What is the truth of every sentence with respect to each possible world (model)?

Entailment
The fact that sentences logically follow from other sentences

Inference
How to derive new sentences that are entailed by known ones?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Logical entailment

A

Logical entailment between two sentences: a |= B

  • **B follows logically from a
  • **In every model (possible world) in which a is true, B is also true.

We can also say that an entire KB (all sentences in the knowledge base) entails a sentence: KB |= B

  • B follows logically from KB
  • In every model (possible world) in which KB is true, B is also true.

Model checking: Can check entailment by reviewing all possible models.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Logical inference

A

Logical inference between two sentences: a |- B
means that B can be derived from a by following an inference algorithm (can also say KB |- B). Model checking is an example of an inference algorithm.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Properties of inference algorithms

A

Sound inference
The inference algorithm only derives entailed sentences
• Required property
• Model checking is sound

Complete inference
The inference algorithm can derive any entailed sentence
• Desirable property
• Not always possible

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Types of logic in AI

A

In AI, both propositional and and first-order logic are heavily used

Propositional logic
• Symbols represent true or false facts
• More complex sentences can be constructed with Boolean connectives (and, or, . . . )

First-order logic
• Symbols represent objects and predicates on objects
• More complex sentences can be constructed with connectives and quantifiers (for-all, there-is, …)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Propositional logic

A

Semantics
Semantics defines the rules for determining the truth of a sentence with respect to a certain model. A model in propositional logic fixes the truth (true or false) of every propositional symbol. The truth of a complex sentence is given by the truth value of its parts and the connectives used

Complexity of propositional inference
The checking algorithm is sound and complete, but
• Time complexity is O(2^n)
• Space complexity is O(n)

All known inference algorithms for propositional logic have worst-case complexity that is exponential in the size of inputs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Equivalence, validity and satisfiability

A

Two sentences are equivalent if they are true in the same models.

A sentence is valid (necessarily true, tautological) if it is true in all possible models.

A sentence is satisfiable if it true in some model. A sentence that is not satisfiable is unsatisfiable (contradictory)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Inference by applying rules

A

An inference rule is a standard pattern of inference that can be applied to drive chains of conclusions leading to goal. A sequence of applications of inference rules is called a proof. Searching for proofs is similar (or in some cases identical) to problem-solving by search. Using rules for inference is an alternative to inference by model checking.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Forward and backward chaining

A

Forward chaining
• Start with sentences in KB and generate consequences
• Uses inference rules in forward direction
• Also called data-driven procedure

Backward chaining
• Start with goal to be proven and look for premises
• Uses inference rules in backward direction
• Also called goal-directed procedure

Specialized search algorithms for propositional logic can be very efficient

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Keeping track of state of the world

A

Knowledge base contains general knowledge of how the world works plus specific percept history. All percept need to be indexed by time t to capture changes in percepts: ¬Stench3, Stench4… The term fluent is used for any state variable that changes over time. Effect axioms are used to describe outcome of an action at the next time step. Frame problem: Effect axioms fail to state what does not change as a result of an action. Solved by writing successor-state axioms for fluents, e.g. HaveArrow^{t+1} <=> (HaveArrow^t ^ ¬Shoot^t).

Propositional agent requires very large number of rules.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Wumpus agent

A

Refer to this for examples of everything

How well did you know this?
1
Not at all
2
3
4
5
Perfectly