A short lightening-talk at BarCamp Manchester 2016 covering 3 different types of Artificial Intelligence concepts. Neural Networks, Fuzzy Logic and Logic Programming.
2. Artificial Intelligence
Definition:
The theory and development of computer systems able to perform tasks
normally requiring human intelligence, such as visual perception, speech
recognition, decision-making, and translation between languages.
4. Logic Based Systems
Expert Systems/Axiomatic Systems – The Truth Tables
• Based on First Order Mathematical Logic
Propositional Calculus/Logic, Predicate Calculus
• Used in Electronics (can be reduced to NAND or NOR ‘Gates’)
• Foundations of Logic Programming
• Expert/Diagnostic Systems
Input P Input Q Output
F F F
F T F
T F F
T T T
AND [Gate]
𝑂 = 𝑃 ∧ 𝑄
Input P Input Q Output
F F F
F T T
T F T
T T T
OR [Gate]
𝑂 = 𝑃 ∨ 𝑄
Input P Output
F T
T F
NOT [Gate]
¬𝑃 = 𝑂
Input P Output O Validity
F F T
F T T
T F F
T T T
IMPLIES
𝑃 𝑄
5. Logic Based Systems
Expert Systems/Axiomatic Systems
• 3 Fundamental Rules
• Double Negation – “A Not of a Not, is Not a Not”
¬¬𝑃 = 𝑃
• Modus [Ponendo] Ponens – “If entering an indoor swimming pool and I dive
into it, then I get wet”
𝑃⋀𝐷 𝑊
• Modus [Tollendo] Tollens – “If I am not wet, then I didn’t dive into a pool, or
didn’t enter an indoor swimming pool”
¬𝑊 ¬(𝑃⋀𝐷) ≡ ¬𝑊 ¬𝑃 ∨ ¬𝐷
6. Logic Based Systems
Welcome to Prolog
• Prolog Programming
• Operation:
1. Loading Rules and Facts into
“Fact Database”
2. Query the Database
• Many Implementations
• SWI-Prolog
• SWISH - Online at:
http://swish.swi-prolog.org/
8. Fuzzy Systems
Degrees of Membership
• …Because Straight “in” or “out”
isn’t enough
• (Not Brexit Related)
• “More” or “Less”
• The ‘ers’
• Hard-er, Bett-er, Fast-er, Strong-er…
• Breaks First Order Logic
• Double Negation
• Modus Ponens
• Modus Tollens, kinda
9. Fuzzy Systems
Degrees of Membership and Discrete Decisions
• OR operations
µ(𝐴 ∨ 𝐵)(𝑥) ∶= max{µ𝐴(𝑥), µ𝐵(𝑥)}
• AND operations
µ(𝐴 ∧ 𝐵)(𝑥) ∶= min{µ𝐴(𝑥), µ𝐵(𝑥)}
• NOT (Negation) operations
µ(¬𝐴)(𝑥) ∶= 1 − µ𝐴(𝑥)
Source: Heidelberg University
10. Fuzzy Systems
Sendai Subway Namboku Line
• Opened 1981
• Uses Fuzzy Logic to Control Train
Speeds
• “A bit more…”
• “…A bit less”
• Basis of London’s Docklands
Light Railway
Sendai Subway Namboku
12. [Artificial] Neural Networks
Making Brains
• BIMPA Inspiration
• Simulates Operation of Neurons
• Several Activation Functions
• Mimics Biological Action Potential
• Represented by Graphs
• Nodes = Neurons
• Arcs = Weights
• Supervised or Unsupervised
Learning
• Back-propagate “Errors” to Adjust
Weights
13. ANN: Distributed Analogue Computers
• Neuron are Chained Together
• Mathematical Graph
• Circles are Neurons = Vertices
• Lines are Dendrites = Edges
• Used for:
• Classification
• Approximation
• Regression
• …
• Backpropagation learning
Source: NeuralNetworksAndDeepLearning.com
14. ANN: Distributed Analogue Computers
• Weights on Lines Multiply Input
• Neurons have a biasing
• Output of Each Neuron:
• Sum of all weighted (wn) inputs (xn)
• Plus a bias (b)
• Run through an activation function
• Akin to biological “Action Potential”
• Learns through “Backpropagation”
• Partial Derivatives with respect to
• Weights
• Biasing
Source: https://github.com/cdipaolo/goml/tree/master/perceptron
Heaviside Step
Activation Function