AssessmentType | Individualassignment.SubmitonlineviaCanvas→Assign- ments → Assignment 1. Marks awarded for meeting require- ments as closely as possible.Clarifications/updates may be madeviaannouncements/assignmentFAQ/relevantdiscus- sionforums. |
DueDate | Week6,August30,Friday11:59pm |
Marks | 20 |
Pleasereadallthefollowinginformationbeforeattemptingyourassignment. This is an individualassignment.You may not collude with any other person (or people) and plagiarise their work.Everyone is expected to present the results of their own thinking and writing.Never copy another student’s work (even if they “explain it to you first”) andnevergiveyourwrittenworktoothers. Keepanyconversationhigh-levelandnever show your solution to others.Never copy from the Web or any other resource or use Generative AI like ChatGPT togenerate solutions or the report.Remember you are meant to develop the solution by yourself - assessment is designed to encourage everyone tolearn,andyouarenotdoingyourselfanyfavoursbytakingshortcuts.Suspectedcases ofcollusionorplagiarismwillbedealtwithaccordingtoRMITAcademicintegrity policy.
In the submission (your PDF file for the report of Task B) you will be required to certify that the submitted solutionrepresents your own work onlyby including the following statement:
Please periodically check the assignment FAQ for further clarifications about specifica- tions.In addition, the lecturer will go through different aspects of the assignment each week,soevenifyoucannotmakeittothelectorials,besuretocheckthecoursematerial page on Canvas to see if there are additional notes posted.
Inthisassignment,youwillimplementanumberofwell-establisheddatastructures for developing a maze generation program and evaluate their performance to determine whatwouldbethebestdatastructureindifferentsituations.Thisassignmentaimsto help crystallise the analytical parts of the course and familiarise you with certain data structures,howimplementationdecisionscanhaveaninfluenceonrunningtimes,and howtoempiricallyevaluatedifferentpossibledesignchoices(inthiscase,datastructures).
Thisassessmentrelatesto3learningoutcomesofthecoursewhichare:
Amazeistypicallya2Dgridofcellsandwalls,anentranceandanexit.Theaimis tofindapathfromtheentrancetotheexit.SeeFigure1foranexample.Thereare strategiesandalgorithmstosolveamaze,i.e.,findsuchasolutionpathgivenamaze. Therearealsostrategiesandalgorithmstogenerateamaze;inthisassignment,wewill focus on generation of mazes, however, the implementation for maze generation is already providedinthePythonskeleton(detailedinSection4)andyouwillneedtoonlyfocus ondatastructuresthatrepresentmazesinourmazegenerationscenario.
Wearefocusedonperfectmazes,wherethereisalwaysapathfromentrancetoexit (bythevirtuethatinaperfectmaze,thereisalwaysapathfromacellinthemazeto any other cell in the maze).In addition, in this assignment, we focus on 2D, square cell mazes,i.e.,eachcellhas4sides.Thereisnostandardwaytoreferencethecells,hence weadoptedtheconventionissuedinFigure1,with(0,0)denotingthebottomleftcell, andcolumnsincreaseaswetraveltotherightofthemaze(page),androwsincreasesas we travel up the maze (page).In order to specify the entrances and exits, we have added one row above, and one row below the maze, and one column to the left, and one columnto the right of the maze.This means the row below the maze is referenced as -1, the row aboveby5(ifwehave5rowsinthemaze),theadditionalcolumntotheleftofthemaze by-1,andthecolumntotherightby5(ifwehave5columnsinthemaze).Thisallows ustostillbeabletousetheoriginalindexing,i.e.,(0,0)referstothebottomleftcellof themaze,butstillabletoreferencethelocationofentrancesandexits.
Theassignmentisbrokenupintoanumberoftasks,tohelpyouprogressivelycomplete the project.
Figure 1:Sample 5 by5 maze.The entrances are il- lustrated as arrows pointing towards the maze, and ex-its are illustrated as arrows pointing away from the maze. The cells of the maze are in- dexed from 0, and the row and column indices are drawn outside the maze.Note that the bottom left cell is (0,0), and top right cell is (4,4).This follows the convention that matplotlib follows (we use that for visualisation). Notetheentrancesarespec- ifiedas(0,-1)and(-1,1)and
exitsas(5,4)and(3,5).
Inordertogeneratemazes,weneedawaytorepresentthem.Intheassignmentand this task, you will implement a Maze abstract data type using graphs.Your task is to complete the implementation of a number of sections in the provided Python skeletoncode.The implementation of the maze using 2D arrays is provided as an example in the skeleton.
Mazes can be implemented using a number of data structures.We provide the imple- mentationof2Darraysandyouarerequiredtoimplementtwoothers:
You are required to implement the maze abstract data type using the following data structures:
Figure2:Samplegraphswith4verticesand4edges.
columnscorrespondtoedges.Anentryinthematrixindicateswhetheravertexis
incidenttoanedge.
Example Consider the two graphs depicted in Figure 2.The edge list representation ofthese graphs are:
EG1={(A,B),(A,D),(B,C),(C,D)}
EG2={(A,C),(A,D),(B,C),(B,D)}
Andtheincidencematrixrepresentationsareasfollows:
e1 | e2 | e3 | e4 | e1 | e2 | e3 | e4 | ||||
A | 1 | 1 | 0 | 0 | A | 1 | 1 | 0 | 0 | ||
MG1: | B | 1 | 0 | 1 | 0 | MG2: | B | 0 | 0 | 1 | 1 |
C | 0 | 0 | 1 | 1 | C | 1 | 0 | 1 | 0 | ||
D | 0 | 1 | 0 | 1 | D | 0 | 1 | 0 | 1 |
We provide Python skeleton code (see Table1) to help you get started and ensure we haveconsistentinterfacingtoruncorrectnesstesting.Table1alsoliststhefilesthatyou reallyneedtomodify/implement(inthedescriptioncolumn). Youneedtocompletethe implementationofedgeListGraph.pyandincidenceMatGraph.py.Wehaveprovidedthe code to construct and provide functionality of a maze in the graphMaze file.It is mostly generic, but does assume a certain way of implementing the maze using the two graph datastructures.Ifthatdoesnotalignwithyourapproach,pleasefeelfreetomodify
file description
mazeTester.py Code that reads a configuration file then exe- cutes the generation using specified data struc- ture.No need to modify this file.
maze/maze.py Abstract class for mazes.All implementationsof a maze should implement the Maze class.No need to modify this file.
maze/util.py Coordinates class, and other utlity classes and methods.No need to modify this file.
maze/graph.py Abstract class for graphs. All graphimplemen- tations should implement the Graph class.No need to modify this file.
maze/arrayMaze.py 2D array data structure implementation ofa maze.No need to modify this file.
maze/graphMaze.py Graph based data structure implementations of a maze.Modify if need to.
maze/edgeListGraph.py Codethatimplementsanadjacentlist(for
maze).Completetheimplementation.
maze/incMatGraph.py Codethatimplementsanadjacentmatrix(for maze).Complete the implementation.
maze/maze viz.py Modifiedcodeusedtovisualisegeneratedmazes using matplotlib.No need to modify this file.
generation/mazeGenerator.py Abstractclassformazegenerators.Noneedto
modifythisfile.
generation/recurBackGenerator.py Implementationoftherecursivebacktracking
mazegenerator.Noneedtomodifythisfile.
README.txt Pleasereadthisfirst,itmentionshowtorunthe code.No need to modify this file.
Table1:TableofprovidedPythonskeletonfiles.
it, but please ensure the same functionality is still maintained and that you are able to generate mazes.
Please note that the first time you run this implementation, the two provided configu-ration files will use the array data structure as the representation of the maze.If youmodify and use one of the configuration files intended for graphs, you may encountererrors because the graph implementations are currently incomplete.Don’t be alarmed by these errors as once the graph implementation is finalised, the program should be able to correctly output the graphs.
NotethatforTaskA,partoftheassessmentwillbebasedonautomatedtesting,which will feed a number of configuration files into your (completed) implementation of the provided Python skeleton.We will then check if the generated mazes are correct, e.g., whethertheyareperfect,havecorrectentrancesandexits,didn’tgointoinfiniteloops etc.Wewouldlikeyoutodosometestingaboutthis-ifyoulookatthecode,there
is a method to test if the generated maze is perfect which is not implemented.This implementationwon’tbepartofyourassessment,butitmightbeusefultoconsider how to implement it and perform checks yourself as part of practicing code evaluation. Remember a perfect maze is one where any cell in the maze can reach any other cell, or another way to put it, there exists a path between any pair of cells in the maze.If you implementsomethingtoevaluateperfectmazes,pleaserefrainfromsubmittingitaspart of your final code submission.
Wewillrunyourimplementationontheuniversity’scoreteachingservers,e.g.,
titan.csit.rmit.edu.au,jupiter.csit.rmit.edu.au,andsaturn.csit.rmit.edu.au.
If you develop on your own machines, please ensure your code compiles and runs onthesemachines.Discoveringatthelastminutethatyourcodedoesnotcompile on these machines is something you would want to avoid.If your code does not runonthesemachines,weunfortunatelydonothavetheresourcestodebugeach one and cannot award marks for testing.Please note this carefully, this is a firm requirement.
In this second task, you will evaluate your implemented structures both theoretically and empirically in terms of their time complexities for the different use case scenarios and different operations, e.g., removeWall().Scenarios arise from different parameter settings for generating a maze.
Write a report on your analysis and evaluation of the different implementations.Consider and recommend in which scenarios each type of implementation would be most appro- priate. The report should be 5 pages or less, in font size 12. See the assessment rubric (AppendixA)forthecriteriaweareseekinginthereport.
Atfirst,youaretoconductatheoreticalanalysisoftheperformance.Giventheheight handwidthw(intermsofnumberofrowsandcolumns)ofthegeneratedmaze,report the best case and worse case running time estimate in terms of the exact asymptotic complexity (Θ) of each of your graph implementations when executing updateWall() and neighbours().You will also need to provide an example scenario and explanation on thebestcaseandworsecaserunningtimeestimates.Thiswillhelpyouwhenexplaining yourempiricalanalysisresults.Puttheresultsinthefollowformatofatable:
TheoreticalAnalysis | ||
Operations | BestCase | WorseCase |
updateWall() | [asymptoticcomplexity] [exampleandexplanation] | [asymptoticcomplexity] [exampleandexplanation] |
neighbours() | [asymptoticcomplexity] [exampleandexplanation] | [asymptoticcomplexity] [exampleandexplanation] |
Typically, you may use real usage data to evaluate your data structures.However, for this assignment, you will write configuration file generators to enable testing over different scenarios of interest.There are many possibilities, hence to help you we suggest you consider the following factors.
Data GenerationWhen generating different maze dimensions, you may want to write someconfigurationfilegenerators(orgeneratordirectlywithinacopyofmazeTester.py). Due to the randomness of the data, you may wish to generate several datasets with the same parameters settings and take the average across a number of runs.
Afterthereportandcodeissubmitted,youwillbeaskedtorecordyourresponsestoa number of questions in Canvas.These questions will ask you about aspects of your implementation or report.You will have a set time to consider the questions, make a recordingthenuploadthatrecording.Moredetailswillbeexplainedclosertothedue date.
Asaguide,thereportcouldcontainthefollowingsections:
PleasemakesuretoincludeyournameandstudentIDaswellasthestatementonthe firstpageofthisdocumentinyourreport.
Thefinalsubmissionwillconsistofthreeparts:
The final folder (consisting the source code, report and dataGen subfolder) should be zipped up and named as Assign1-<your student number>.zip.E.g., if your student numbers is s12345, then your submission file should be called Assign1-s12345.zip, and when we unzip that zip file, then all the submission filesshould bein thefolder Assign1- s12345.
Note:submissionofthereportandcodewillbedoneviaCanvas.We will provide details regarding Task C closer to the submission deadline.
Theprojectwillbemarkedoutof20.
Theassessmentinthisprojectwillbebrokendownintothreeparts.Thefollowingcriteria will be considered when allocating marks.
While the emphasis of this project is not on programming, we would like you to maintain decentcodingdesign,readabilityandcommenting,hencecommentingandcodingstyle will make up a portion of your marks.For a detailed breakdown of the implementation marks,pleaserefertotherubricavailableviaCanvas.
ThemarkingsheetinAppendixAoutlinesthecriteriathatwillbeusedtoguidethe marking of your evaluation report1.Use the criteria and the suggested report structure (Section4)toinformyouofhowtowritethereport.
Thisisapass/failassessment,andyou’llbeassessedbasedonyourabilitytoanswer some questions about the code and report.
LateSubmissionPenalty:Latesubmissionswillincura10%penaltyonthetotal marks of the corresponding assessment task per day or part of day late, i.e, 2 marks per day.Submissions that are late by 5 days or more are not accepted and will be awarded zero,unlessspecialconsiderationhasbeengranted.GrantedSpecialConsiderationswith new due date set after the results have been released (typically 2 weeks after the dead- line) will automatically result in an equivalent assessment in the form of a practical test, assessing the same knowledge and skills of the assignment (location and time to be ar- ranged by the coordinator).Please ensure your submission is correct (all files are there, compilesetc),re-submissionsaftertheduedateandtimewillbeconsideredaslatesub- missions. Toavoidsubmittinglate,makesuretocompleteandsubmityourassignments a bit ahead of the deadline, as the core teaching servers and Canvas can sometimes be slow.We strongly advice you submitat least one hour before the deadline.Late submissions due to slow processing of Canvas or slow Internet will not be lookedupon favourly,evenifitisafewminuteslate.SlowprocessingofCanvasorslowInternet willrequiredocumentationandevidencesubmissionattemptswasmadeatleastonehour before the deadline.
Assessmentdeclaration:Bysubmittingthisassessment,youagreetotheassessment
declaration-https://www.rmit.edu.au/students/student-essentials/assessment-and-exams/assessment/assessment-declaration
Academic integrity is about honest presentation of your academic work.It means ac- knowledging the work of others while developing your own insights, knowledge and ideas. Youshouldtakeextremecarethatyouhave:
1Noteforthemarkingguide,ifoneofthecriteriaisnotdemonstrated,then0markswillbeawarded for that criteria.
RMITUniversitytreatsplagiarismasaveryseriousoffenceconstitutingmisconduct. Plagiarism covers a variety of inappropriate behaviours, including:
Forfurtherinformationonourpoliciesandprocedures,pleaserefertothefollowing:https://www.rmit.edu.au/students/student-essentials/rights-and-responsibilities/academic-integrity.
Therearemultiplevenuestogethelp.Thereareweeklyconsultationhours(seeCanvas for time and location details).In addition, you are encouraged to discuss any issues youhavewithyourTutor.WewillalsobepostingcommonquestionsontheAssignment1 FAQ section on Canvas and we encourage you to check and participate in the Ed Forum discussion forum.However, please refrain from posting solutions, particularly as this assignmentisfocusedonalgorithmicanddatastructuredesign.
A MarkingGuidefortheReport
DesignofEvaluation (Maximum=2marks) | AnalysisofResults (Maximum=8marks) | ReportClarity (Maximum=2marks) |
2marks Data generation is well designed, systematic and well explained.All suggested scenarios, data structures and a reasonablerangeofsizeof the maze were evaluated. Each type of test was run overanumberofrunsand results were averaged. | 8marks Analysis is thorough anddemon- strates understanding and critical analysis.Well-reasoned explana- tions and comparisons are provided for all the data structures, scenar- ios and different input sizes of the mazes.All analysis, comparisons and conclusions are supported by empirical evidence and theoretical complexities. Wellreasonedrecom- mendations are given. | 2marks Very clear, wellstruc- turedandaccessiblere- port, an undergraduate student can pick up the report and understand it with no difficulty. |
1.4marks Data generation is reasonably designed, systematic and explained. There are at least one obvious missing suggested scenarios, data structures or reasonable size of the maze.Each type of test was run over a number of runs and results were averaged. | 5.5marks Analysis is reasonable and demon- strates good understanding and crit- ical analysis.Adequate compar-isonsandexplanationsaremade and illustrated with most of the sug- gested scenarios and input sizes ofthe maze.Most analysis and com- parisonsaresupportedbyempiri- cal evidence and theoretical anal-ysis. Reasonable recommendations are given. | 1.4marks Clearandstructuredfor the most part, with a few unclear minor sec- tions. |
0.7mark Data generation is somewhat adequately designed, systematic and explained.There areseveral obvious missing suggested scenarios, data structures or reasonablesizeofthemaze.Eachtype of test may only have been run once. | 3marks Analysis is adequate anddemon- strates some understanding and critical analysis. Some explanations andcomparisonsaregivenandillus- tratedwithoneortwoscenariosand sizesofthemaze.Aportionofanal- ysisandcomparisonsaresupported by empirical evidence and theoret- ical analysis.Adequate recommen- dations are given. | 0.7mark Generallyclearandwell structured, but there arenotablegapsand/or unclear sections. |
0marks Data generation is poorly designed, systematic and explained.There are many obvious missing suggested scenarios, data structures or reasonable size of the maze.Each type of test has only have been run once. | 0-1marks Analysis is poor and demonstrates minimalunderstandingandcriti- cal analysis.Few explanations or comparisons are made and illus- trated with one scenario and size setting. Little analysis and compar- isons are supported by empirical evi- dence and theoretical analysis.Poor or no recommendations are given. | 0marks The report isunclearon the whole and the readerhastoworkhard to understand. |
Get original papers written according to your instructions and save time for what matters most.