Copycat's codelets, refactored (i)
From Analogy-Making as Perception (By Melanie Mitchell), MIT Press.
Here is Melanie's classification of codelets:
DESCRIPTION BUILDING CODELETS
- Bottom-up description scout.
- Top-down description scout.
- Description strength tester.
- Description builder.
BOND BUILDING CODELETS
- Bottom-up bond scout
- Top-down bond scout (deals with categories, such as successor)
- Top-down bond scout (deals with direction of strings)
- Bond-strenght tester
- Bond Builder
GROUP BUILDING CODELETS
- Top-down group scout (for categories)
- Top-down group scout (for direction)
- Group-string scout
- Group strength tester
- Group builder
CORRESPONDENCE BUILDING CODELETS
- Bottom-up correspondence scout
- Important-object correspondence scout
- Correspondence strength tester
- Correspondence builder
RULE BUILDING CODELETS
- Rule scout
- Rule Strength tester
- Rule Builder
- Rule Translator
OTHER CODELETS
- Replacement finder
- Breaker
24 codelets in all. Interesting. Not so many.
I wonder how we could use polymorphism to reduce duplicate code and enable the separation of essence from accident.
For example, take the codelet groups:
DESCRIPTION BUILDING CODELETS
BOND BUILDING CODELETS
GROUP BUILDING CODELETS
CORRESPONDENCE BUILDING CODELETS
RULE BUILDING CODELETS
Each of these groups have a number of different codelets. But look again, and a clear pattern emerges: Each of the groups has scouts, has testers, and has builders. (Also, scouts are either bottom-up or top-down.) I can't convince myself that there isn't another, better, way to design this than by programming each one individually.
We have to separate FARG essence from copycat's letter-string's accidental features. And, in the way towards that road, we will stumble upon general codelets: the holy grail. Codelets that are general enough to work on any domain; codelets that follow the principle of closed for modification, and open for extension. If we can finish this design in this first semester, that will be a powerful moment.
0 comments:
Post a Comment