by lightandlight · 1mo ago · 0 comments
function policy(x){for(var i=100,p,b,t,s,c,r,a,h,M=Math.tanh,R=v=>v<0?-1-v:v>9?19-v:v;i--;)x[i*6]&&(p=i%10),x[i*6+3]&&(b=i),x[i*6+4]&&(t=i);r=b/10|0;c=b%10;s=c>t%10||c==t%10&&c<9?1:-1;a=R(c+s*(8-r));t=t/10|0;h=1e3*M(.02*((r>t||r==t&&r-8?r<6?a:(a+R(c+s*(9-r)))/2:R(c+s*(r+9-2*(r<2?0:r<4?r:4))))-p));return[0,30*M(-h-15),-100,30\*M(h-15),-100,-100]}
https://claude.ai/share/7a931d7a-0acd-402d-a5a5-a9d44d9d0385Maybe the models have a common internal representation for computations, and they're capable of consuming and producing computations in the syntax of neural network weights?
I should note that the original authors did not allow Astra to write any significant code to construct the weights. I think this is unfair. If you allow strided assignments to numpy arrays, you should probably also allow the use of functions like np.linspace, np.repeat, and np.tile.
Oh and Astra wrote this (https://github.com/RikiyaT/lm_understand-logs/blob/4d09ba6d6...):
W1[63:120:6, 5] = 10
W1[123:180:6, 5] = 20
W1[183:240:6, 5] = 30
W1[243:300:6, 5] = 40
W1[303:360:6, 5] = 50
W1[363:420:6, 5] = 60
W1[423:480:6, 5] = 70
W1[483:540:6, 5] = 70
W1[543:600:6, 5] = 90
I think the second 70 there is probably a typo; it looks like it should be 80 instead.