Brock University
Department of Computer Science

COSC 3P95: Assignment1 1

Instructor: Vlad Wojcik mail.gif (1189 bytes)


To ease your way towards the culmination of the course: your team project. Specifically: To evaluate the level of "consciousness" of a robotic system.

Having read the Braitenberg's book "Vehicles" you and your teammates have probably some preliminary idea already of a robot you would like to build, but you may still be unsure how to go about it. These two assignments are meant to be of help.


As you probably know, the everyday concept of "consciousness" is unscientific: We do not have a test that could be used to determine whether a given system (a stone, a tree, an animal -- humans included, or a robot) is conscious or not. Nevertheless, even medical practictioners use some tests aimed to determine the state of a given system of interest. For example:

A paramedic may nudge gently a hockey player laying motionlessly on ice after a collision with another player, hoping for a reaction. A meaningful movement of the patient would assure the paramedic that no major harm was sustained. A random twitch, however, would signify that a patient, although not dead, needs some help. No response whatsoever from a patient would raise serious concern: a gentle slap on his face to trigger a reaction would probably ensue, followed perhaps by shining a lamp into patient's eyes hoping for an involuntary reflex of pupil contraction.

Embedded and robotic systems are no different: Before we can expect of them performing meaningul and useful tasks, their "bodies" (i.e. hardware controlled by some software) must exhibit certain level of "readines" demonstrated by certain expected "reflexes". Although embedded and robotic systems may vary in the mechanical configuration of their hardware, their basic electrical configuration is always the same.

The figure above right shows this configuration. At center is some computer, connected to a number of sensors and actuators (typically motors). The computer processes information acquired by sensors and activates motors in an expected way. We will consider such behaviour as a desired "reflex".

ASSIGNMENT 1: (Due: 11 Oct 2013, 4 PM)

Using two sensors of your choice (but excluding a touch sensor, see HINT below) within the configuration as per figure above at right, write a program making the computer activate a motor of your choice. Two consecutive activations of the same sensor should cause the motor to rotate in opposite directions.

ASSIGNMENT 2: (Cancelled)

It is identical to Assignment 1 (above) but this time use sensor types not used in Assignment 1. Again, do not use the touch sensor. You surely understand: The goal of these exercises is to to make you capable of handling a number of sensors and motors in Ada. It would be smart of you to practice using sensors that you plan to employ in your team project.

HINT: Instead of writing the assignment programs from scratch, you might find it easier to modify the MINDSTORMS Motor Test program, provided to you by David Bockus. There is no shame in this: All programming is done through an iterative, refining process, while giving credit where it is due. Indeed, even the evolution works this way! (but: no credit is given). However: You are not allowed to use the touch sensor in A1 nor A2, because it is used in the demo program.


Both hardcopy (paper) and electronic submission is required. The workings of your system should be demonstrated to your TA.

Hardcopy submission: Your team submission envelope with the standard Cover Page should contain all relevant printouts and supporting documentation, demonstrating your design and flawless behaviour of your program. The envelope should be dropped in the submission box on or before deadline date / time.

Electronic submission: Please create a directory on Sandcastle and place within it all the files (and only the files) to be submitted. To submit issue the command submit3p95, which is interactive in its nature. Obviously, you are allowed to submit your assignment only once. Should you encounter difficulties, please report them to your TA.

Similarly, the electronic submission should be performed on or before deadline date / time.


Possible lateness in assignment submission is counted in days, each period of a day ending at 4 PM. The penalty for late submission of assignments is 25% up to three days (or a part of a day). After that period the penalty is 100%.

While honest cooperation between students is considered appropriate, the Department considers plagiarism a serious offense. For clarification on these issues you are directed to the statement of Departmental Policies and Procedures.

cameo.gif (1740 bytes)Instructor: Vlad Wojcikmail.gif (1189 bytes)
Revised: 1 October, 2013 10:21 PM
Copyright 2013 Brock University