2.0 KiB
2.0 KiB
README_bond.md
Overview
bond.py implements the Bond system, a key component of the Copycat system that manages the relationships between objects in strings. It handles the creation, evaluation, and management of bonds that represent meaningful connections between objects based on their properties and relationships.
Core Components
Bondclass: Main class that represents a bond between objects- Bond evaluation system
- Bond compatibility management
Key Features
- Manages bonds between objects in strings
- Evaluates bond strength based on multiple factors
- Handles bond direction and category
- Supports bond flipping and versioning
- Manages bond compatibility and support
Bond Components
source: Source object of the bonddestination: Destination object of the bondcategory: Category of the bondfacet: Aspect of the bonddirectionCategory: Direction of the bondsourceDescriptor: Descriptor of the source objectdestinationDescriptor: Descriptor of the destination object
Main Methods
updateInternalStrength(): Calculate internal bond strengthupdateExternalStrength(): Calculate external bond strengthbuildBond(): Create and establish bondbreakBond(): Remove bondlocalSupport(): Calculate local supportnumberOfLocalSupportingBonds(): Count supporting bondssameCategories(): Compare bond categorieslocalDensity(): Calculate local bond density
Bond Types
- Letter category bonds
- Direction-based bonds
- Category-based bonds
- Flipped bonds
- Modified bonds
Dependencies
- Requires
workspaceStructuremodule - Used by the main
copycatmodule
Notes
- Bonds are evaluated based on member compatibility and facet factors
- The system supports both same-type and different-type bonds
- Bonds can have direction categories (left, right)
- The system handles bond compatibility and support
- Bonds can be flipped to create alternative versions
- Local density and support factors influence bond strength