def compute_accuracy(target, response):
    """Compute accuracy given a target side and a response
    Assume:
    target is one of R, L, N
    response is one of right, left, center, away, off
    """
    if target in ('R', 'L', 'N'):
        if (target == 'R' and response == 'right') or (target == 'L' and response == 'left'):
            accuracy = 1
        elif target in ('R', 'L') and response == 'center':
            accuracy = 0.5
        elif target in ('R', 'L') and response in ('right', 'left'):
            accuracy = 0
        elif response == 'away':
            accuracy = '-'
        elif response == 'off':
            accuracy = '.'
        else:
            accuracy = 'N/A'
    else:
        # Nonstandard coding
        if target.lower() == response.lower():
            accuracy = 1
        elif response.lower() == 'away':
            accuracy = '-'
        elif response.lower() == 'off':
            accuracy = '.'
        else:
            accuracy = 0
    return accuracy