cq-test / scripts /extract_task_patterns.py
NANI-Nithin's picture
Phase 2: ship the core happy path
e9fc2fc
Raw
History Blame Contribute Delete
537 Bytes
import json
with open('app/data/games_dataset.json') as f:
data = json.load(f)
for rec in data[:10]:
i = rec['input']
o = rec['expected_output']
print(f"=== {rec['id']} ({i['game_type']}) ===")
for t in o['tasks']:
desc = t['description'][:90]
loc = t.get('location_hint','')[:70]
pts = t['points']
tm = t.get('time_limit_minutes','None')
print(f" desc: {desc}")
if loc: print(f" loc: {loc}")
print(f" pts={pts} time={tm}")
print()
print("---")