Difference between revisions of "Metacat"

From IPRE Wiki
Jump to: navigation, search
(Slipnet)
(Exercises)
 
(9 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
This page describes running the Metacat demonstration program by James B. Marshall. You can find out more about Metacat from the following publications:
 
This page describes running the Metacat demonstration program by James B. Marshall. You can find out more about Metacat from the following publications:
  
* '''Metacat: a self-watching cognitive architecture for analogy-making.''' In W. D. Gray & C. D. Schunn (eds.), ''Proceedings of the 24th Annual Conference of the Cognitive Science Society'', pp. 631-636. Mahwah, NJ: Lawrence Erlbaum Associates. [http://www.cs.pomona.edu/~marshall/papers/cogsci02.pdf PDF]
+
* '''Metacat: a self-watching cognitive architecture for analogy-making.''' In W. D. Gray & C. D. Schunn (eds.), ''Proceedings of the 24th Annual Conference of the Cognitive Science Society'', pp. 631-636. Mahwah, NJ: Lawrence Erlbaum Associates. [http://science.slc.edu/~jmarshall/papers/cogsci02.pdf PDF]
* '''Metacat: a program that judges creative analogies in a microworld.''' In C. Bento, A. Cardoso, & G. A. Wiggins (eds.), ''Proceedings of the 2nd Workshop on Creative Systems: Approaches to Creativity in Artificial Intelligence and Cognitive Science'', pp. 77-84, 15th European Conference on Artificial Intelligence (ECAI 2002), Lyon, France. [http://www.cs.pomona.edu/~marshall/papers/ecai02.pdf PDF]
+
* '''Metacat: a program that judges creative analogies in a microworld.''' In C. Bento, A. Cardoso, & G. A. Wiggins (eds.), ''Proceedings of the 2nd Workshop on Creative Systems: Approaches to Creativity in Artificial Intelligence and Cognitive Science'', pp. 77-84, 15th European Conference on Artificial Intelligence (ECAI 2002), Lyon, France. [http://science.slc.edu/~jmarshall/papers/ecai02.pdf PDF]
* '''Metacat: A Self-Watching Cognitive Architecture for Analogy-Making and High-Level Perception.''' Chapter 2 of Jim's Ph.D. Dissertation.  [http://compscitest.brynmawr.edu/~marshall/chapter2.pdf PDF]
+
* '''Metacat: A Self-Watching Cognitive Architecture for Analogy-Making and High-Level Perception.''' Chapter 2 of Jim's Ph.D. Dissertation.   
  
 
The following tutorial describes how to use Metacat.  Metacat has been graciously made available for our use by Dr. Jim Marshall.  Dr. Marshall spent weeks and weeks programming so that Metacat would be easy for students and researchers to use. Thank you, Dr. Marshall!
 
The following tutorial describes how to use Metacat.  Metacat has been graciously made available for our use by Dr. Jim Marshall.  Dr. Marshall spent weeks and weeks programming so that Metacat would be easy for students and researchers to use. Thank you, Dr. Marshall!
Line 11: Line 11:
 
== Getting Started ==
 
== Getting Started ==
  
First, start up Metacat by typing '''metacat''' in a terminal window from any Linux machine (e.g., the CS lab in Park 231).
+
First, start up Metacat by typing '''swl ~dblank/Metacat/metacat.ss''' in a terminal window from any Linux machine (e.g., the CS lab in Park 231).
  
 
You will see two windows appear (an SWL splash window, and one titled '''repl'''). In the '''repl''' window, type in '''(setup)'''.
 
You will see two windows appear (an SWL splash window, and one titled '''repl'''). In the '''repl''' window, type in '''(setup)'''.
Line 17: Line 17:
 
This will open up too many windows.  Select "Hide all windows" (the last option) from the "Windows" menu of the "Metacat Control Panel" window. Then select the first 4 options from the "Windows" menu:
 
This will open up too many windows.  Select "Hide all windows" (the last option) from the "Windows" menu of the "Metacat Control Panel" window. Then select the first 4 options from the "Windows" menu:
  
1. Show Workspace
+
# Show Workspace
2. Show Slipnet
+
# Show Slipnet
3. Show Coderack
+
# Show Coderack
4. Show Temperature
+
# Show Temperature
  
 
Each of these windows will be described in the sections below.
 
Each of these windows will be described in the sections below.
Line 70: Line 70:
 
The Slipnet is a spreading activation network, and looks something like this:
 
The Slipnet is a spreading activation network, and looks something like this:
  
http://science.slc.edu/~jmarshall/metacat/pictures/slipnet-activation.gif
+
http://science.slc.edu/~jmarshall/metacat/pictures/slipnet.gif
  
The Slipnet window shows only the current activation of each node, not the links that exist between nodes.  (A picture of the Slipnet showing all of the links is available [http://compscitest.brynmawr.edu/~marshall/metacat/slipnet.gif here].)  Each node corresponds to a particular concept about the letter-string world.  Some nodes start out highly activated at the beginning of a run, depending on the particular strings involved.  In general, the more activated a node is, the more influence it will exert on the nondeterministic codelet decisions occurring in the Workspace.  Activity in the Workspace, in turn, influences the activation patterns of nodes in the Slipnet.  Also, depending on the circumstanaces, nodes may be temporarily "clamped" by the program at full activation, which allows the nodes to exert maximal influence over codelet activity.  When a node is clamped, its activation is shown in light blue.
+
The Slipnet window shows only the current activation of each node, not the links that exist between nodes.  (A picture of the Slipnet showing all of the links is available [http://science.slc.edu/~jmarshall/metacat/pictures/slipnet.gif here].)  Each node corresponds to a particular concept about the letter-string world.  Some nodes start out highly activated at the beginning of a run, depending on the particular strings involved.  In general, the more activated a node is, the more influence it will exert on the nondeterministic codelet decisions occurring in the Workspace.  Activity in the Workspace, in turn, influences the activation patterns of nodes in the Slipnet.  Also, depending on the circumstanaces, nodes may be temporarily "clamped" by the program at full activation, which allows the nodes to exert maximal influence over codelet activity.  When a node is clamped, its activation is shown in light blue.
  
 
== Temperature ==
 
== Temperature ==
  
http://compscitest.brynmawr.edu/~marshall/metacat/temperature.gif
+
http://science.slc.edu/~jmarshall/metacat/pictures/temperature.gif
  
 
Temperature measures the amount and quality of structures currently in the Workspace.  At the beginning of a run, when no structures have yet been built, the temperature is very high (100 degrees).  As the program builds up a more organized view of the letter-strings, temperature gradually falls toward zero.  However, in addition to serving as a measure of Workspace organization, temperature also controls the amount of randomness used by codelets in making decisions.  At higher temperatures, codelet decisions are largely random; at lower temperatures they become much more deterministic.  The net effect is that the program moves from largely random, exploratory behavior at the outset of a run to largely deterministic, directed behavior near the end, as it discovers more relationships among the letter-strings.  When the program finds an answer, the final temperature value can serve as a measure of answer quality (with lower temperatures corresponding to higher answer quality).
 
Temperature measures the amount and quality of structures currently in the Workspace.  At the beginning of a run, when no structures have yet been built, the temperature is very high (100 degrees).  As the program builds up a more organized view of the letter-strings, temperature gradually falls toward zero.  However, in addition to serving as a measure of Workspace organization, temperature also controls the amount of randomness used by codelets in making decisions.  At higher temperatures, codelet decisions are largely random; at lower temperatures they become much more deterministic.  The net effect is that the program moves from largely random, exploratory behavior at the outset of a run to largely deterministic, directed behavior near the end, as it discovers more relationships among the letter-strings.  When the program finds an answer, the final temperature value can serve as a measure of answer quality (with lower temperatures corresponding to higher answer quality).
  
 
The bar graph below shows the typical behavior of Copycat on 400 runs of the problem '''abc -> abd; mrrjjj -> ?''', with average temperature values indicated below each answer.  The number above each bar shows the total number of times the answer was found.  In this case, the highest-quality answer ('''mrrjjjj''') is not the same as the highest-frequency answer ('''mrrkkk''').
 
The bar graph below shows the typical behavior of Copycat on 400 runs of the problem '''abc -> abd; mrrjjj -> ?''', with average temperature values indicated below each answer.  The number above each bar shows the total number of times the answer was found.  In this case, the highest-quality answer ('''mrrjjjj''') is not the same as the highest-frequency answer ('''mrrkkk''').
 
http://compscitest.brynmawr.edu/~marshall/metacat/mrrjjj.gif
 
  
 
= Exercises =
 
= Exercises =
Line 88: Line 86:
 
# First, let's explore Metacat running in ''Copycat mode''. Make sure that ''Self-watching mode'' is de-selected from the '''Options''' menu in the main '''Metacat Control Panel''' window.  Memory doesn't affect this mode, so you don't have to clear it.  Now, make up some analogy problems on your own and observe what Metacat does. Describe a problem of your own design, and how Copycat solves it. What types of problems are not appropriate (''i.e.'', won't work)? Explain.
 
# First, let's explore Metacat running in ''Copycat mode''. Make sure that ''Self-watching mode'' is de-selected from the '''Options''' menu in the main '''Metacat Control Panel''' window.  Memory doesn't affect this mode, so you don't have to clear it.  Now, make up some analogy problems on your own and observe what Metacat does. Describe a problem of your own design, and how Copycat solves it. What types of problems are not appropriate (''i.e.'', won't work)? Explain.
 
# Still in ''Copycat mode'', try the following problems:
 
# Still in ''Copycat mode'', try the following problems:
 +
## abc -> abd; ijk -> ?
 
## abc -> abd; xyz -> ?
 
## abc -> abd; xyz -> ?
## abc -> abd; ijk -> ?
 
 
## Describe what Copycat does, and how often.
 
## Describe what Copycat does, and how often.
 
# Try the above problems again, but this time turn on ''Self-watching mode''. Describe the difference to the previous question. You'll want to, of course, look at the answers, but also examine some of the other Metacat windows (you can open/close them from the '''Windows''' menu option).
 
# Try the above problems again, but this time turn on ''Self-watching mode''. Describe the difference to the previous question. You'll want to, of course, look at the answers, but also examine some of the other Metacat windows (you can open/close them from the '''Windows''' menu option).
# Another mode that Metacat can operate in is ''justify mode''.  In this mode you give an answer to Metacat and let it explain why such an answer makes sense.  ##To use this mode just give Metacat all four strings, like these:
+
# Another mode that Metacat can operate in is ''justify mode''.  In this mode you give an answer to Metacat and let it explain why such an answer makes sense.   
 +
## To use this mode just give Metacat all four strings, like these:
 
## abc -> abd; xyz -> wyz
 
## abc -> abd; xyz -> wyz
## abc -> abd; ijk -> hjk
 
 
##Run these problems-and-solutions and report what Metacat does. Open and watch the output in the '''Commentary''' window.
 
##Run these problems-and-solutions and report what Metacat does. Open and watch the output in the '''Commentary''' window.
# Metacat can also compare answers. After running the above problems, examine the '''Episodic Memory''' window. First, click on one answer, then the other. In the '''Commentary''' window you will see Metacat's analysis of the differences between the two answers. Make a copy of the textual description. Now, click on '''Clear Memory''' and run Metacat on the problem {{{abc -> abd; xyz -> ?}}} by selecting '''Run 7: abc -> abd; xyz -> ?''' under '''Demos''' from the menu. This should run for exactly 2309 steps (as seen at the top of the ''Workspace'' window). Now explain the problem:
+
# Metacat can also compare answers. After running the above problems, examine the '''Episodic Memory''' window. First, click on one answer, then the other. In the '''Commentary''' window you will see Metacat's analysis of the differences between the two answers. Make a copy of the textual description. Now, click on '''Clear Memory''' and run Metacat on the problem '''abc -> abd; xyz -> ?''' by selecting '''Run 7: abc -> abd; xyz -> ?''' under '''Demos''' from the menu. This should run for exactly 2309 steps (as seen at the top of the ''Workspace'' window).  
## abc -> abd; ijk -> hjk
+
## again. Now compare the two answers again, like you just did. Are there differences in the commentary?  Describe and explain.
+
 
# Is Metacat self-aware? Explain.
 
# Is Metacat self-aware? Explain.

Latest revision as of 12:34, 8 October 2013

Metacat

This page describes running the Metacat demonstration program by James B. Marshall. You can find out more about Metacat from the following publications:

  • Metacat: a self-watching cognitive architecture for analogy-making. In W. D. Gray & C. D. Schunn (eds.), Proceedings of the 24th Annual Conference of the Cognitive Science Society, pp. 631-636. Mahwah, NJ: Lawrence Erlbaum Associates. PDF
  • Metacat: a program that judges creative analogies in a microworld. In C. Bento, A. Cardoso, & G. A. Wiggins (eds.), Proceedings of the 2nd Workshop on Creative Systems: Approaches to Creativity in Artificial Intelligence and Cognitive Science, pp. 77-84, 15th European Conference on Artificial Intelligence (ECAI 2002), Lyon, France. PDF
  • Metacat: A Self-Watching Cognitive Architecture for Analogy-Making and High-Level Perception. Chapter 2 of Jim's Ph.D. Dissertation.

The following tutorial describes how to use Metacat. Metacat has been graciously made available for our use by Dr. Jim Marshall. Dr. Marshall spent weeks and weeks programming so that Metacat would be easy for students and researchers to use. Thank you, Dr. Marshall!

Getting Started

First, start up Metacat by typing swl ~dblank/Metacat/metacat.ss in a terminal window from any Linux machine (e.g., the CS lab in Park 231).

You will see two windows appear (an SWL splash window, and one titled repl). In the repl window, type in (setup).

This will open up too many windows. Select "Hide all windows" (the last option) from the "Windows" menu of the "Metacat Control Panel" window. Then select the first 4 options from the "Windows" menu:

  1. Show Workspace
  2. Show Slipnet
  3. Show Coderack
  4. Show Temperature

Each of these windows will be described in the sections below.

Metacat Control Panel

This is the main control window for interacting with Metacat. It looks like this:

http://science.slc.edu/~jmarshall/metacat/pictures/control-panel.gif

In this window, you may enter analogy problems for Metacat to attempt to solve. In the data entry field you can enter a problem like this:

abc -> abd; ijk -> ?

which can be read as: "if the letter-string abc changes into abd, what does ijk change into?". You can also leave out the punctuation if you wish, like so:

abc abd ijk

Also, you can add a number after the letter-strings, such as 12345. This is interpreted as a random number seed. Metacat is a nondeterministic program, meaning that if you run the program twice on the same problem, you may get different results. If you use the same random number seed for both runs, however, the program will do exactly the same thing each time. This makes it easy to reproduce particular runs for demos or debugging.

After entering an analogy problem, you can click the Step or Go button to make Metacat run, or just hit RETURN a second time, which is equivalent to clicking Go.

The Reset button resets the program to the beginning of the current run, but does not erase Metacat's longterm memory. To do that, you must select Clear Memory from the menu. If you continue running after an answer has been found, Metacat won't find that answer again because it is already in the program's memory (but see the caveat below).

Important: Metacat starts up in Metacat mode. You can also run it in Copycat mode which turns off certain features of the program in order to emulate the behavior of the original Copycat program. For example, Copycat did not have the ability to remember its answers. Accordingly, when running in Copycat mode, Metacat does not store answers in its Episodic Memory. To put it into Copycat mode de-select Self-watching mode from the "Options" menu of the "Metacat Control Panel" window.

Workspace

All processing in Metacat occurs through the actions of codelets, which you can think of as small computational agents that behave much like ants in an ant colony. The Workspace is where all the codelets do their work. It initially looks something like this:

http://science.slc.edu/~jmarshall/metacat/pictures/workspace.gif

Here you will see structures such as groups, bridges, and rules being proposed, evaluated, built, and destroyed by codelets as the program runs.

Coderack

The Coderack holds the pool of available codelets waiting to be run, and looks like something like this:

http://science.slc.edu/~jmarshall/metacat/pictures/coderack.gif

On each time step, the program probabilistically chooses one codelet from this pool, removes it from the Coderack, and runs it. The Coderack window shows the number of codelets of each type waiting to run, and the relative selection probability for each codelet type (as a horizontal bar). The selection probability of a codelet type depends both on the number of codelets of that type waiting in the Coderack, and on the urgency values associated with each codelet (not shown here). In general, every codelet has an urgency value that is determined at the time it gets created, with higher urgency meaning a higher likelhood of being chosen to run. The last codelet type that ran is shown in dark pink.

Slipnet

The Slipnet is a spreading activation network, and looks something like this:

http://science.slc.edu/~jmarshall/metacat/pictures/slipnet.gif

The Slipnet window shows only the current activation of each node, not the links that exist between nodes. (A picture of the Slipnet showing all of the links is available here.) Each node corresponds to a particular concept about the letter-string world. Some nodes start out highly activated at the beginning of a run, depending on the particular strings involved. In general, the more activated a node is, the more influence it will exert on the nondeterministic codelet decisions occurring in the Workspace. Activity in the Workspace, in turn, influences the activation patterns of nodes in the Slipnet. Also, depending on the circumstanaces, nodes may be temporarily "clamped" by the program at full activation, which allows the nodes to exert maximal influence over codelet activity. When a node is clamped, its activation is shown in light blue.

Temperature

http://science.slc.edu/~jmarshall/metacat/pictures/temperature.gif

Temperature measures the amount and quality of structures currently in the Workspace. At the beginning of a run, when no structures have yet been built, the temperature is very high (100 degrees). As the program builds up a more organized view of the letter-strings, temperature gradually falls toward zero. However, in addition to serving as a measure of Workspace organization, temperature also controls the amount of randomness used by codelets in making decisions. At higher temperatures, codelet decisions are largely random; at lower temperatures they become much more deterministic. The net effect is that the program moves from largely random, exploratory behavior at the outset of a run to largely deterministic, directed behavior near the end, as it discovers more relationships among the letter-strings. When the program finds an answer, the final temperature value can serve as a measure of answer quality (with lower temperatures corresponding to higher answer quality).

The bar graph below shows the typical behavior of Copycat on 400 runs of the problem abc -> abd; mrrjjj -> ?, with average temperature values indicated below each answer. The number above each bar shows the total number of times the answer was found. In this case, the highest-quality answer (mrrjjjj) is not the same as the highest-frequency answer (mrrkkk).

Exercises

  1. First, let's explore Metacat running in Copycat mode. Make sure that Self-watching mode is de-selected from the Options menu in the main Metacat Control Panel window. Memory doesn't affect this mode, so you don't have to clear it. Now, make up some analogy problems on your own and observe what Metacat does. Describe a problem of your own design, and how Copycat solves it. What types of problems are not appropriate (i.e., won't work)? Explain.
  2. Still in Copycat mode, try the following problems:
    1. abc -> abd; ijk -> ?
    2. abc -> abd; xyz -> ?
    3. Describe what Copycat does, and how often.
  3. Try the above problems again, but this time turn on Self-watching mode. Describe the difference to the previous question. You'll want to, of course, look at the answers, but also examine some of the other Metacat windows (you can open/close them from the Windows menu option).
  4. Another mode that Metacat can operate in is justify mode. In this mode you give an answer to Metacat and let it explain why such an answer makes sense.
    1. To use this mode just give Metacat all four strings, like these:
    2. abc -> abd; xyz -> wyz
    3. Run these problems-and-solutions and report what Metacat does. Open and watch the output in the Commentary window.
  5. Metacat can also compare answers. After running the above problems, examine the Episodic Memory window. First, click on one answer, then the other. In the Commentary window you will see Metacat's analysis of the differences between the two answers. Make a copy of the textual description. Now, click on Clear Memory and run Metacat on the problem abc -> abd; xyz -> ? by selecting Run 7: abc -> abd; xyz -> ? under Demos from the menu. This should run for exactly 2309 steps (as seen at the top of the Workspace window).
  6. Is Metacat self-aware? Explain.