mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-22 16:49:06 +00:00
fix: Correct sequence generation by using previous number in PatternRule
This commit is contained in:
parent
1bae1d5c4d
commit
8a78d20fad
1 changed files with 1 additions and 1 deletions
|
|
@ -46,7 +46,7 @@ class PatternRule:
|
|||
|
||||
def apply(self, sequence: List[int], position: int) -> int:
|
||||
"""Apply the rule to generate the next number"""
|
||||
result = sequence[position] # Start with current number
|
||||
result = sequence[position - 1] # Start with previous number
|
||||
|
||||
for op, param in zip(self.operations, self.parameters):
|
||||
if op == Operation.ADD:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue