In[]:=
deploy
Sat 4 Jan 2020 23:44:44
Slitherinks puzzle from http://www.mit.edu/~puzzle/2019/puzzle/lantern_festival.html
In[]:=
i=Import["https://i.stack.imgur.com/LC2c2.png"];i
Out[]=
In[]:=
imageGRID=ImagePartition[i,40];lenet=NetModel["LeNet Trained on MNIST Data"];test[x_]:=If[ImageDistance[imageGRID[[2,2]],x]>10,lenet[x],"-"]result=imageGRID/.x_Imagetest[x]/.71;result
Out[]=
{{-,-,-,-,-,-,1,3,-,2,-,0,-,1,2,2,1,-,-,-,-,-},{-,-,-,-,-,-,0,1,2,-,2,1,0,-,1,-,1,-,-,-,-,-},{-,-,-,-,-,-,-,-,-,2,-,2,1,-,1,-,-,0,-,-,-,-},{-,-,-,-,-,-,-,-,0,2,1,-,2,2,-,1,-,1,-,-,-,-},{-,-,-,-,-,-,-,-,-,-,2,0,-,1,-,0,1,3,1,-,-,-},{-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,2,-,-,0,-},{-,-,-,-,-,-,-,-,-,0,2,-,-,-,-,-,-,3,3,-,-,-},{-,-,-,-,-,-,-,-,-,-,2,-,-,-,-,-,-,-,0,-,2,1},{-,-,-,-,-,-,-,-,-,1,2,-,-,0,-,-,-,-,-,-,-,1},{-,-,-,-,-,-,-,-,-,0,1,-,2,2,1,-,1,-,-,0,1,-},{-,-,-,-,-,-,-,0,-,-,-,-,-,-,1,1,3,1,-,-,-,1},{-,-,-,-,-,-,-,-,-,-,-,-,-,-,0,-,2,0,-,1,2,1},{-,-,-,-,-,1,-,0,-,-,-,-,-,-,-,1,-,-,-,2,1,-},{-,-,-,-,2,-,2,-,1,-,-,-,-,-,-,-,-,0,-,1,-,-},{-,-,0,2,1,0,1,1,2,1,-,-,-,-,0,-,1,-,1,-,-,-},{0,-,2,-,-,-,-,-,1,-,-,-,-,-,-,1,-,-,-,1,-,-},{-,2,1,0,-,-,-,-,-,-,-,-,-,-,0,-,1,-,1,-,-,-},{-,2,1,-,-,-,-,-,0,2,1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