mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-25 17:10:51 +00:00
import string_insertion, minor whitespace fixes, gallery update
This commit is contained in:
parent
d60d608192
commit
5d16a2193c
4 changed files with 648 additions and 141 deletions
|
|
@ -27,6 +27,7 @@ from .rotate_matrix import RotateMatrixConfig, RotateMatrixDataset
|
|||
from .sentence_reordering import SentenceReorderingConfig, SentenceReorderingDataset
|
||||
from .spell_backward import SpellBackwardConfig, SpellBackwardDataset
|
||||
from .spiral_matrix import SpiralMatrixConfig, SpiralMatrixDataset
|
||||
from .string_insertion import StringInsertionConfig, StringInsertionDataset
|
||||
from .string_manipulation import StringManipulationConfig, StringManipulationDataset
|
||||
from .string_synthesis import StringSynthesisConfig, StringSynthesisDataset
|
||||
from .word_ladder import WordLadderConfig, WordLadderDataset
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class GameOfLifeDataset(ProceduralDataset):
|
|||
)
|
||||
|
||||
rows = [json.dumps(board[0, i].tolist(), separators=(",", ":")) for i in range(board.shape[1])]
|
||||
board_str = "[" + ", \n ".join(rows) + "]"
|
||||
board_str = "[" + ",\n ".join(rows) + "]"
|
||||
|
||||
final_step = evolved[-1]
|
||||
final_step_list = final_step.tolist()
|
||||
|
|
|
|||
|
|
@ -194,15 +194,14 @@ class GraphColorDataset(ProceduralDataset):
|
|||
solution = greedy_graph_coloring(puzzle)
|
||||
|
||||
edges = str(puzzle["edges"])
|
||||
question = f"""
|
||||
Please provide a coloring for this graph such that every vertex is not connected to a vertex of the same color. The graph has these properties:
|
||||
question = f"""Please provide a coloring for this graph such that every vertex is not connected to a vertex of the same color. The graph has these properties:
|
||||
|
||||
Vertices: {puzzle["vertices"]}
|
||||
Edges: {edges}
|
||||
Possible colors: {puzzle["color_options"]}
|
||||
|
||||
Return your solution as a JSON map of verteces to colors. (For example: {{0: 1, 1: 2, 2: 3}})
|
||||
"""
|
||||
"""
|
||||
|
||||
return {
|
||||
"question": question,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue