SlideShare a Scribd company logo
1 of 48
Download to read offline
Fundamentals of Decision Making
AI and ML Team
Shriram (Head)
Samyuktaa
Sanjai Balajee
Shreyas Sai
Sushmithaa P
Reinforcement Learning, Knowledge
Representations and many more
Behavioural Conditioning- Pavlov’s Dog
Sutton and Barto’s First Paper
What is it?
→ Learning from outcomes of doing something (Reward or Punishment)
→ Exploration Based
→ Learns some kind of a Policy - Association between actions and input, usually delayed.
→ Learning usually in a World which is random.
Reinforcement Learning
Markov Decision Process
→ Hear the word Markov: It’s all about the states (present,past, future)
→ Conditional Probability
→ MDP: Math used to model a decision-making setup.
→ Important Terms: State, Action, Reward, Transition Probability and
Policy.
→The ‘Agent’ in an ‘environment’ follows a policy to move from one
‘state’ to another (basically does an ‘action’) with a certain ‘Transition
Probability’ and gets a ‘reward’ for the outcomes. The goal of the agent
is to keep mending it’s ways to maximize the long term reward.
Example
RL Algorithms or Frameworks
→ Basic - Q learning and SARSA
→ Key Difference in the Policy it chooses
→ Q learning converges faster
Monte Carlo Tree Search
Resources
To Learn RL:
- Sutton and Barto (the OG)
- Introduction to RL, David Silver (Recommended for an easier understanding)
To try out:
- OpenAI Gym
- W&B
- AWS DeepRacer
To begin with let us try defining knowledge and reasoning.
Knowledge - Knowledge is awareness or familiarity gained by
experiences of facts, data, and situations.
Reasoning - A way to infer from existing data.
Knowledge representation in AI
What is a knowledge based agent?
Knowledge representations allows a KBA or AI agent in
general to answer questions intelligently (really?) and
make deductions about real world facts.
Consider this to be an art of portraying information to a
computer so that the machine can take decisions that are
required.
Now what is Knowledge
representation?
1) Structural
2) Declarative
3) Meta
4) Heuristic
5) Procedural
Types of knowledge to represent
1) Logical
2) Semantic Networks
3) Frames
4) Production rules
Here we’ll focus on Logical and Semantic representations of
knowledge.
Types of Knowledge Representation
Semantic networks are a graphical representation of
knowledge or concepts, where nodes represent concepts, and
edges represent relationships between these concepts.
Semantic networks provide to us a structured way to
represent knowledge and also make complex relations between
entities easy to comprehend.
Semantic Representation
1) Knowledge-Graphs
2) Ontologies (Semantic Web)
Some popular network methods
Cycle of Knowledge Representation
Example: Search Problem- Ask Minimum Cost Path
Inference
Learning
Answer
Model
Data
Question
Types of Models
Inference
Learning
Answer
Model
Data
Question
● State based Models (states, actions and
costs)
● Variable based Models (variables and
factors)
● Logic based Models (Formulas and
inference)
● Knowledge based model
● Use rules to draw conclusions
● Used for
● Logical Reasoning
● Theorm proving
● Verification
Propositional Logic and First-Order Logic
Logic Based Model
Motivation: Smart Assistants
Tell Information Ask Information
It has to digest the given information and reason deeply based on that
information
siri
How do you represent the information?
Natural Language is slippery!
● A penny is better than nothing
● Nothing is better than happiness
● Therefore penny is better than happiness?
We use formal language (Logic)
Example,
First-Order Logic: ∀x. Even(x) → Divides(x,2)
∀x(P(x)→Q(x))
What is logic made of?
Ingredient 1: Syntax
● defines a set of valid formulas
● Example: Rain ∧ Wet
Ingredient 2: Semantics
● set of assignments and configuration for a
formula
● The meaning
Ingredient 3: Inference Rules
● defines a set of operations that can be
performed
Syntax and Semantics
Syntax: What are the valid expressions in this language?
Semantics: What do these expressions really mean?
Different syntax,same semantics
2+3 ⇔ 3+2
Same syntax,different semantics
3/2 (Python2) ⇎ 3/2 (Python3)
Propositional Logic
Propositional Logic
Syntax
● Propositional Symbols (Atomic Formulas): A,B,C
● Logical Connectives: ¬ ∧ ∨ → ⇔
So, If f and g are formulas then the following holds good
Negation: ¬f
Conjunction: f ∧ g
Disjunction: f ∨ g
Implication: f → g
Biconditional: f ⇔ g
Propositional Logic
Examples of PL
P means “It is hot”
Q means “It is humid”
R means “It is Raining”
(P ∧ Q) -> R
“If it is hot and humid, then it is raining”
Q -> P
“If it is humid, then it is hot”
Propositional Logic
Logical Connectives
Model
A Model in propositional logic is assignment of truth
values to the symbols
Consider 3 Propositional Symbols say, P,Q,R
There are 8 possible models w:
P: 0, Q: 0, R: 0
P: 0, Q: 0, R: 1
P: 0, Q: 1, R: 0
P: 0, Q: 1, R: 1
P: 1, Q: 0, R: 0
P: 1, Q: 0, R: 1
P: 1, Q: 1, R: 0
P: 1, Q: 1, R: 1
Propositional Logic
Interpretation function
Let f be a formula
Let w be the model
An interpretation function I(f, w) returns,
● 1 (true) if w satisfies f
● 0 (false) if w does not satisfy f
Propositional Logic
Example
Propositional Logic
Inference Rules
Example of making a inference
● The lights are off. (LightsOFF)
● If the lights are off, then the room is dark (LightsOFF-> Dark)
Therefore, It is dark. (Dark)
LightsOFF, LightsOFF -> Dark (Premises)
Dark (Conclusion)
Propositional Logic
Inference Rules
Modus Ponens
For any propositional symbol P and Q
P, P -> Q (Premise)
Q (Conclusion)
Propositional Logic
Inference Algorithm
Input: set of rules
repeat until no changes to KB:
choose f1,f2,f3………fk from KB
if matching rule f1,f2,f3………fk exists
g
add g to KB
Propositional Logic
Example inference using Modus Ponens
Starting point:
KB= {Rain, Rain -> Wet, Wet -> Slippery}
Applying Modus Ponens to Rain and Rain -> Wet
KB= {Rain, Rain -> Wet, Wet -> Slippery, Wet}
Applying Modus Ponens to Wet and Wet -> Wet -> Slippery
KB= {Rain, Rain -> Wet, Wet -> Slippery, Wet, Slippery}
Propositional Logic
some more rules of inference
Propositional Logic
All Students know arithmetic
SanjjitIsAStudent -> SanjjitKnowsArithmetic
SanjaiIsAStudent -> SanjaiKnowsArithmetic
RamIsAStudent -> RamKnowsArithmetic
and so on
SO CLUNKY!!!!
Propositional Logic
A WEAK LANGUAGE!!
● Cant talk about the properties of the individuals or
relations between individuals (Example, “Bill is tall”)
● Generalisations cant be easily represented (Example, “All
triangles have 3 sides”)
Solution???
First Order Logic
● FOL adds relations, variables and quantifiers
Example: “All elephants are gray”
∀x (Elephant(x) → Gray(x))
Propositional Logic
First Order Logic models the world in terms of
● Objects, which are things with individual identities
○ Example: Students, cars, companies
● Properties of things which distinguish them from other objects
○ Example: blue, square, even
● Relations between objects
○ Example: has-shape, has-color
● Functions, which is a subset of relations where there is only
one “value” for any given “input”
○ Example: fatherOf, BrotherOf
First Order Logic
Constant Symbols, which represent individuals in the real world
● Sanjjit
● 3
● Yellow
Function Symbols, which map individuals to individuals
● friendOf(Sanjjit)=SaiRahul
● colorOf(sky)=blue
Predicate Symbols, which map individuals to truth values
● even(4)
● greater(5,4)
How do we denote FOL?
Variable Symbols
Example: x,y
Connectives
Same as in PL, ¬ ∧ ∨ → ⇔
Quantifiers
Universal ∀x and Existential ∃x
First Order Logic
Quantifiers
Universal Quantification
(∀x)P(x) means that P holds for all values of x in the domain
associated with that variable
Example: (∀x) dolphin(x) → mammal(x)
Existential quantification
(∃ x)P(x) means that P holds for some value of x in the domain
associated with that variable
Example: (∃ x) mammal(x) ∧ lays-eggs(x)
First Order Logic
Examples:
Every gardener likes the sun.
∀x gardener(x) → likes(x,Sun)
Alice and Bob both know arithmetic.
Knows(alice, arithmetic) ∧ Knows(bob, arithmetic)
First Order Logic
More Examples:
All students know arithmetic.
∀x Student(x) → Knows(x, arithmetic)
Some student knows arithmetic.
∃x Student(x)∧Knows(x, arithmetic)
There is some course that every student has taken.
∃y Course(y) ∧ [∀x Student(x) → Takes(x, y)]
First Order Logic
Thank you!!!
Feedback

More Related Content

Similar to GDSC SSN - solution Challenge : Fundamentals of Decision Making

Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)SHUBHAM KUMAR GUPTA
 
Predicate calculus
Predicate calculusPredicate calculus
Predicate calculusRajendran
 
Abdbfhdkmdmdjfmfkmfmfmfjjfjfjfnfnnfnfnfn
AbdbfhdkmdmdjfmfkmfmfmfjjfjfjfnfnnfnfnfnAbdbfhdkmdmdjfmfkmfmfmfjjfjfjfnfnnfnfnfn
AbdbfhdkmdmdjfmfkmfmfmfjjfjfjfnfnnfnfnfnNipunMeena
 
MACHINE LEARNING-LEARNING RULE
MACHINE LEARNING-LEARNING RULEMACHINE LEARNING-LEARNING RULE
MACHINE LEARNING-LEARNING RULEDrBindhuM
 
AI3391 Artificial intelligence session 27 inference and unification.pptx
AI3391 Artificial intelligence session 27 inference and unification.pptxAI3391 Artificial intelligence session 27 inference and unification.pptx
AI3391 Artificial intelligence session 27 inference and unification.pptxAsst.prof M.Gokilavani
 
Logic programming (1)
Logic programming (1)Logic programming (1)
Logic programming (1)Nitesh Singh
 
Unit-4-Knowledge-representation.pdf
Unit-4-Knowledge-representation.pdfUnit-4-Knowledge-representation.pdf
Unit-4-Knowledge-representation.pdfHrideshSapkota2
 
ARTIFICIAL INTELLIGENCE---UNIT 4.pptx
ARTIFICIAL INTELLIGENCE---UNIT 4.pptxARTIFICIAL INTELLIGENCE---UNIT 4.pptx
ARTIFICIAL INTELLIGENCE---UNIT 4.pptxRuchitaMaaran
 
Deep Reinforcement Learning Through Policy Optimization, John Schulman, OpenAI
Deep Reinforcement Learning Through Policy Optimization, John Schulman, OpenAIDeep Reinforcement Learning Through Policy Optimization, John Schulman, OpenAI
Deep Reinforcement Learning Through Policy Optimization, John Schulman, OpenAIJack Clark
 
Introduction of predicate logics
Introduction of predicate  logicsIntroduction of predicate  logics
Introduction of predicate logicschauhankapil
 
Basics of Machine Learning
Basics of Machine LearningBasics of Machine Learning
Basics of Machine Learningbutest
 
Knowledege Representation.pptx
Knowledege Representation.pptxKnowledege Representation.pptx
Knowledege Representation.pptxArslanAliArslanAli
 
Artificial intelligence for Social Good
Artificial intelligence for Social GoodArtificial intelligence for Social Good
Artificial intelligence for Social GoodOana Tifrea-Marciuska
 

Similar to GDSC SSN - solution Challenge : Fundamentals of Decision Making (20)

Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)
 
continuity of module 2.pptx
continuity of module 2.pptxcontinuity of module 2.pptx
continuity of module 2.pptx
 
AI applications in education, Pascal Zoleko, Flexudy
AI applications in education, Pascal Zoleko, FlexudyAI applications in education, Pascal Zoleko, Flexudy
AI applications in education, Pascal Zoleko, Flexudy
 
Predicate calculus
Predicate calculusPredicate calculus
Predicate calculus
 
Abdbfhdkmdmdjfmfkmfmfmfjjfjfjfnfnnfnfnfn
AbdbfhdkmdmdjfmfkmfmfmfjjfjfjfnfnnfnfnfnAbdbfhdkmdmdjfmfkmfmfmfjjfjfjfnfnnfnfnfn
Abdbfhdkmdmdjfmfkmfmfmfjjfjfjfnfnnfnfnfn
 
AI Lesson 11
AI Lesson 11AI Lesson 11
AI Lesson 11
 
MACHINE LEARNING-LEARNING RULE
MACHINE LEARNING-LEARNING RULEMACHINE LEARNING-LEARNING RULE
MACHINE LEARNING-LEARNING RULE
 
Lec 3.pdf
Lec 3.pdfLec 3.pdf
Lec 3.pdf
 
AI3391 Artificial intelligence session 27 inference and unification.pptx
AI3391 Artificial intelligence session 27 inference and unification.pptxAI3391 Artificial intelligence session 27 inference and unification.pptx
AI3391 Artificial intelligence session 27 inference and unification.pptx
 
nnml.ppt
nnml.pptnnml.ppt
nnml.ppt
 
Logic programming (1)
Logic programming (1)Logic programming (1)
Logic programming (1)
 
Unit-4-Knowledge-representation.pdf
Unit-4-Knowledge-representation.pdfUnit-4-Knowledge-representation.pdf
Unit-4-Knowledge-representation.pdf
 
ARTIFICIAL INTELLIGENCE---UNIT 4.pptx
ARTIFICIAL INTELLIGENCE---UNIT 4.pptxARTIFICIAL INTELLIGENCE---UNIT 4.pptx
ARTIFICIAL INTELLIGENCE---UNIT 4.pptx
 
Deep Reinforcement Learning Through Policy Optimization, John Schulman, OpenAI
Deep Reinforcement Learning Through Policy Optimization, John Schulman, OpenAIDeep Reinforcement Learning Through Policy Optimization, John Schulman, OpenAI
Deep Reinforcement Learning Through Policy Optimization, John Schulman, OpenAI
 
Introduction of predicate logics
Introduction of predicate  logicsIntroduction of predicate  logics
Introduction of predicate logics
 
Basics of Machine Learning
Basics of Machine LearningBasics of Machine Learning
Basics of Machine Learning
 
Knowledege Representation.pptx
Knowledege Representation.pptxKnowledege Representation.pptx
Knowledege Representation.pptx
 
Logic 2
Logic 2Logic 2
Logic 2
 
Artificial intelligence for Social Good
Artificial intelligence for Social GoodArtificial intelligence for Social Good
Artificial intelligence for Social Good
 
AI Lab Manual.docx
AI Lab Manual.docxAI Lab Manual.docx
AI Lab Manual.docx
 

Recently uploaded

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 

Recently uploaded (20)

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 

