(c)
return
u'''This is only an example. It will get around the track but the
    correct thing to do is write your own `drive()` function.
u'''This is only an example. It will get around the track but the
    correct thing to do is write your own `drive()` function.
u This is only an example . It will get around the track but the correct thing to do is write your own drive () function .
def drive_example(c):
    u'''This is only an example. It will get around the track but the
    correct thing to do is write your own `drive()` function.'''
    S,R= c.S.d,c.R.d
    target_speed=1000

    # Steer To Corner
    R[u'steer']= S[u'angle']*10 / PI
    # Steer To Center
    R[u'steer']-= S[u'trackPos']*.10

    # Throttle Control
    if S[u'speedX'] < target_speed - (R[u'steer']*50):
        R[u'accel']+= .01
    else:
        R[u'accel']-= .01
    if S[u'speedX']<10:
       R[u'accel']+= 1/(S[u'speedX']+.1)

    # Traction Control System
    if ((S[u'wheelSpinVel'][2]+S[u'wheelSpinVel'][3]) -
       (S[u'wheelSpinVel'][0]+S[u'wheelSpinVel'][1]) > 5):
       R[u'accel']-= .2

    # Automatic Transmission
    R[u'gear']=1
    if S[u'speedX']>50:
        R[u'gear']=2
    if S[u'speedX']>80:
        R[u'gear']=3
    if S[u'speedX']>110:
        R[u'gear']=4
    if S[u'speedX']>140:
        R[u'gear']=5
    if S[u'speedX']>170:
        R[u'gear']=6
    return
def drive_example ( c ) : S , R = c . S . d , c . R . d target_speed = 1000 # Steer To Corner R [ u'steer' ] = S [ u'angle' ] * 10 / PI # Steer To Center R [ u'steer' ] -= S [ u'trackPos' ] * .10 # Throttle Control if S [ u'speedX' ] < target_speed - ( R [ u'steer' ] * 50 ) : R [ u'accel' ] += .01 else : R [ u'accel' ] -= .01 if S [ u'speedX' ] < 10 : R [ u'accel' ] += 1 / ( S [ u'speedX' ] + .1 ) # Traction Control System if ( ( S [ u'wheelSpinVel' ] [ 2 ] + S [ u'wheelSpinVel' ] [ 3 ] ) - ( S [ u'wheelSpinVel' ] [ 0 ] + S [ u'wheelSpinVel' ] [ 1 ] ) > 5 ) : R [ u'accel' ] -= .2 # Automatic Transmission R [ u'gear' ] = 1 if S [ u'speedX' ] > 50 : R [ u'gear' ] = 2 if S [ u'speedX' ] > 80 : R [ u'gear' ] = 3 if S [ u'speedX' ] > 110 : R [ u'gear' ] = 4 if S [ u'speedX' ] > 140 : R [ u'gear' ] = 5 if S [ u'speedX' ] > 170 : R [ u'gear' ] = 6 return