diff --git a/reasoning_gym/algorithmic/cryptarithm.py b/reasoning_gym/algorithmic/cryptarithm.py index bfa9baa8..15264254 100644 --- a/reasoning_gym/algorithmic/cryptarithm.py +++ b/reasoning_gym/algorithmic/cryptarithm.py @@ -223,6 +223,9 @@ class CryptarithmDataset(ProceduralDataset): Returns: float: The computed score between 0.0 and 1.0. """ + if not answer: + return 0.0 + correct_mapping = {} correct_answer_str = entry["answer"] # e.g. "A=1,B=7,..." for pair in correct_answer_str.split(","):