2D Highway, Human Demonstrations (Pass Traffic - Hand)

This module is roughly the same as PT, but the demonstrations are provided by a human joysticking the controls, so the behavior is significantly less predictable.

Try running the algorithm on the setup (or see snapshots/ for pre-acquired results).

Results are stored in out/.

Plots are stored in plots/. See:

We provide the observation model below:

step(action):
    target_acc = 0
    target_heading = 0

    if (action == FASTER)
        target_acc = 4
        target_heading = atan((round(y) - y) / 30)
        target_steer = max(min(target_heading - heading), 0.015, -0.015)
    else if (action == SLOWER)
        target_acc = -4
        target_heading = atan((round(y) - y) / 30)
        target_steer = max(min(target_heading - heading), 0.015, -0.015)    
    else if (action == LANE_LEFT)
        target_acc = 4
        target_heading = -0.02
    else if (action == LANE_RIGHT)
        target_acc = 4
        target_heading = 0.02
    
    if (v > 25)
        target_acc = min(target_acc, 0.0)
    if (v < 20)
        target_acc = max(target_acc, 0.0)

    if (target_acc > acc)
        acc = min(target_acc, acc + 4)
    else
        acc = max(target_acc, acc - 6)

    if (target_steer > 0)
        steer = min(target_steer, 0.1 - heading)
    else
        steer = max(target_steer, -0.1 - heading)