0% found this document useful (0 votes)
33 views31 pages

Knowledge Representation1

Uploaded by

dolphiverma80
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views31 pages

Knowledge Representation1

Uploaded by

dolphiverma80
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 31

Knowledge Representation

&
Game Theory
“Once acquired, knowledge must be organized for use”

Guided By: Presented By:


Prof. Pushpak Bhattacharyya Saurabh Sohoney
Adil Anis Sandalwala
Road map
Motivation
Introduction to KR
Classification of KR

Introduction to Game Theory


Details of Game tree

Ontology for games


Game Ontology Project

Conclusion
References
Motivation
Knowledge
Search Logic Representation

Machine
Planning
Learning

Expert
NLP Vision Robotics Systems

Source : Prof. Pushpak Bhattacharyya’s lecture slides


Introduction to KR
An area in artificial intelligence that is concerned with
how to use a symbol system to represent “a domain of
discourse”

Once
Onc acquired, knowledge must be organized for use

Most artificial intelligence systems consist of:


 Knowledge Base
 Inference Mechanism
Classification
Knowledge Representation

Unstructured Structured Primitive Oriented

Semantic Nets Conceptual


Dependencies
Predicate calculus

Frames Scripts
Predicate Calculus
By Gottlob Frege

Key points
 Simplest type of representation

 Fully logic based

 Deduction, Abduction and Induction

 Resolution and Refutation

Application: In rule-based systems


Semantic Nets
By Richard H. Richens in 1956
• “The meaning of a concept comes from the ways in
which it is connected to the other concepts”

Game
visiting- isa
team score
Cubs G23 5-3
home-team
Stronger_than
Dodgers

Links can define new entities, e.g. score link between G23 and 5-3
nodes.
Links can also relate two existing entities, e.g. Stronger_than link
between Cubs and Dodgers.
Frames
By Marvin Minsky in 1970

Evolution of Frame System

Definition- A collection of attributes and associated


values that describe some entity in the world

Differs from semantic nets in a way that frames may


involve procedural embedding in place of values of
attributes. (which are called as fillers)
Frames example
EPL-Team Striker
isa: Team isa: EPL-Player
cardinality : 20 *total-goals:
*team-size : *team :
*manager : *stamina :
Chelsea Drogba
instance : EPL-Team instance: Striker
team-size : 24 total-goals : 15
manager : L. P. Scholari team : Chelsea
players : {deco, terry, …} stamina : 90%

This is an example of a part of a frame system involving four frames.


EPL-Team, Chelsea, Striker, Drogba are all frames.
EPL-Team has isa and cardinality as its class attributes.
EPL-Team has team-size and manager attributes which are inherited by its
objects. (indicated by *)
Conceptual Dependency
I gave the man a book •Arrows indicate direction of
dependency
to •Double arrow indicates two way
p o man
R link between actor and action
I  ATRANS book
from •p indicates past tense.
I •ATRANS is a primitive act
•o indicates object case relation.
•R indicates recipient case
relation.

By Roger Schank
Not word primitives, but conceptual primitives are
represented.
Conceptual Dependency contd…
A typical set of primitive acts and their descriptions:
 ATRANS: Transfer of abstract relationship (e.g. give)
 PTRANS: Transfer of physical location of object (e.g. go)
 PROPEL: Application of physical force to an object (e.g. push)
 MOVE: Move of body part by its owner (e.g. kick)
 GRASP: Grasping of an object by an actor (e.g. clutch)
 INGEST: Ingestion of an object by an animal (e.g. eat)
 MTRANS: Transfer of mental information (e.g. tell)
 MBUILD: Building new information from old (e.g. decide)
 SPEAK: Production of sound (e.g. say)
 ATTEND: Focus of a sense organ toward a stimulus (e.g. listen)
Conceptual Dependency contd…
Advantages:
 Fewer Inference Rules are needed than would be required if
knowledge was not broken down into primitives: Rules are
represented once for each primitive act rather than once for
each verb that describes that act.
 Many Inferences are already contained in the representation
itself.
 The initial structure that is built to represent the information
contained in one sentence will have holes that need to be filled.
These holes can serve as an attention focuser for the program
that must understand ensuing sentences.
Disadvantages:
 It requires that all knowledge be decomposed into fairly low-level
primitives. So it gets inefficient in some situations.
 It is only a theory of representation of events . There have been
attempts to describe a set of primitives that can be used to
describe other kinds of knowledge, but this has not been
subjected to same amount of empirical investigation.
Scripts
Entering a Restaurant: Ordering: Eating:
S PTRANS S into restaurant S MBUILD choice of F C ATRANS F to W
S ATTEND eyes to tables S MTRANS signal to W W ATRANS F to S
S MBUILD where to sit W PTRANS W to table S INGEST F
S MOVE S to sitting position S MTRANS “I want F” to W

Exiting:
W ATRANS bill to S
S ATRANS money to W
S PTRANS S to out of restaurant

By Roger Schank and Robert P. Abelson


Represents Sequence of Events
Events are giant casual chain
Scripts contd…
Advantages:
 Ability to predict events that have not been explicitly observed.
John went out to a restaurant last night. He ordered steak. When he paid for
it, he noticed that he was running out of money. He hurried home since it
had started to rain.
Question: Did John eat dinner last night?????
>> Though not explicitly mentioned it can be inferred from the sequence of
events in the representation.
 It focuses attention on unusual events.
John went to a restaurant. He was shown to his table. He ordered a large
steak. He waited there for a long time. He got mad and left.
>> The story represents an unexpected set of events. So once the typical set of
events is interrupted the script can no longer be used to predict other events.
So here we should not infer that John paid his bill but we can infer that he
saw menu since reading the menu would have occurred before the
interruption.
Though Scripts are less general structures than are frames, they
can be very effective for representing the specific kinds of
knowledge for which they were designed.
Syntactic-Semantic Spectrum
Knowledge Representation

