This small program generates possible solutions to a wordbrain level. It however cannot determine which of the valid solutions is the correct one.
$ wordbrain <matrix> <word-lengths>
Where matrix is the elements of the matrix from left to right, top to bottom and word-lengths is the lengths of the words to find with no separation.