Artificial Intelligence
Artificial Intelligence
Imperfect information Battle ships, blind tic tac toe Bridge, poker, scrabble, nuclear war
Tic tac toe
Leaf nodes are qualified into +1 for a win, -1 for a loss, 0 for a tie
Min max: each choice is averaged to a # so you pick the move with the highest #
therefore the highest chance to win
O() same as depth first search, space and time are the same because it is essentially
a depth first search
With chess at ~35 possible moves every turn and ~100 moves per game, 35100
would take too long
Pruning (alpha beta)
Parts of game tree that we never have to look at
Generally helps chop of about half of the game tree, depends on order
that
Come up with factors that determine who's winning and how to weight (how
important) each factor is
For non-deterministic games that have chance
You add a third layer, the chance layer
Mapping
Start mobile robot at specific known location, create a map
localization
Given a map, but unknown starting location, have robot figure out where it is
Monte Carlo localization
Chapter 7
Knowledge based agents
Wumpus world
Agent
Knowledge base
Facts and rules
Interface engine
Wumpus world
Has a knowledge base, can sense stuff
Observable?? No | only local perception
Deterministic?? Yes | outcomes exactly specified
Episodic?? No | sequential at the level of actions
Static?? Yes | Wumpus and Pits do not move
Discrete?? Yes
Single-agent?? Yes |Wumpus is essentially a natural feature
World
Any environment
Model
Effort to formally represent a particular world
We say that M is a model of sentence S to mean that S is true in M
Need inference
Wumpus worlds
Satisfy-able
Can be true-sometimes true
Unsatisfiable
Not true in any world
Tautology/valid
Always true
Modus ponens
If a implies b, and ~b, then ~a
Resolution
Inference rule for CNF conjunctive normal form: complete for propositional logic
Each clause can only have or's inside of it, v, and ^and's between them
(avb)^(~c)
7.8
a. Tautology/valid: smoke => smoke
Smoke Smoke=>smoke
True True
False True
b. Neither unsatisfiable nor valid
Smoke Fire Smoke=>fire
Costs space and time both bd+1 very inefficient with space
Expands children, generates them, but doesn’t check, them until previous
generation has generated all children
Uniform-cost search
Equivalent to breadth-first if step costs all equal
Depth-first search
Last In, first out