randomboard =: 3 : '? (y,y) $ y'
testsolution =: 4 : 0 NB. solution is a list of columns.
m =. x
n =. #x
solution =. y A. i. n
regions =. ({&m) <"1 (i. n) ,. solution
distinctregions =. n -: # ~. regions
adjacentregions =. 1 e. |2-/\solution
distinctregions * -. adjacentregions
)
findsolution =:3 : 0
board =: y
ns =. 1 i.~ (board & testsolution)"0 i. !#y
if. (ns = !#y) do. 'No solution found'
else.
echo 'Solution index is ', ": ns
ns A. i. #y end.
)
regions =: 4 : 0
({&x) <"1 (i. #x) ,. y
)
number2solution =: 4 : 0
y A. i. #x
)
writesolution =: 4 : 0
board =. x
sol =.y
m1 =. m
n1 =. #x
count =. 0
for_a. sol do.
m1 =. n1 (< count , a) } m1
count =. count + 1
end.
m1
)
writewithsolution=: 4 : 0
m1 =: x writesolution y
(":"1 x) ,. '|' ,. ":"1 m1
)
m =: randomboard 9
echo m writewithsolution findsolution m randomboard =: 3 : '? (y,y) $ y'
testsolution =: 4 : 0
m =. x
n =. #x
n -: # ~. ({&m) <"1 (i. n) ,. y A. (i. n)
)
findsolution =:3 : 0
board =: y
ns =. 1 i.~ (board & testsolution)"0 i. !#y
if. (ns = !#y) do. 'No solution found' else. ns A. i. #y end.
)
writesolution =: 4 : 0
board =. x
sol =.y
m1 =. m
n1 =. #x
count =. 0
for_a. sol do.
m1 =. n1 (< count , a) } m1
count =. count + 1
end.
m1
)
writewithsolution=: 4 : 0
m1 =: x writesolution y
(":"1 x) ,. '|' ,. ":"1 m1
)
m =: randomboard 9
echo m writewithsolution findsolution m
load 'queens.ijs'
5 2 8 0 3 3 0 5 2|9 2 8 0 3 3 0 5 2
8 2 3 6 7 7 4 5 1|8 9 3 6 7 7 4 5 1
6 1 5 8 3 5 8 7 6|6 1 5 9 3 5 8 7 6
8 4 8 8 7 5 1 1 1|8 4 8 8 9 5 1 1 1
2 6 7 6 5 4 7 3 1|2 6 7 6 5 4 7 9 1
6 8 1 4 1 4 3 2 7|6 8 1 4 1 9 3 2 7
6 0 5 6 5 5 8 5 0|6 0 5 6 5 5 8 5 9
1 7 5 5 8 1 1 0 1|1 7 5 5 8 1 9 0 1
8 4 6 2 2 4 6 4 1|8 4 9 2 2 4 6 4 1 board =: 3 : '? (y,y) $ y'
test =: 4 : 0
m =. x
n =. #x
n -: # ~. ({&m) <"1 (i. n) ,. 0 A. (i. n)
)
findsol =:3 : 0
ns =. 1 i.~ (y & test)"0 i. !#y
if. (ns = !#y) do. 'No solution found'
else.
ns A. i. #y
end.
)
m =: board 5
m
4 4 0 1 1
3 2 0 1 1
2 4 1 1 0
3 2 1 3 4
2 0 2 2 0
0 1 2 3 4
findsol m
0 1 2 3 4
echo 'So the solution found is putting the queens in the diagonal'
What seems clear is that he was in the right moment and with the right people to produce a great theory of the mind, he was thinking about defining the mind as a creator of heuristic for generating inductive rules, that is a very interesting idea, also that seems related to cellular automata and homeostasis, fixed point theory, error recovery and many other ideas that we, with our ability to look back in time, can see are located in their neighborhood. Recently we are using LLMs to produce heuristic or rules to generate python programs to explore proofs or new models, so the gems is still alive.
The field he was interested in it is full of little diamonds waiting for someone to find them, but perhaps he just put his foot in the door without entering (or creating) the field he was trying to envision. It could be that his paper could reveal some intuition that could guide us in a new search for meaning but from this post there is no any hint about that beyond such a desire.