SlideShare a Scribd company logo
1 of 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.

More Related Content

More from Scott Turner

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 twitterScott Turner
 
Demystifying Blockchain for businesses
Demystifying Blockchain for businessesDemystifying Blockchain for businesses
Demystifying Blockchain for businessesScott Turner
 
Benevolent machine learning
Benevolent machine learningBenevolent machine learning
Benevolent machine learningScott Turner
 
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...Scott Turner
 
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 - RobotsScott Turner
 
Games in Teaching Programming: HE Perspective
Games in Teaching Programming: HE PerspectiveGames in Teaching Programming: HE Perspective
Games in Teaching Programming: HE PerspectiveScott Turner
 
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_2018Scott Turner
 
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 screenScott Turner
 
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...Scott Turner
 
Pyconuk16 junkbots
Pyconuk16   junkbotsPyconuk16   junkbots
Pyconuk16 junkbotsScott Turner
 
Social Robots in Education
Social Robots in EducationSocial Robots in Education
Social Robots in EducationScott Turner
 
Showcase: Curation Software in Higher Education
Showcase: Curation Software in Higher EducationShowcase: Curation Software in Higher Education
Showcase: Curation Software in Higher EducationScott Turner
 
Social robots meet red and smurf
Social robots  meet red and smurfSocial robots  meet red and smurf
Social robots meet red and smurfScott Turner
 
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 ...Scott Turner
 
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 CommunicationScott Turner
 
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 VANETScott Turner
 
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...Scott Turner
 
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 ...Scott Turner
 

More from 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 ...
 

Recently uploaded

Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
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
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
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
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
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
 

Recently uploaded (20)

Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
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
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
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 🔝✔️✔️
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
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
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
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
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
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
 

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.