mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-19 12:58:07 +00:00
reduce default zero probability for binary matrix
This commit is contained in:
parent
1472de02ea
commit
8c4400b18a
2 changed files with 95 additions and 3 deletions
|
|
@ -5,14 +5,13 @@ https://leetcode.com/problems/01-matrix/description/
|
|||
"""
|
||||
|
||||
from collections import deque
|
||||
from copy import deepcopy
|
||||
from dataclasses import dataclass
|
||||
from random import Random
|
||||
from typing import Optional
|
||||
|
||||
from ..factory import ProceduralDataset, register_dataset
|
||||
|
||||
QUESTION_TEMPLATE = """Given a square matrix, your job is to find the distance of the nearest 0 for each cell.
|
||||
QUESTION_TEMPLATE = """Given a square matrix, your job is to find the taxicab distance of the nearest 0 for each cell.
|
||||
|
||||
Example:
|
||||
|
||||
|
|
@ -36,7 +35,7 @@ class BinaryMatrixConfig:
|
|||
"""Configuration for Binary Matrix dataset generation"""
|
||||
|
||||
max_n: int = 10 # Maximum size of the matrix
|
||||
p_zero: float = 0.7 # Probability of a cell being 0
|
||||
p_zero: float = 0.25 # Probability of a cell being 0
|
||||
|
||||
size: int = 500 # Virtual dataset size
|
||||
seed: Optional[int] = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue