| Maximum marks | 100 |
| Weight | 15% of the total marks for the course |
| Submission deadline | 5pm, Friday, April 19 |
| Submission mode | Electronic, using subversion |
| Estimated time | 20 hours |
| Penalty | 10% per day |
This assignment tests your understanding of the material covered in the first five weeks, up to and including the lecture on Plotting. The assignment will be updated on a regular basis. Clarifications and modifications will be added as and when required. Note that answers should be submitted electronically, using subversion. You will be required to commit one or more files for each question, with specific file names. If you want to commit additional files, for functions that you may have written, that's fine. Just remember to commit the specified files for each question, since that is what we will be looking for as a starting point for your solution.
This is a group assignment and should be completed in groups of 2, unless permission has been obtained from the course convenor to work by yourself. Both people in the group must contribute equally to the assignment. It is strongly recommended that both people in the group work collaboratively, rather than split the workload and work in isolation. Please note that a engn2219 student can only form a group with another engn2219 student, and not with a comp6719 student. Likewise, a comp6719 student can only form a group with another comp6719 student, and not with a engn2219 student.
Note that all work submitted must be entirely your own work. Make certain you use quality information and that you carefully reference all the material that you use. It is unacceptable to cut and paste another author's work and pass it off as your own. Anyone found doing this, from whatever source, will get a zero for the assignment. Any material that you wish to quote should have the source clearly referenced. Read the school's policy on plagiarism, to be found in the Research School of Computer Science Student Handbook.
It is strongly suggested that you start working on the report right away. You can commit as many times as you want. Only the most recent commit will be assessed. Check that your files work on the student system before committing. Please ensure that you copy your committed files to an appropriate folder in your directory on the student system as well.
Note that the ENGN2219 assignment is for the undergraduate students and the COMP6719 assignment for the postgrad students. The two are not interchangeable. If you find problems with this assignment (e.g., something is not clear, or there are broken links), please get in contact with the course lecturer immediately.
R robots are located at the centre of a square room of length L. Each robot moves randomly in a series of discrete steps, in one of four directions, namely, North, East, South or West. At each step, the step size is a random number in the range [0,S] and there is an equal probability of one of the four directions being chosen.
Each wall of the room is of one of the following three types:
You are required to do the following tasks:
Design your program keeping in mind functionality, the potential for reuse and efficiency of code, and error handling. Your code for the first two tasks should be in a file called robots.m, with user input required for moving from task 1 to task 2. You may use as many functions as required. Functions that you think can be reused must be located in separate files. Document your code as appropriate and write a short report on your approach to solving the problem and on the design of your program in this file, in the form of comments. Your code and answer for task 3 must be in a file called robotAnalysis.m.
The marks will be allocated as follows:
| Criteria | Description | Marks |
|---|---|---|
| Your solution and design | A brief write up of your approach to solving the problem and of your program design as comments in the main program file. Good program construction; appropriate use of data structures and functions; and efficiency of code, including use of builtin operators and functions, and error handling, where appropriate. | 15 |
| Documentation | Appropriate documentation. This includes program and function descriptions, author details and appropriate commenting of code. Also include the appropriate time spent, in hours, and your feedback, if any, on the assignment. | 10 |
| Coding Style | This includes use of indentation to make the code easy to read; descriptive variable names; and avoiding the use of global variables. | 5 |
| Task 1 | The code runs and is correct. The correct plot is generated with appropriate and descriptive title and labels. | 30 |
| Task 2 | The code runs and is correct. The correct plots are generated with appropriate and descriptive titles. | 10 |
| Task 3 | The code runs and is correct. Good explanation with appropriate plots. | 25 |
Only attempt this task after completing the required tasks listed above and ensuring that it all works. Now, assume that the step size is discrete. That is, they are integers instead of real numbers. A robot is said to collide with another if it moves to a location that is already occupied by another robot. Draw a plot of the number of collisions as a function of time, with appropriate title and labels. Save this program in a file called robotsBonus.m.
As stated earlier, you will need to submit your assignments electronically using subversion. Read the information on the assignments page for instructions on electronic submission of assignments.
If your submission is late, then a late penalty of 10% per day applies. Assignments will not be accepted one week after the deadline.
Extensions will only be given under special circumstances. Students should send an email to Dr. Ramesh Sankaranarayana stating the reason for the request and attach supporting documentation (e.g., medical certificate). This should be done before the deadline. Requests for extensions after the deadline will not be accepted.