zeechimp's picture
Upload 7 files
271b8ea verified
Raw History Blame Contribute Delete
468 Bytes
#!/usr/bin/env python3
"""Load compressed chips and evaluate."""
import numpy as np
from eval import decode_4bit, eval_4bit
if __name__ == "__main__":
data = np.fromfile("chips_4bit.bin", dtype=np.uint8).reshape(-1, 2)
print(f"loaded {len(data)} compressed chips")
solved = 0
for b0, b1 in data:
if eval_4bit(int(b0), int(b1)) == 0:
solved += 1
print(f"solved: {solved}/{len(data)} ({solved/len(data)*100:.1f}%)")