Syntactic Semantic

Predicate calculus Semantic Nets

Statistical Methods Frames

Conceptual
Production Logic Dependencies

Scripts
Game Theory
Mostly involves mathematics, logic and algorithm

Zero-sum and Non-zero-sum games:


The game in which win of one player can always be on the expense
of loss of other players is called a zero-sum game.

Key Terms:
 Game Tree
 Utility Function
Minimax Algorithm
The minimax value of the node is the utility (for max) of being in the corresponding
state, assuming that both players play optimally from there to the end of game.

3 S Max

3 A 2 B 2 C Min

3 12 8 2 4 6 15 5 2

With, b = no. legal moves at each point, m = max. depth of the tree
Time Complexity: O(b^m)
Space Complexity: O(bm)
Minimax Algorithm contd…
function Minimax-Decision (state) returns an action
inputs: state, current state in game
returns the a in Actions (state) maximizing Min-Value (Result (a, state))
function Max-Value (state) returns a utility value
if Terminal-Test (state) then return Utility (state)
v  -∞
for a, s in Successors (state) do v  Max (v, Min-Value (s))
return v
function Min-Value (state) returns a utility value
if Terminal-Test (state) then return Utility (state)
v∞
for a, s in Successors (state) do v  Min (v, Max-Value (s))
return v
Alpha-Beta Pruning
3 S
Max

Min 3 A <= 2 B 2 C

3 12 8 2 15 5 2

α - value of best (highest value) choice, found so far at any choice point along the path of Max
β - value of best (lowest value) choice found so far at any choice point along the path of Min

Complexity:
 O(b^(d/2)) with best first order
 O(b^(3d/4)) with random order
Alpha-Beta Pruning contd…
function Alpha-Beta-Search (state) returns an action
inputs: state, current state in game
v  Max-Value(state,− ∞,+ ∞)
returns the action in Successors(state) with value v

function Max-Value (state,α,β) returns a utility value


if Terminal-Test (state) then return Utility (state)
v−∞
for a, s in Successors (state) do
v  Max (v, Min-Value (s,α,β))
if v ≥ β then return v
β  Min(β,v)
return v

function Min-Value (state,α,β) returns a utility value


if Terminal-Test (state) then return Utility (state)
v+∞
for a, s in Successors (state) do
v  Min (v, Max-Value (s,α,β))
if v ≤ α then return v
β  Min(β,v)
return v
Game Ontology
Ontology – specification of concepts

Why ontology for Games?


 Ontology deals with questions concerning what entities exist or can be
said to exist, and how such entities can be grouped, related within a
hierarchy, and subdivided according to similarities and differences.

Prototype theory – Background of Game Ontology

We categorize on perceiving.

Ontology is not developed from the top (more abstract) or the bottom
(concrete and specific).Rather, our ontology grows in a middle-out fashion-
the obvious (most readily observable) categories tend to exist in the middle
of the ontology. As we refine and revisit them, we discover both more
abstract and more specific concepts.
Game Ontology Project
By Zegal, Mateas, Clara, Hochhalter and Lichti in 2005

Interface
 Cardinality of gameworld
 Presentation hardware
 Presentation software
Rules
 gameplay rules
 gameworld rules
 rule synergies
Goals
Entities
Entity manipulation
 Abilities (verbs)
 Attributes (adjectives )
Game Ontology Project contd…

An example of Ontology entry – “ To Own “


Game Ontology example

Interface Rules Goals Entity Entity manipulation

Cardinality of Presentation Presentation


game world Hardware Software

2-dimensional
Example : Chess Ontology
Rules

Gameworld rules Gameplay rules Rule synergies

No move is possible No castling is


out side the 8*8 board Bishop can move only diagonally
allowed after check

A pawn converts to queen when


Entity of player x is killed when any reaches the end of board, alive
entity of player y comes in the same block

If king is checked , a move which doesn’t


remove the check can not be made
Chess Ontology contd...
Goals

Short term goals Long term goals

Avoid the check Kill the front pawn


Check and Mate
Chess Ontology contd...
Entity

Pawn Bishop King


Chess Ontology contd...
Entity Manipulation

Kill the bishop


Move the pawn of the opponent

Move the pawn Move the pawn


one step ahead two steps ahead
Conclusion
KR is the most basic branch of AI which directly feeds to the other
branches of it.

Every area of AI involves a good representation of knowledge for


efficient processing. So for solving any task of data processing,
importance of organization of data is more than the data itself.

Even in the domain of Games, although most of the part involves


mathematics and algorithms, but when it comes to analyze a large
set of games in general, development of Ontology is a must.

This field of research is not going to get saturated, since as we


design a good representation of Knowledge for a problem, the
possibility of coming up with a better representation can never be
denied.
References
[1] E. Rich and K. Knight, “Knowledge Representation,” in Artificial
Intelligence, 2nd ed, McGraw Hill, 1991, pp. 103-303.
[2] S. Russell and P. Norvig, “Game Theory,” in Artificial Intelligence: A
modern approach , 2nd ed, Prentice Hall, 2003, pp. 189-199.
[3] Zagal, Michael Mateas, Clara Fernandez-Vara, Brian Hochhalter and
Nolan Litchi, Towards an Ontological Language for Game Analysis ,
presentd at DiGRA 2005 Conference: Changing Views--Worlds in
Play, 2005.
[4] http://www.cse.iitb.ac.in/~pb/cs621-2008/cs621-lect1-and-2-intro-
2008-7-25.
[5] http://www.wikipedia.org.

You might also like