MCPcopy Index your code
hub / github.com/Paul-G2/copycat-js

github.com/Paul-G2/copycat-js @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
515 symbols 1,016 edges 67 files 373 documented · 72%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

copycat-js

This is a javascript version of the Copycat program developed by Douglas Hofstadter and Melanie Mitchell.

You can try it out here.

Copycat is a computer model of human analogy-making. It tries to solve letter puzzles of the form "abc is to abd as ijk is to what?"

Its internal workings are described in great detail in the books Fluid Concepts and Creative Analogies, and Analogy-Making as Perception.

I got interested in Copycat, 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 the related letter-spirit-examiner-js repo.

The original Copycat code was written in lisp, which I am not fluent in, so I based this port (except for the UI) mainly on the python version by Lucas Saldyt, occasionaly referring to the lisp version when something was unclear.

The look of the UI is based on that of James Marshall's Metacat (which is an extension of Copycat).

Core symbols most depended-on inside this repo

_addNode
called by 30
src/Slipnet.js
spansString
called by 21
src/WorkspaceObject.js
coinFlip
called by 18
src/RandGen.js
_addLink
called by 16
src/Slipnet.js
post
called by 16
src/Coderack.js
create
called by 16
src/Codelets/CodeletFactory.js
weightedChoice
called by 15
src/RandGen.js
updateStrength
called by 13
src/Rule.js

Shape

Method 381
Class 134

Languages

TypeScript100%

Modules by API surface

src/SlipNode.js28 symbols
src/WorkspaceObject.js20 symbols
src/ConceptMapping.js17 symbols
src/Coderack.js17 symbols
src/UI/WorkspaceHeaderUi.js15 symbols
src/UI/BatchmodeUi.js15 symbols
src/Copycat.js15 symbols
src/Group.js14 symbols
src/UI/Dialog.js12 symbols
src/Rule.js12 symbols
src/RandGen.js12 symbols
src/Slipnet.js11 symbols

For agents

$ claude mcp add copycat-js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact