CS 1301 Homework 6 Stoplight Due: Friday, October 24th, before 11:55pm PM EST. Out of 130 points Files to submit: hw6.py

Similar documents
LEGO MINDSTORMS Education EV3 Coding Activities

Appendix L: Online Testing Highlights and Script

Rover Races Grades: 3-5 Prep Time: ~45 Minutes Lesson Time: ~105 minutes

The Evolution of Random Phenomena

Course Content Concepts

Activities for School

Curriculum Design Project with Virtual Manipulatives. Gwenanne Salkind. George Mason University EDCI 856. Dr. Patricia Moyer-Packenham

Foothill College Summer 2016

Grade 2: Using a Number Line to Order and Compare Numbers Place Value Horizontal Content Strand

MOODLE 2.0 GLOSSARY TUTORIALS

Field Experience Management 2011 Training Guides

Office Hours: Mon & Fri 10:00-12:00. Course Description

The lab is designed to remind you how to work with scientific data (including dealing with uncertainty) and to review experimental design.

WiggleWorks Software Manual PDF0049 (PDF) Houghton Mifflin Harcourt Publishing Company

Business Computer Applications CGS 1100 Course Syllabus. Course Title: Course / Prefix Number CGS Business Computer Applications

Let's Learn English Lesson Plan

INTERMEDIATE ALGEBRA Course Syllabus

BIODIVERSITY: CAUSES, CONSEQUENCES, AND CONSERVATION

Increasing Student Engagement

Pre-AP Geometry Course Syllabus Page 1

ASTR 102: Introduction to Astronomy: Stars, Galaxies, and Cosmology

Chemistry 106 Chemistry for Health Professions Online Fall 2015

ENEE 302h: Digital Electronics, Fall 2005 Prof. Bruce Jacob

Airplane Rescue: Social Studies. LEGO, the LEGO logo, and WEDO are trademarks of the LEGO Group The LEGO Group.

Mathematics Success Grade 7

COMS 622 Course Syllabus. Note:

Social Media Journalism J336F Unique Spring 2016

Connect Microbiology. Training Guide

Moodle Student User Guide

Spinners at the School Carnival (Unequal Sections)

COMMUNICATIONS FOR THIS ONLINE COURSE:

Netsmart Sandbox Tour Guide Script

End-of-Module Assessment Task

STAT 220 Midterm Exam, Friday, Feb. 24

ECE-492 SENIOR ADVANCED DESIGN PROJECT

STUDENT MOODLE ORIENTATION

Instructor. Darlene Diaz. Office SCC-SC-124. Phone (714) Course Information

OCR for Arabic using SIFT Descriptors With Online Failure Prediction

Tour. English Discoveries Online

EDCI 699 Statistics: Content, Process, Application COURSE SYLLABUS: SPRING 2016

Using Proportions to Solve Percentage Problems I

Individual Component Checklist L I S T E N I N G. for use with ONE task ENGLISH VERSION

Academic Integrity RN to BSN Option Student Tutorial

Getting Started Guide

SCT Banner Student Fee Assessment Training Workbook October 2005 Release 7.2

CIS 121 INTRODUCTION TO COMPUTER INFORMATION SYSTEMS - SYLLABUS

Spring 2015 Online Testing. Program Information and Registration and Technology Survey (RTS) Training Session

Experience College- and Career-Ready Assessment User Guide

Adult Degree Program. MyWPclasses (Moodle) Guide

Orange Coast College Spanish 180 T, Th Syllabus. Instructor: Jeff Brown

Module 12. Machine Learning. Version 2 CSE IIT, Kharagpur

BLACKBOARD TRAINING PHASE 2 CREATE ASSESSMENT. Essential Tool Part 1 Rubrics, page 3-4. Assignment Tool Part 2 Assignments, page 5-10

EECS 571 PRINCIPLES OF REAL-TIME COMPUTING Fall 10. Instructor: Kang G. Shin, 4605 CSE, ;

Texas A&M University - Central Texas PSYK PRINCIPLES OF RESEARCH FOR THE BEHAVIORAL SCIENCES. Professor: Elizabeth K.

Data Structures and Algorithms

Summary / Response. Karl Smith, Accelerations Educational Software. Page 1 of 8

Introduction to Information System

/ On campus x ICON Grades

Assessing Children s Writing Connect with the Classroom Observation and Assessment

WHAT DOES IT REALLY MEAN TO PAY ATTENTION?

I. PREREQUISITE For information regarding prerequisites for this course, please refer to the Academic Course Catalog.

Computer Science 1015F ~ 2016 ~ Notes to Students

OC QIS Self Assessment Instructions

CS Machine Learning

Phys4051: Methods of Experimental Physics I

Title: George and Sam Save for a Present By: Lesson Study Group 2

Lecture 2: Quantifiers and Approximation

HSMP 6611 Strategic Management in Health Care (Strg Mgmt in Health Care) Fall 2012 Thursday 5:30 7:20 PM Ed 2 North, 2301

RETURNING TEACHER REQUIRED TRAINING MODULE YE TRANSCRIPT

INTERMEDIATE ALGEBRA PRODUCT GUIDE

GRADUATE SCHOOL DOCTORAL DISSERTATION AWARD APPLICATION FORM

Genevieve L. Hartman, Ph.D.

What's My Value? Using "Manipulatives" and Writing to Explain Place Value. by Amanda Donovan, 2016 CTI Fellow David Cox Road Elementary School

Create Quiz Questions

Preliminary Chapter survey experiment an observational study that is not a survey

CS 1103 Computer Science I Honors. Fall Instructor Muller. Syllabus

Essentials of Rapid elearning (REL) Design

MGMT 3362 Human Resource Management Course Syllabus Spring 2016 (Interactive Video) Business Administration 222D (Edinburg Campus)

FINN FINANCIAL MANAGEMENT Spring 2014

PART C: ENERGIZERS & TEAM-BUILDING ACTIVITIES TO SUPPORT YOUTH-ADULT PARTNERSHIPS

MATH 1A: Calculus I Sec 01 Winter 2017 Room E31 MTWThF 8:30-9:20AM

RESPONSE TO LITERATURE

San José State University Department of Psychology PSYC , Human Learning, Spring 2017

Texas A&M University - Central Texas PSYK EDUCATIONAL PSYCHOLOGY INSTRUCTOR AND CONTACT INFORMATION

State University of New York at Buffalo INTRODUCTION TO STATISTICS PSC 408 Fall 2015 M,W,F 1-1:50 NSC 210

Pair Programming. Spring 2015

General Chemistry II, CHEM Blinn College Bryan Campus Course Syllabus Fall 2011

Software Maintenance

Principal Survey FAQs

2 Any information on the upcoming science test?

IVY TECH COMMUNITY COLLEGE

CHEMISTRY 400 Senior Seminar in Chemistry Spring 2013

Economics 201 Principles of Microeconomics Fall 2010 MWF 10:00 10:50am 160 Bryan Building

General Physics I Class Syllabus

Spring 2015 Achievement Grades 3 to 8 Social Studies and End of Course U.S. History Parent/Teacher Guide to Online Field Test Electronic Practice

Master of Statistics - Master Thesis

TIPS PORTAL TRAINING DOCUMENTATION

Managerial Decision Making

Schoology Getting Started Guide for Teachers

Transcription:

CS 1301 Homework 6 Stoplight Due: Friday, October 24th, before 11:55pm PM EST. Out of 130 points Files to submit: hw6.py For Help: - TA Helpdesk Schedule posted on class website. - Email TAs Notes: PAIR PROGRAMMING Assignment: Work with your PAIR 2 partner! For pair programming assignments, you and your partner should turn in identical assignments. Your Submission must not be substantially similar to another teams' submission. Collaboration at a reasonable level will not result in substantially similar code. Students may only collaborate with fellow students currently taking CS 1301, the TA's and the lecturer. Collaboration means talking through problems, assisting with debugging, explaining a concept, etc. You should not exchange code or write code for others. Don t forget to include the required comments and collaboration statement (as outlined on the course syllabus). Do not wait until the last minute to do this assignment in case you run into problems. If you find a significant error in the homework assignment, please let a TA know immediately. Part I So far you ve taught your robot tricks, how to avoid walls, and even how to navigate an obstacle course. Now, you are going to teach your robot the rules of the road! In this assignment your robot will learn what to do when it approaches a stoplight. To simulate a stoplight, construction paper of various colors (green, yellow, red, and white) will be held in front of your robot and it must determine its actions based on what the color is. The actions are as follows: Green: go forward at full speed (meaning the speed parameter should be 1) for two seconds Yellow: go forward at half speed (0.5) for 2 seconds Red: stop and beep! White: randomly turn either left or right Breaking down the assignment

As with many problems you encounter in computer science, to most effectively solve this problem you should break it down into smaller steps that will then later work together to perform a larger task. Finding the color in front of you Write a function called findcolor() that takes in a picture object as its parameter and returns a string of the color that the picture is. [You may assume you will only be looking at pictures that are primarily a piece of paper of a single color.] Parameter: a picture Return Value: a STRING of the picture s color (i.e. red, green, etc.) Randomly turning either left or right Write a function called turn() that accepts no parameters and somehow uses randomness to turn either left or right, with both being equally probable. The Myro module already has a built in heads() function that essentially flips a coin and returns True or False based on the result. Try to turn as close to 90 degrees as you can. Now, all safe vehicles use a turn signal before turning so you will too! Check out the Myro setled() function, when you turn left, turn the left LED light on and off before doing so to alert the traffic around you, and do the same with the right LED when turning right. Parameters: none Return Value: none Determine what action to take based on the color Putting it all together, write a function called stoplight() that accepts no parameters that will determine the robot s behavior. Within this function, you should have your robot take a picture, find the picture s color, and do the proper behavior based on that color as described above. This function should keep running until it detects a red light (a red picture in front of it) whereupon the robot should stop, beep to indicate it is done, and then function should exit. Parameters: none Return Value: none Tips and Hints: -If your robot is taking a long time to process the large images from the newer fluke 2's, insert this into the beginning of your script: setpicsize( small )

-If you are having trouble identifying the color of the construction paper in front of you, look at how the red, green, and blue values compare to each other by taking a picture of a color, using the show() function to display it in a window, and then clicking on individual pixels. In the output you will see the pixel s location and RGB values If you need help with the image processing functions, go here: http://calicoproject.org/calico_myro#image_processing Part II --- Turning it in, and Demo. Be sure to put the lines from Myro import * and initialize() or init() at the beginning of the file (after the required comments). Be sure not to specify the port parameter in your initialize command, such as initialize( com4 ). This makes it very time consuming to grade if we have to go into your code and change the com port to the one that works on our specific system. Reminder on collaboration statement and submission: This is a pair assignment, but each person is responsible for their own submission. Each group member needs to turn in hw6.py to T-square before the deadline. Please include your name, and all your group members' names in the collaboration statement. Demo: Each group (All members) needs to come to the TA's help desk or recitation to demo the program to one of the TAs, preferably your grading TA. You will be asked questions regarding your code as well. If one of the group members is not present for the demo, his/her grade will be based ONLY on the code portion (a possible 55 points) UNTIL they come see a TA to answer questions relating to the code. Print out and bring a grading sheet (next page) to your demo! The TAs will likely not have copies.

Grading Criteria: Demo (TA s Discretion, see next page) Code Grading Criteria 75 points 55 points turn(): Uses a form of randomness to choose turn direction 4 pts Uses setled() properly as a turn signal 1 pt findcolor(): Correctly named and accepts one picture parameter 2 pts Correctly iterates through all pixels 3 pts Processes the pixel and categorizes its color 5 pts Correctly determines the color of the 15pts construction paper stoplight(): Correctly named 2 pts Takes a picture and finds its color using a 5 pts helper function Moves forward at full speed if green 2 pts Moves forward at half of the previous 4 pts speed if yellow Uses helper function to turn 2 pts Continues running until red is found 10pts

Robot Navigation Assignment TA Demonstration Grading Sheet Group Members: Demo TA: Grading TA (if different): 20 pts Correctly identifies what color is in front of it 5 pts Uses some random function correctly to turn 20 pts Robot does the correct action based on the color in front of it 30 pts All group members understood and could explain the code. Total: / 75