A JavaScript implementation of Letter Spirit 2
4
stars
29
commits
JavaScript
primary language
Aug 23, 2026
updated
This is a JavaScript implementation of Letter Spirit 2, a computer model of human high-level perception and creativity, in the realm of letter-design. The model was invented by John Rehling, Gary McGraw, and Douglas Hofstadter.
Letter Spirit 2 is described in John Rehling's Ph.D. thesis., and in the book Fluid Concepts and Creative Analogies.
I got interested in Letter Spirit, and the Hofstadter group's other projects, after reading the Fluid Concepts and Creative Analogies book, but I couldn't find demos that were easy to get up and running. Hence this repo, and my related repos for Copycat and Letter Spirit Examiner.
My implementation is based entirely on Rehling's original Scheme code. The look of the UI is based on screenshots contained in McGraw's thesis, and on James Marshall's Metacat.
A caveat: It's hard to be sure that I've ported the Scheme code correctly (not least because the algorithm is stochastic). My implementation generates sensible-looking results, and I wrote a lot of unit tests for its various parts, but of course it's possible I may have got some things wrong. If you spot any problems, please submit an issue!
Here are some sample outputs produced by the app (with random seed = 123):

29 commits
JavaScript
99.6%
A JavaScript implementation of Letter Spirit 2
4
stars
29
commits
JavaScript
primary language
Aug 23, 2026
updated
This is a JavaScript implementation of Letter Spirit 2, a computer model of human high-level perception and creativity, in the realm of letter-design. The model was invented by John Rehling, Gary McGraw, and Douglas Hofstadter.
Letter Spirit 2 is described in John Rehling's Ph.D. thesis., and in the book Fluid Concepts and Creative Analogies.
I got interested in Letter Spirit, and the Hofstadter group's other projects, after reading the Fluid Concepts and Creative Analogies book, but I couldn't find demos that were easy to get up and running. Hence this repo, and my related repos for Copycat and Letter Spirit Examiner.
My implementation is based entirely on Rehling's original Scheme code. The look of the UI is based on screenshots contained in McGraw's thesis, and on James Marshall's Metacat.
A caveat: It's hard to be sure that I've ported the Scheme code correctly (not least because the algorithm is stochastic). My implementation generates sensible-looking results, and I wrote a lot of unit tests for its various parts, but of course it's possible I may have got some things wrong. If you spot any problems, please submit an issue!
Here are some sample outputs produced by the app (with random seed = 123):

29 commits
JavaScript
99.6%