def parse_score(line, output):
    """
    Parse the score from the model's output for a VGRPBench puzzle.
    
    Args:
        line: Dictionary-like object containing puzzle information
        output: The model's output string
        
    Returns:
        dict: Dictionary with perception_correct and answer_correct results
    """
    
    # Extract category to determine puzzle type
    category = line['category']
    puzzle_type = category.split('_')[0]  # e.g., "thermometers" from "thermometers_4x4"
    
    # Parse the puzzle state from the states field
    puzzle_data = line['states']
    puzzle_data = ast.literal_eval(puzzle_data)
    
    # Evaluate the puzzle solution
    evaluation_result = evaluate_single_puzzle(output, puzzle_data, puzzle_type)

    return evaluation_result

    Parse the score from the model's output for a VGRPBench puzzle.
    
    Args:
        line: Dictionary-like object containing puzzle information
        output: The model's output string
        
    Returns:
        dict: Dictionary with perception_correct and answer_correct results
    
vlmeval/dataset/utils/vgrpbench/evaluation.py