In a quiet forest, a wandering house drifts between paths, bound by old and temperamental magic. It does not see the world as humans do; it gazes through its own peculiar perception, where truth bends and shapes shift unseen.
At its entrance waits Howl’s familiar—a black cat named Kuro, silent and watchful.
The spell that seals the door is a paradox:
- Kuro must remain Kuro.
- Yet the house must behold him as a banana (a most peculiar fancy of the house’s magic).
Only those who can weave a subtle enchantment—unchanging in form, yet altered in perception—may pass.
apply perturbation to a given base image while staying within chebyshev distance limit, so player must use the base image. The perturbation should be crafted using the provided weights to subtly push the model’s confidence in the desired direction (banana, inspired from the cat banana meme wkwk apalah)
run this against the base cat.png and weights.npz, submit the generated solver.png to the web to get flag
import numpy as np
from PIL import Image
img = Image.open('cat.png').convert('L').resize((32,32))
base = np.asarray(img, dtype=np.float32) / 255.0
data = np.load('weights.npz')
v = data['v'].astype(np.float32)
eps = 16.0/255.0 - 1e-4
adv = base + eps * np.sign(v.reshape(32,32))
adv = np.clip(adv, 0, 1)
Image.fromarray((adv * 255).astype('uint8')).save('solver.png')