BarCamp Manchester 2016: Neuro, fuzzyio, logical

16
Neuro, Fuzzy-o, Logically Speaking An Intro to 3 AI’s @ Axelisys @ EtharUK

Transcript of BarCamp Manchester 2016: Neuro, fuzzyio, logical

Page 1: BarCamp Manchester 2016: Neuro, fuzzyio, logical

Neuro, Fuzzy-o, Logically Speaking

An Intro to 3 AI’s

@Axelisys

@EtharUK

Page 2: BarCamp Manchester 2016: Neuro, fuzzyio, logical

Artificial IntelligenceDefinition:

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.

Page 3: BarCamp Manchester 2016: Neuro, fuzzyio, logical

Logic Systems“Do You Know If…”

Page 4: BarCamp Manchester 2016: Neuro, fuzzyio, logical

Logic Based SystemsExpert 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

Page 5: BarCamp Manchester 2016: Neuro, fuzzyio, logical

Logic Based SystemsExpert 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”

)

Page 6: BarCamp Manchester 2016: Neuro, fuzzyio, logical

Logic Based SystemsWelcome 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/

Page 7: BarCamp Manchester 2016: Neuro, fuzzyio, logical

Fuzzy Logic“It’s not all that clear cut”

Page 8: BarCamp Manchester 2016: Neuro, fuzzyio, logical

Fuzzy SystemsDegrees 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

Page 9: BarCamp Manchester 2016: Neuro, fuzzyio, logical

Fuzzy SystemsDegrees of Membership and Discrete Decisions

• OR operations

• AND operations

• NOT (Negation) operations

Source: Heidelberg University

Page 10: BarCamp Manchester 2016: Neuro, fuzzyio, logical

Fuzzy SystemsSendai 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

Page 11: BarCamp Manchester 2016: Neuro, fuzzyio, logical

Artificial Neural NetworksThe Computing of the Mind

Page 12: BarCamp Manchester 2016: Neuro, fuzzyio, logical

[Artificial] Neural NetworksMaking 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

Page 13: BarCamp Manchester 2016: Neuro, fuzzyio, logical

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

Page 14: BarCamp Manchester 2016: Neuro, fuzzyio, logical

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

Page 15: BarCamp Manchester 2016: Neuro, fuzzyio, logical

Demo: TensorFlow PlaygroundGoogle’s Deep Learning, Simplified

http://playground.tensorflow.org