GDSC SSN - solution Challenge : Fundamentals of Decision Making

  • 1. Fundamentals of Decision Making AI and ML Team Shriram (Head) Samyuktaa Sanjai Balajee Shreyas Sai Sushmithaa P Reinforcement Learning, Knowledge Representations and many more
  • 3. Sutton and Barto’s First Paper
  • 4. What is it? → Learning from outcomes of doing something (Reward or Punishment) → Exploration Based → Learns some kind of a Policy - Association between actions and input, usually delayed. → Learning usually in a World which is random. Reinforcement Learning
  • 5. Markov Decision Process → Hear the word Markov: It’s all about the states (present,past, future) → Conditional Probability → MDP: Math used to model a decision-making setup. → Important Terms: State, Action, Reward, Transition Probability and Policy. →The ‘Agent’ in an ‘environment’ follows a policy to move from one ‘state’ to another (basically does an ‘action’) with a certain ‘Transition Probability’ and gets a ‘reward’ for the outcomes. The goal of the agent is to keep mending it’s ways to maximize the long term reward.
  • 6.
  • 8. RL Algorithms or Frameworks → Basic - Q learning and SARSA → Key Difference in the Policy it chooses → Q learning converges faster
  • 10. Resources To Learn RL: - Sutton and Barto (the OG) - Introduction to RL, David Silver (Recommended for an easier understanding) To try out: - OpenAI Gym - W&B - AWS DeepRacer
  • 11. To begin with let us try defining knowledge and reasoning. Knowledge - Knowledge is awareness or familiarity gained by experiences of facts, data, and situations. Reasoning - A way to infer from existing data. Knowledge representation in AI
  • 12. What is a knowledge based agent?
  • 13. Knowledge representations allows a KBA or AI agent in general to answer questions intelligently (really?) and make deductions about real world facts. Consider this to be an art of portraying information to a computer so that the machine can take decisions that are required. Now what is Knowledge representation?
  • 14. 1) Structural 2) Declarative 3) Meta 4) Heuristic 5) Procedural Types of knowledge to represent
  • 15. 1) Logical 2) Semantic Networks 3) Frames 4) Production rules Here we’ll focus on Logical and Semantic representations of knowledge. Types of Knowledge Representation
  • 16. Semantic networks are a graphical representation of knowledge or concepts, where nodes represent concepts, and edges represent relationships between these concepts. Semantic networks provide to us a structured way to represent knowledge and also make complex relations between entities easy to comprehend. Semantic Representation
  • 17.
  • 18. 1) Knowledge-Graphs 2) Ontologies (Semantic Web) Some popular network methods
  • 19. Cycle of Knowledge Representation
  • 20. Example: Search Problem- Ask Minimum Cost Path Inference Learning Answer Model Data Question
  • 21. Types of Models Inference Learning Answer Model Data Question ● State based Models (states, actions and costs) ● Variable based Models (variables and factors) ● Logic based Models (Formulas and inference)
  • 22. ● Knowledge based model ● Use rules to draw conclusions ● Used for ● Logical Reasoning ● Theorm proving ● Verification Propositional Logic and First-Order Logic Logic Based Model
  • 23. Motivation: Smart Assistants Tell Information Ask Information It has to digest the given information and reason deeply based on that information siri
  • 24. How do you represent the information? Natural Language is slippery! ● A penny is better than nothing ● Nothing is better than happiness ● Therefore penny is better than happiness? We use formal language (Logic) Example, First-Order Logic: ∀x. Even(x) → Divides(x,2) ∀x(P(x)→Q(x))
  • 25. What is logic made of? Ingredient 1: Syntax ● defines a set of valid formulas ● Example: Rain ∧ Wet Ingredient 2: Semantics ● set of assignments and configuration for a formula ● The meaning Ingredient 3: Inference Rules ● defines a set of operations that can be performed
  • 26. Syntax and Semantics Syntax: What are the valid expressions in this language? Semantics: What do these expressions really mean? Different syntax,same semantics 2+3 ⇔ 3+2 Same syntax,different semantics 3/2 (Python2) ⇎ 3/2 (Python3)
  • 28. Propositional Logic Syntax ● Propositional Symbols (Atomic Formulas): A,B,C ● Logical Connectives: ¬ ∧ ∨ → ⇔ So, If f and g are formulas then the following holds good Negation: ¬f Conjunction: f ∧ g Disjunction: f ∨ g Implication: f → g Biconditional: f ⇔ g
  • 29. Propositional Logic Examples of PL P means “It is hot” Q means “It is humid” R means “It is Raining” (P ∧ Q) -> R “If it is hot and humid, then it is raining” Q -> P “If it is humid, then it is hot”
  • 31. Model A Model in propositional logic is assignment of truth values to the symbols Consider 3 Propositional Symbols say, P,Q,R There are 8 possible models w: P: 0, Q: 0, R: 0 P: 0, Q: 0, R: 1 P: 0, Q: 1, R: 0 P: 0, Q: 1, R: 1 P: 1, Q: 0, R: 0 P: 1, Q: 0, R: 1 P: 1, Q: 1, R: 0 P: 1, Q: 1, R: 1 Propositional Logic
  • 32. Interpretation function Let f be a formula Let w be the model An interpretation function I(f, w) returns, ● 1 (true) if w satisfies f ● 0 (false) if w does not satisfy f Propositional Logic
  • 34. Inference Rules Example of making a inference ● The lights are off. (LightsOFF) ● If the lights are off, then the room is dark (LightsOFF-> Dark) Therefore, It is dark. (Dark) LightsOFF, LightsOFF -> Dark (Premises) Dark (Conclusion) Propositional Logic
  • 35. Inference Rules Modus Ponens For any propositional symbol P and Q P, P -> Q (Premise) Q (Conclusion) Propositional Logic
  • 36. Inference Algorithm Input: set of rules repeat until no changes to KB: choose f1,f2,f3………fk from KB if matching rule f1,f2,f3………fk exists g add g to KB Propositional Logic
  • 37. Example inference using Modus Ponens Starting point: KB= {Rain, Rain -> Wet, Wet -> Slippery} Applying Modus Ponens to Rain and Rain -> Wet KB= {Rain, Rain -> Wet, Wet -> Slippery, Wet} Applying Modus Ponens to Wet and Wet -> Wet -> Slippery KB= {Rain, Rain -> Wet, Wet -> Slippery, Wet, Slippery} Propositional Logic
  • 38. some more rules of inference Propositional Logic
  • 39. All Students know arithmetic SanjjitIsAStudent -> SanjjitKnowsArithmetic SanjaiIsAStudent -> SanjaiKnowsArithmetic RamIsAStudent -> RamKnowsArithmetic and so on SO CLUNKY!!!! Propositional Logic
  • 40. A WEAK LANGUAGE!! ● Cant talk about the properties of the individuals or relations between individuals (Example, “Bill is tall”) ● Generalisations cant be easily represented (Example, “All triangles have 3 sides”) Solution??? First Order Logic ● FOL adds relations, variables and quantifiers Example: “All elephants are gray” ∀x (Elephant(x) → Gray(x)) Propositional Logic
  • 41. First Order Logic models the world in terms of ● Objects, which are things with individual identities ○ Example: Students, cars, companies ● Properties of things which distinguish them from other objects ○ Example: blue, square, even ● Relations between objects ○ Example: has-shape, has-color ● Functions, which is a subset of relations where there is only one “value” for any given “input” ○ Example: fatherOf, BrotherOf First Order Logic
  • 42. Constant Symbols, which represent individuals in the real world ● Sanjjit ● 3 ● Yellow Function Symbols, which map individuals to individuals ● friendOf(Sanjjit)=SaiRahul ● colorOf(sky)=blue Predicate Symbols, which map individuals to truth values ● even(4) ● greater(5,4) How do we denote FOL?
  • 43. Variable Symbols Example: x,y Connectives Same as in PL, ¬ ∧ ∨ → ⇔ Quantifiers Universal ∀x and Existential ∃x First Order Logic
  • 44. Quantifiers Universal Quantification (∀x)P(x) means that P holds for all values of x in the domain associated with that variable Example: (∀x) dolphin(x) → mammal(x) Existential quantification (∃ x)P(x) means that P holds for some value of x in the domain associated with that variable Example: (∃ x) mammal(x) ∧ lays-eggs(x) First Order Logic
  • 45. Examples: Every gardener likes the sun. ∀x gardener(x) → likes(x,Sun) Alice and Bob both know arithmetic. Knows(alice, arithmetic) ∧ Knows(bob, arithmetic) First Order Logic
  • 46. More Examples: All students know arithmetic. ∀x Student(x) → Knows(x, arithmetic) Some student knows arithmetic. ∃x Student(x)∧Knows(x, arithmetic) There is some course that every student has taken. ∃y Course(y) ∧ [∀x Student(x) → Takes(x, y)] First Order Logic