Optimally reach a number in deadfish!
Mathematica, 164 bytes

a=#~Mod~256&amp;;Switch[#2,#+1,"i",a[#-1],"d",_,"s"]&amp;@@@Partition[FindShortestPath[Graph[Join@@(Thread[#-&gt;a@{#+1/.256-&gt;#,#-1,If[#&lt;16,#^2,#]}]&amp;)/@0~Range~255],0,#],2,1]&amp;


Anonymous function. Takes a number as input and returns a list of instructions as output. Previous solution before requirements were changed:

Mathematica, 148 bytes

a=#~Mod~256&amp;;Switch[#2,a[#+1],"i",a[#-1],"d",_,"s"]&amp;@@@Partition[FindShortestPath[Graph[Join@@(Thread[#-&gt;a@{#+1,#-1,#^2}]&amp;)/@0~Range~255],0,#],2,1]&amp;


Anonymous function. Takes a number as input and returns a list of instructions as output. First, the edges for a graph of value transitions are generated. Then, FindShortestPath is used to find the shortest path from 0 to the requested value. Finally, pairs of values are taken and compared to find the instructions used. All outputs of this program can be found here.