SlideShare una empresa de Scribd logo
1 de 14
Neurones and robots
Scott Turner
University of Northampton
Single neuron
Aim

   On the line go forward (output=1)

   Off the line go left (output =0)
int w[] ={-1,1};
 int o=1;
 int s1,res1;
 for(;;){
  if (robbie.checkLight1()==true)
   s1=1;
  else
   s1=0;
  res1=w[1]*s1+w[0];
  if (res1>=0)
   o=1;
  else
   o=0;
  if ((o==1))
   robbie.forward1(10);
  if (o==0)
   robbie.tlturn(10);
   Aim: To develop a line-following robot
    based on the two neurones controlling
    the robot.
   The robot has two light sensors on the
    left and right and aims to follow the
    left-hand side of a thick line. The
    sensor produce a ‘1’ when on the
    sensor is on the line and ‘0’ when off
    the line.
Left Sensor   Right Sensor   Output 1   Output 2

0             0              0          0

0             1              0          1

1             0              1          0

1             1              1          1
Left Sensor   Right Sensor   Output 1   Output 2


0             0              1          0


0             1              0          1


1             0              1          1


1             1              0          1
   Your task is to find the weights to
    make the output 1 and 2 in the table
    by selecting weights and then add the
    weights to the code at the end of the
    document. Remember that output will
    be 1 if the weighted sum is greater
    than or equal to 0, otherwise it is 0.
NEXT STAGE
   Alter the routine to find the weights
    itself.
Alternatives


   Get one robot to follow another.

   Get the robot to avoid obstacles.

Más contenido relacionado

Más de Scott Turner

Más de Scott Turner (20)

You too can analyse social media - well twitter
You too can analyse social media - well twitterYou too can analyse social media - well twitter
You too can analyse social media - well twitter
 
Demystifying Blockchain for businesses
Demystifying Blockchain for businessesDemystifying Blockchain for businesses
Demystifying Blockchain for businesses
 
Benevolent machine learning
Benevolent machine learningBenevolent machine learning
Benevolent machine learning
 
Volunteering, It is good for the students, communities and the University : R...
Volunteering, It is good for the students, communities and the University : R...Volunteering, It is good for the students, communities and the University : R...
Volunteering, It is good for the students, communities and the University : R...
 
Code club talk 18 7 2018 - Robots
Code club talk 18 7 2018 - RobotsCode club talk 18 7 2018 - Robots
Code club talk 18 7 2018 - Robots
 
Games in Teaching Programming: HE Perspective
Games in Teaching Programming: HE PerspectiveGames in Teaching Programming: HE Perspective
Games in Teaching Programming: HE Perspective
 
Robots Talk British Computer Society Northampton_17_4_2018
Robots Talk British Computer Society Northampton_17_4_2018Robots Talk British Computer Society Northampton_17_4_2018
Robots Talk British Computer Society Northampton_17_4_2018
 
Blockchain
BlockchainBlockchain
Blockchain
 
Blinking leds
Blinking ledsBlinking leds
Blinking leds
 
The answer's not on the screen
The answer's not on the screenThe answer's not on the screen
The answer's not on the screen
 
Experience of using Spreadsheets as a bridge in the understanding of AI techn...
Experience of using Spreadsheets as a bridge in the understanding of AI techn...Experience of using Spreadsheets as a bridge in the understanding of AI techn...
Experience of using Spreadsheets as a bridge in the understanding of AI techn...
 
Pyconuk16 junkbots
Pyconuk16   junkbotsPyconuk16   junkbots
Pyconuk16 junkbots
 
Social Robots in Education
Social Robots in EducationSocial Robots in Education
Social Robots in Education
 
Showcase: Curation Software in Higher Education
Showcase: Curation Software in Higher EducationShowcase: Curation Software in Higher Education
Showcase: Curation Software in Higher Education
 
Social robots meet red and smurf
Social robots  meet red and smurfSocial robots  meet red and smurf
Social robots meet red and smurf
 
Enhancing computing student employability skills through partnership working ...
Enhancing computing student employability skills through partnership working ...Enhancing computing student employability skills through partnership working ...
Enhancing computing student employability skills through partnership working ...
 
Study of Utilising SCM – MIMO Channel Model in V2V Communication
Study of Utilising SCM – MIMO Channel Model in V2V CommunicationStudy of Utilising SCM – MIMO Channel Model in V2V Communication
Study of Utilising SCM – MIMO Channel Model in V2V Communication
 
Evaluate and Analysis of MAC Protocols for VANET
Evaluate and Analysis of MAC Protocols for VANETEvaluate and Analysis of MAC Protocols for VANET
Evaluate and Analysis of MAC Protocols for VANET
 
Enhancing student employability skills through partnership working in STEM ou...
Enhancing student employability skills through partnership working in STEM ou...Enhancing student employability skills through partnership working in STEM ou...
Enhancing student employability skills through partnership working in STEM ou...
 
Visualising the field -virtual reality and mobile devices with environmental ...
Visualising the field -virtual reality and mobile devices with environmental ...Visualising the field -virtual reality and mobile devices with environmental ...
Visualising the field -virtual reality and mobile devices with environmental ...
 

Último

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 

Último (20)

Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

Derby presentation

  • 1. Neurones and robots Scott Turner University of Northampton
  • 2. Single neuron Aim  On the line go forward (output=1)  Off the line go left (output =0)
  • 3. int w[] ={-1,1}; int o=1; int s1,res1; for(;;){ if (robbie.checkLight1()==true) s1=1; else s1=0; res1=w[1]*s1+w[0]; if (res1>=0) o=1; else o=0; if ((o==1)) robbie.forward1(10); if (o==0) robbie.tlturn(10);
  • 4. Aim: To develop a line-following robot based on the two neurones controlling the robot.
  • 5. The robot has two light sensors on the left and right and aims to follow the left-hand side of a thick line. The sensor produce a ‘1’ when on the sensor is on the line and ‘0’ when off the line.
  • 6. Left Sensor Right Sensor Output 1 Output 2 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1
  • 7. Left Sensor Right Sensor Output 1 Output 2 0 0 1 0 0 1 0 1 1 0 1 1 1 1 0 1
  • 8.
  • 9.
  • 10. Your task is to find the weights to make the output 1 and 2 in the table by selecting weights and then add the weights to the code at the end of the document. Remember that output will be 1 if the weighted sum is greater than or equal to 0, otherwise it is 0.
  • 12. Alter the routine to find the weights itself.
  • 13.
  • 14. Alternatives  Get one robot to follow another.  Get the robot to avoid obstacles.