Skip to content

drzo/cogprime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

115 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CogPrime: An Integrated AGI Architecture

CogPrime Banner

Overview

CogPrime is an ambitious project aimed at creating an Artificial General Intelligence (AGI) system that integrates multiple cognitive architectures and frameworks. The project combines the foundational principles of OpenCog Prime, the advanced capabilities of OpenCog Hyperon, and John Vervaeke's framework for relevance realization into a unified cognitive architecture called SiliconSage.

Key Features

  • Multi-Framework Integration: Seamlessly combines OpenCog Prime, OpenCog Hyperon, and Vervaeke's cognitive science insights
  • OpenCog in Pure Lua: Complete implementation of OpenCog cognitive architecture in Lua
  • Cognitive Synergy: Coordinated interaction between specialized cognitive subsystems
  • Relevance Realization: Dynamic attention allocation and meaning-making capabilities
  • Meta-Learning: Self-improving cognitive strategies and adaptive learning
  • 4E Cognition: Embodied, embedded, enacted, and extended cognitive processing
  • Modular Architecture: Perception, reasoning, action, and learning modules with emergent behaviors
  • System 4 Implementation: Campbell's System 4 cognitive architecture with consciousness sets and tensional coupling

Architecture Components

Core Cognitive Modules

  1. Perception Module (src/modules/perception.py)

    • Multi-modal sensory processing
    • Attention mechanisms
    • Sensory fusion and encoding
  2. Reasoning Module (src/modules/reasoning.py)

    • Pattern recognition and inference
    • Working memory management
    • Episodic memory storage and retrieval
  3. Action Selection Module (src/modules/action.py)

    • Adaptive behavior generation
    • Reinforcement learning integration
    • Goal-directed planning
  4. Learning Module (src/modules/learning.py)

    • Experience-based adaptation
    • Skill refinement
    • Meta-learning capabilities

Integration Framework

The SiliconSage architecture represents the evolution of cognitive integration across five versions (v0-v5), with the latest version incorporating:

  • Enhanced cognitive synergy with dynamic optimization
  • Meta-learning guided interactions
  • Self-reflective monitoring systems
  • Relevance-driven resource allocation
  • Cross-framework synthesis mechanisms

OpenCog in Pure Lua

A complete implementation of the OpenCog cognitive architecture in pure Lua (lua/ directory), featuring:

  • AtomSpace: Hypergraph knowledge representation
  • PLN: Probabilistic Logic Networks reasoning
  • ECAN: Economic Attention Network allocation
  • Pattern Matching: Advanced pattern matching with wildcards
  • Learning: Pattern mining, reinforcement learning, concept formation

See lua/README.md for details.

Installation

Prerequisites

For Python components:

  • Python 3.8 or higher
  • PyTorch 1.9.0 or higher
  • CUDA support (optional, for GPU acceleration)

For Lua components:

  • Lua 5.3 or higher

Setup

Python Setup:

  1. Clone the repository:
git clone https://github.com/drzo/cogprime.git
cd cogprime
  1. Install dependencies:
pip install -r requirements.txt
  1. Run tests to verify installation:
python -m pytest src/tests/ -v

Lua Setup:

  1. Install Lua:
# Ubuntu/Debian
sudo apt-get install lua5.3

# macOS
brew install lua
  1. Run tests:
cd lua
lua5.3 tests/test_opencog.lua
  1. Try the examples:
lua5.3 examples/basic_example.lua
lua5.3 examples/advanced_example.lua

Quick Start

Basic Usage

from src.core.cognitive_core import CogPrimeCore
from src.modules.perception import SensoryInput
import torch

# Initialize the cognitive system
config = {
    'visual_dim': 784,
    'audio_dim': 256,
    'memory_size': 1000
}
cognitive_system = CogPrimeCore(config)

# Create sensory input
sensory_input = SensoryInput(
    visual=torch.randn(784),
    auditory=torch.randn(256)
)

# Execute cognitive cycle
action = cognitive_system.cognitive_cycle(sensory_input, reward=1.0)
print(f"Selected action: {action}")

Advanced Configuration

The system supports extensive configuration for research and experimentation:

advanced_config = {
    'perception': {
        'visual_dim': 784,
        'audio_dim': 256,
        'attention_heads': 8
    },
    'reasoning': {
        'memory_size': 2000,
        'working_memory_capacity': 7,
        'attention_decay': 0.95
    },
    'learning': {
        'learning_rate': 0.001,
        'exploration_rate': 0.1,
        'meta_learning_enabled': True
    }
}

Documentation

Getting Started

Core Documentation

System 4 Implementation (Kawaii Hexapod)

Philosophical Foundations

Development Roadmap

Phase 1: Core Implementation βœ…

  • Basic cognitive architecture setup
  • Essential subsystem development
  • Integration framework establishment
  • Initial testing and validation
  • Meta-learning foundation

Phase 2: Advanced Features 🚧

  • Enhanced cognitive capabilities
  • Self-reflection mechanisms
  • Meta-learning systems
  • Cross-domain integration
  • Relevance optimization

Phase 3: Framework Integration πŸ“‹

  • Vervaeke framework components
  • Historical context integration
  • Meaning-making systems
  • Relevance realization
  • Meta-cognitive synthesis

Phase 4: Optimization πŸ“‹

  • Performance tuning
  • Resource management
  • Scalability improvements
  • System refinement
  • Meta-strategic enhancement

Automated Issue Generation

CogPrime includes GitHub Actions workflows for automatically generating detailed, actionable issues for each development phase. To create comprehensive development issues:

  1. Navigate to the Actions tab in the GitHub repository
  2. Run the "Generate Development Issues" workflow
  3. Select the phase(s) you want to generate issues for
  4. Optionally add issue title prefixes for organization
  5. Use dry-run mode to preview issues before creating them

Each generated issue includes:

  • Detailed descriptions and context
  • Specific actionable tasks
  • Clear acceptance criteria
  • Priority levels and effort estimates
  • Dependencies and requirements
  • Appropriate labels for organization

For more information, see the Issue Generation Guide.

Research Applications

CogPrime is designed for research in:

  • Artificial General Intelligence: Studying emergent cognitive behaviors
  • Cognitive Science: Modeling human-like cognitive processes
  • Machine Learning: Meta-learning and transfer learning research
  • Philosophy of Mind: Exploring consciousness and relevance realization
  • Systems Integration: Multi-framework cognitive architectures

Contributing

We welcome contributions from researchers and developers interested in AGI and cognitive science. Please see our Contributing Guidelines for details on how to get involved.

Areas for Contribution

  • Core cognitive modules enhancement
  • Meta-learning algorithm development
  • Relevance realization mechanisms
  • Testing and validation frameworks
  • Documentation and examples

Citation

If you use CogPrime in your research, please cite:

@software{cogprime2024,
  title={CogPrime: An Integrated AGI Architecture},
  author={CogPrime Development Team},
  year={2024},
  url={https://github.com/drzo/cogprime}
}

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • OpenCog Foundation for the foundational cognitive architecture principles
  • John Vervaeke for the relevance realization framework and 4E cognition insights
  • Ben Goertzel for OpenCog Prime and Hyperon architectural guidance
  • The AGI Research Community for ongoing collaboration and feedback

Contact

For questions, discussions, or collaboration opportunities:


"The goal is not just to build intelligent machines, but to understand intelligence itself through the integration of multiple cognitive frameworks." - CogPrime Philosophy

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 9