100 likes | 250 Views
Controlling a Robot with a Neural Network. CS/PY 231 Lab Presentation # 9 March 30, 2005 Mount Union College. The Problem.
E N D
Controlling a Robot with a Neural Network • CS/PY 231 Lab Presentation # 9 • March 30, 2005 • Mount Union College
The Problem • To illustrate pattern recognition by a Neural Network, we’ll train a network to recognize when a robot is on a predefined path, and to move it back on the path if it strays to one side • Input signals will come from light sensors • Output signals will control the wheels of the robot
LEGO MindStorms Robots • Constructed from LEGO pieces • Yellow “Brick” contains a processor • Programs are loaded into the Brick via an infrared transmitter connected to a conventional computer • write a traditional program • upload to the robot • robot runs the program when RUN button is pushed
Programming Language • NQC • Not Quite C • Similar to standard programming languages (collection of instructions) • How to interface with a TLearn network? • Write a program that reads Tlearn-formatted files • I’ve done this for you…. (you’re welcome)
Possible Inputs for this problem • Input Signals come from Light Sensors • 1 = light, 0 = dark • Case 1: 0 0 • Both sensors on the road • Case 2: 0 1 • Right sensor is off the road • Case 3: 1 0 • Left sensor is off the road • Case 4: 1 1 • Both sensors off the road • distributed • 4 • 0.5 0.6 0.4 • Choose “Network/Testing Options”, then • choose a specific weight file from the original project
Corresponding outputs for this problem • Two output signals • One for each wheel (1 = move, 0 = stop) • Case 1: • Keep driving straight (both wheels move at same speed) • Case 2: • What should we do (we’re off the road to the right)?
Corresponding outputs for this problem • Case 3: • What should we do (we’re off the road to the left)? • Case 4: • What should we do (where’s the road)?
Network Configuration • 2 input nodes, 2 output nodes • Rest is up to you to define! • Break into 2 person teams, choose a team name, define the .CF file for your network, then go to lab to train your network • Next time, Robot Testing!!!
Controlling a Robot with a Neural Network • CS/PY 231 Lab Presentation # 9 • March 30, 2005 • Mount Union College