- This repository contains MeTTa code for attention codebase port/re-implementation.
-
ECAN(Economic Attention Network) is a general term for the way that Attentional dynamics (centrally, the Competition for Attention) is carried out within OpenCogPrime.
-
Each Atom has an Attention Value attached to it. The process of updating these values is carried out according to nonlinear dynamical equations that are derived based on "artificial economics," utilizing two separate "currencies," one for
Short Term Importance (STI)and one forLong Term Importance (LTI). -
One aspect of these equations is a form of
Hebbian Learning:Atoms calledHebbianLinksrecord which Atoms were habitually used together in the past, and when it occurred that Atom A's utilization appeared to play a role in causing Atom B's utilization. Then, these HebbianLinks are used to guide the flow of currency between Atoms:BgivesAsome money ifBthinks that this money will helpAto get used, and that this utilization will helpBto get used. -
Very roughly speaking, these dynamical equations play a similar role to that played by
activation-spreadingin Neural Network AI systems.
-
The system's main dependancy requires the operating system to be either MACOS or LINUX based systems. For running on windows using WSL or other means of virtualization is required.
-
To run the code clone the folloing github repository
git clone https://github.com/trueagi-io/PeTTagit clone https://github.com/iCog-Labs-Dev/metta-attention
cd metta-attention-
Important note: make sure the PeTTa and metta-attention have sibling folders for your parent folder.
-
After cloning the repo create a python virtual enviroment and load all dependancies. NB: The Hyperon python module requires python versions greater than or equal to 3.8
python3 -m venv .ECAN
source .ECAN/bin/activate
pip install -r requirments.txt-
to run tests
- cd PeTTa repository
- run
sh run.sh ../metta-attention/go-to-the-test-you-want-to-run - e.g
sh run.sh ../metta-attention/attention/HebbianCreationAgent/HebbianCreationAgentTest/HebbianCreationAgentc++-test.metta -
to run the experiment
-
first run the run.sh script as follows
sh run.shthe script uses pyhton3 by default to run scripts to convert wordnet and coneptnet data to metta equivalent data but you can specify desired metta version asPYTHON=python3.10 sh run.sh -
go to PeTTa repository and run the experiment.metta which is
sh run.sh ../metta-attention/experiments/experiment.mettaNote: Make sure to be using swipl version greater than or equal to 9.3.25 to insuure foldall is natively supported.
-
Before you start contributing to this repository, make sure to read the CONTRIBUTING.md file from our repository
-
Original paper
-
Economic attention allocation wiki page
-
C++ implementation of attention codebase