[an error occurred while processing this directive]

Project
Being the Fat Controller

Markers' Comments

Index


Location

Tutors' will have specific comments for hand-marking.

The far majority of Location modules struggled with automarking. A worrying number of submissions did not even compile. Many people seemed to lack understanding of ADTs, failing to even export their Location ADT, or failing to export other functions necessary for the interface. Others went the other extreme and had no export restrictions whatsoever. Markers spent considerable time attempting to fix modules that would not compile. While the majority were fixed, sadly there were a few left which simply could not be salvaged, and they gained 0 marks.

Please read the specification! Make sure you export functions the spec says you must export. Import ThomasLib! Lots of basics were missed out. Usually we were generous and only deducted 2 marks (or even no marks) out of 20 for having to fix a module which would not compile.

Once working, there were many problems. Many modules suffered from run-time errors, others got into infinite loops and were killed after 3 minutes (the time allowed for each test). Those that did not produce errors mostly got low marks as well. Congratulations to those people who got high marks. This was a very challenging assignment and it shows real brilliance to have scored anywhere above 15/20. The highest order of congratulations goes to Liang Ma, the only student to score 20/20.

The main suggestion of the markers is that students should have focused on getting the most basic cases to work. This would have earned a reasonable mark. The most basic case (just returning a track where a light is on) would have earned 8/20, which is more than most students were able to earn. The following code, written by a marker, though extremely short and simple, would have earned 8/20:

module Location where

import List
import ThomasLib

data Location = Locate [Track] [Light] [TrackName]

maybeTracks ::  Location -> TrainName -> [TrackName]
maybeTracks (Locate _ _ trackNames) _ = trackNames

makeLocation :: TrackData -> [(Train, Track)] -> Market -> Location
makeLocation (tracks, lights, _) _ _ = Locate tracks lights []

updateLocation :: Location -> LightStatus -> ControlStatus -> Location
updateLocation (Locate tracks lights _) lightStatus _
  | all (== False) lightStatus = (Locate tracks lights [])
  | otherwise                  = (Locate tracks lights [newTrackName])
  where
    newTrackName = getTrackName (head (lights!!lightOnIndex))
    lightOnIndex = head (elemIndices True lightStatus)

getTrackName (Simple name _ _) = name
getTrackName (Fork name _ _ _) = name
getTrackName (Stop name _)     = name
(Note that all tutorials had some function equivalent to maybeTracks)

In terms of remarks, you will need a specific reason to apply for a remark. Before you take issue, make sure you have read through the automarking log very carefully. If you know for a fact that your module needed an extremely large heap for execution (we restricted the heap size to 512 MB, plenty for any remotely normal module) then come and see us.

In conclusion, the advice is to read the specification in detail, and to start coding by making sure the module works fully and correctly for the most simple of cases. Once they are covered, then expand to slightly harder cases, and so on. If this course of action had been followed, 70% of students would have got around 10/20. As it was, very few broke that barrier.

(alanl)

Network

(samc)

[an error occurred while processing this directive]