mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-23 16:55:05 +00:00
adds zebrapuzzles
This commit is contained in:
parent
5d84b6bec5
commit
0c9094e9f4
20 changed files with 2447 additions and 2 deletions
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
|
||||
def print_clue(clue_idxs, idx2clue, new_cell, first=False):
|
||||
if len(clue_idxs)==1:
|
||||
# print(type(idx2clue[clue_idxs[0]]))
|
||||
# if type(idx2clue[clue_idxs[0]]) == clues.found_at:
|
||||
return single_find_at(idx2clue[clue_idxs[0]], new_cell, first)
|
||||
else:
|
||||
if first:
|
||||
result= 'First combining clues: '
|
||||
else:
|
||||
result= 'Then combining clues: '
|
||||
for current_idx in clue_idxs:
|
||||
result += "<{}>".format(idx2clue[current_idx])
|
||||
result += ' Unique Values Rules and the fixed table structure. We know that '
|
||||
for cell in new_cell:
|
||||
result += cell
|
||||
result += '. '
|
||||
return result
|
||||
|
||||
def single_find_at(clue, new_cell, first=False):
|
||||
if first:
|
||||
result="First applying clue: "
|
||||
else:
|
||||
result="Then applying clue: "
|
||||
if len(new_cell)>1:
|
||||
result += "<{}> and Unique Values We know that ".format(clue)
|
||||
else:
|
||||
result += "<{}> We know that ".format(clue)
|
||||
for cell in new_cell:
|
||||
result += cell
|
||||
result += '. '
|
||||
return result
|
||||
Loading…
Add table
Add a link
Reference in a new issue