Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
8 lines
548 B
Python
8 lines
548 B
Python
#!/usr/bin/env python3
|
|
"""Compare the Kotlin scoring (DirectorParityTest's kotlin-placements.json) with the Python reference on the same saved inputs."""
|
|
import json,sys
|
|
ref={o['id']:o for o in json.load(open(sys.argv[1]))}; kt={o['id']:o for o in json.load(open(sys.argv[2]))}
|
|
diff=[i for i in ref if ref[i]['top']!=kt[i]['top'] or ref[i]['second']!=kt[i]['second'] or abs(ref[i]['s1']-round(kt[i]['s1'],2))>0.011 or abs(ref[i]['s2']-round(kt[i]['s2'],2))>0.011]
|
|
print('titles',len(ref),'differences',len(diff))
|
|
for i in diff: print(ref[i],kt[i])
|