def sense(location, states, moves):
    """
    Sense the environment.
    :param location: current location
    :param states: possible states
    :param moves: possible moves
    :return: sensor output
    """
    ideal = [1] * len(moves)
    for index, move in enumerate(moves):
        if move(location) in states:
            ideal[index] = 0
    return ideal