CS452 - Real-Time Programming - Winter 2013
Lecture 18 - Projects
Pubilc Service Annoucements
- First train control demo.
- Measurement is an activity that is not speeded up by being smart.
- Exam: 16.00, 11 April to 18.30 12 April.
Projects
1. Train style
Give trains roles and objectives. For example,
- Passenger train travels on a repetitive route meeting a schedule.
- Freight train travels to random destinations as fast as possible.
- Objective is to deliver as much freight as possible while keeping a
passenger train on time.
Another example,
- Trains are taxis.
- When a load appears they race to see if they can get it.
Another example,
- Trains are buses, which travel long routes from one place on the track
to another.
- At the end of the route is a scheduled trip to a different
location.
- When a bus is late arriving, the dispatcher must find another, unused
bus to leave at the scheduled leaving time.
2. Game style: AI
The track is a graph.
- Several different ways to choose vertices and edges
Many games are played on graphs
- Checkers, snakes & ladders, maze games, etc.
- Implement a graph game played on the track graph.
For example, watchmen and bandit.
- One train is the bandit, which tries to move from one hide-out to
another.
- The other trains are watchmen, who try to prevent the bandit from
getting to a hide-out once he is out in the open.
Another example, PAC man
- One train tries to cover as much track as possible.
- Other trains try to trap him so that he can't get reservations that
would allow him to keep moving.
3. Game style: interactive
In the games you play for pleasure, the user normally controls one or more
of the game entities.
- the bandit
- the trapping trains
Students often want to make an interactive project. It has been done
successfully in the past, but constructing a usable interface is a
challenge.
- It's a good idea to develop without an interface, using an artifical
"intelligence" to drive the train(s), then add an interface when that's
robust.
4. Stunts
Make the trains do something neat that seems impossible. All I have is
examples.
- Dancing trains.
- Trains that follow closely, like the Aramis transit system.
Calibration
1. Calibrating Stopping Distance
2. Calibrating Constant Velocity
3. Calibrating Acceleration and Deceleration: Minimal
How Long does it Take to Stop?
Try the following exercise.
- Choose a sensor.
- Put the train on a course that will cross the sensor.
- Run the train at a constant speed.
- Give the speed zero command at a location that stops the train with its
contact on the sensor.
- You will need to experiment to find out exactly when to give the
stop command.
- Calculate the time between when you gave the command and when the
sensor triggered.
- Look for regularities.
How Long does it Take to Start and Stop?
4. Calibrating Acceleration and Deceleration: Doing Better
Modelling Velocity
Return to: