1.8 KiB
1.8 KiB
README_copycat.md
Overview
copycat.py is the core module of the Copycat system, implementing the main analogical reasoning algorithm. It coordinates the interaction between various components like the workspace, slipnet, coderack, and temperature system.
Core Components
Copycatclass: Main class that orchestrates the analogical reasoning processReporterclass: Base class for defining different types of reporters (GUI, curses, etc.)
Key Features
- Implements the main Copycat algorithm for analogical reasoning
- Manages the interaction between different system components
- Supports multiple interfaces (GUI, curses, command-line)
- Provides temperature-based control of the reasoning process
- Handles multiple iterations and answer collection
Main Methods
run(initial, modified, target, iterations): Run the algorithm for a specified number of iterationsrunGUI(): Run the algorithm with graphical interfacerun_forever(initial, modified, target): Run the algorithm continuouslyrunTrial(): Run a single trial of the algorithmstep(): Execute a single step of the algorithmupdate_workspace(currentTime): Update all workspace components
Dependencies
- Requires
coderack,randomness,slipnet,temperature, andworkspacemodules - Uses
pprintfor pretty printing results - Optional GUI support through the
guimodule
Usage
The module is typically used through one of the interface modules:
main.pyfor command-line interfacegui.pyfor graphical interfacecurses_main.pyfor terminal-based interface
Notes
- The system uses a temperature-based control mechanism to guide the reasoning process
- Results include answer statistics, temperature, and time metrics
- The system supports both single-run and continuous operation modes
- The reporter system allows for flexible output handling