A sophisticated artificial general intelligence system implemented in x86-64 assembly language. The system features advanced neural networks, memory management, decision making, and I/O handling capabilities.
The system consists of several key components:
- Hierarchical memory structure (working and long-term)
- Memory block management with priority levels
- Garbage collection and defragmentation
- Memory consolidation and cleanup
- Multi-layer neural network implementation
- Backpropagation and gradient descent
- Activation functions and loss calculations
- Weight optimization
- Reinforcement learning capabilities
- Policy and value networks
- Experience replay buffer
- Planning and simulation
- Multi-modal input/output support
- Stream-based processing
- Efficient buffer management
- Modality-specific handlers
- Matrix operations
- Vector calculations
- Statistical functions
- Optimization algorithms
- Memory block operations
- Data structure management
- Memory alignment
- Cache optimization
- System utilities
- Helper functions
- Debugging tools
- Performance monitoring
- NASM 2.15.05 or later
- GNU Make 4.3 or later
- GNU Linker (ld) 2.38 or later
- GDB 12.1 or later (for debugging)
- Python 3.8+ (for build scripts)
- Clone the repository:
git clone https://github.com/stix26/agi-system.git
cd agi-system- Build the system:
make clean
make allOn macOS, the Makefile automatically switches to Mach-O output when uname reports Darwin. Ensure Xcode command line tools are installed so that ld and clang are available.
- Run the system:
make run- Debug the system:
make debugTo install the system globally:
sudo make installTo uninstall:
sudo make uninstallThe system can be used in several ways:
- Standalone mode:
./build/agi_system- Debug mode:
make debug- With custom configuration:
./build/agi_system --config config.jsonThe repository provides a Dockerfile and a docker-compose.yml for
containerized builds. Using Docker ensures the correct toolchain is
available and isolates the AGI system from the host environment.
docker build -t agi-system .docker run --rm agi-systemOr start the service with Docker Compose:
docker-compose upAdvanced training utilities are provided in the python/ directory. These
scripts leverage modern machine learning frameworks to experiment with
reinforcement learning and transformer models outside of the core assembly
runtime.
pip install -r requirements.txt
python python/ppo_agent.pyThis launches a small PPO trainer for the CartPole environment and prints the episode rewards.
The system can be configured through various parameters:
-
Memory parameters:
- Working memory size
- Long-term memory size
- Block size
- Priority levels
-
Neural network parameters:
- Layer sizes
- Learning rates
- Activation functions
- Optimization settings
-
Decision parameters:
- Exploration rate
- Discount factor
- Batch size
- Update frequency
-
I/O parameters:
- Buffer sizes
- Timeouts
- Stream configurations
- Error handling
- Create new assembly file in
src/core/directory - Add dependencies in Makefile
- Implement functionality
- Update main program to integrate new feature
- Use GDB for debugging:
make debug- Set breakpoints:
(gdb) break main
(gdb) run- Inspect memory:
(gdb) x/10x $rspThe system is optimized for:
- Low latency processing
- Efficient memory usage
- Parallel computation
- Real-time response
This repository is a proof of concept. Many components are placeholders or stubs intended for experimentation. The current assembly implementation only demonstrates initialization and shutdown sequences. Advanced features described in the documentation are not fully implemented.
- Fork the repository
- Create feature branch
- Commit changes
- Push to branch
- Create pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to all contributors
- Inspired by various AGI research
- Built with modern assembly techniques
For questions and support, please open an issue on GitHub.
A lightweight MySQL server is included via docker-compose. Start the services with:
docker-compose upThis launches the AGI system container alongside a MySQL 8.0 instance. Alternatively, you can start a local server directly:
./tools/start_mysql.shAfter the server is running you can test the connection using:
python python/db_test.pyWhen finished, stop the server with:
./tools/stop_mysql.shMake sure Python dependencies are installed before running the example:
pip install -r requirements.txt