Csci 4651 Problem set 8 (40 points)

Due Wednesday, May 9th at midnight

Work in groups of between 1 and 3

(Larger groups are expected to implement more features)

Your task is to use Clojure ant colony example and create a simulation of a toll road. Specifically, there will be n lanes (only going one way) and toll booths in each lane. Cars drive into the toll area, get in line for a toll booth, pay toll, and depart. Cars can switch lanes to move to a shorter line. Cars should check (before moving) that there isn't another car in that lane that's about to move into the same spot.

The time at the toll is random, and so is the appearance of a new car in the area.

The output of the program is plain-text only, no graphics.

The road is represented as ref cells, cars are agents.

You may, if you so desire, come up with an equivalent difficulty simulation problem instead of the toll road.


CSci 4651 course web site