Logical Agents
Knowledge based agents use a process of reasoning over an internal representation of knowledge to decide what actions to take.
- Knowlege Base (KB): A set of sentences. Each sentence is expressed in a language called a knowledge representing language and represent some assertion about the world
- When a sentence is given that is not derived from other sentences, it’s called an axiom
- Inferece: Deriving new sentences from old.
Ex; Wumpus World
A cave consists of rooms connected by passageways. In the curve there is a wumpus. Wumpus can be shot by the agent, but the agent has one arrow. Some rooms contain bottomless pits.

- Performance measure: +1000 for climbing out of the cave with gold, -1000 for falling into a pit or wumpus, -1 for every action, -10 for using the arrow. Game ends when the agent dies or when climb out of cave
- Environment: a 4x4 grid of rooms. Agent always start at (1, 1), facing east.
- Actuators: Agent can move forward, turn left or right (by 90deg), Safe to enter a square with a dead wumpus. If agent tries to move forward and bump into a wall, then agent doesn’t move. Action shoot can be used to shoot the arrow, arrow continues until it kills the wumpus or hit a wall. Agent can use Climb action to climb out of cave (only from (1, 1) square)
- Sensors: Agent has 5 sensors, each of which gives a single bit of info
- In squares adjacent to wumpus (not diagonal), agent will perceive a stench
- In squares adjacent to a pit, agent will perceive a breeze
- In the square with gold, agent will perceive a glitter
- When agent walks into a wall, it will perceive a bump
- When the wumpus is killed, it emits a scream that can be perceived anywhere in the cave
- This environment is:
- Deterministic
- Discrete
- Static
- Single Agent
- Sequential
- Partially observable
Logic
- Semantics: Define the truth of each sentence with respect to each possible word
- Model: Mathematical abstractions. Has a fixed truth value for every relevant sentence
- If a sentence
is true in model m, we say that m satisfies , or m is a model of
Entailment:
Idea that a sentence follows logically from another sentence.
- Logical Inference: Applying the definition of entailment to derive conclutions
- Model checking: Enumerate all possible models to check that
is true in all models in which KB is true,
If an inference algorithm
Propositional Logic: A very simple logic
- The atomic sentences consists of a single proposition symbol
- There are two propositional symbols with fixed meanings
: Always true : Always false
- Complex sentences are created from simpler sentences, using parenthesis and operators called logical connectives.
(not): negation (and): conjunction (or): disjunction (implies) (if and only if): biconditional 
Semantics
Semantics defines the rules for determining the truth of a sentence with respect to a particular model.