Archimedes is an experimental Artificial General Intelligence (AGI) framework designed to simulate consciousness. The system is based on the Global Workspace Theory (GWT) of consciousness and integrates elements from other theories and practices, such as Maslow's hierarchy of needs, Buddhist perspectives on consciousness, and goal-oriented behavior.
This project is grounded in the belief that consciousness is not a static level of intelligence, but rather a dynamic process involving continuous generation and evaluation of thoughts, actions, and identities.
Archimedes is built around the idea of an 'ego' that assumes an identity and pursues a goal. This ego observes a 'stage' where thoughts are presented one at a time and actions based on these thoughts are generated. These actions are then evaluated in the context of the current goal. The system also incorporates a 'backstage' where new thoughts are generated and a memory store where past thoughts and actions are stored.
The system operates in a cyclical manner, continuously generating and evaluating thoughts, and updating the ego's identity and goal based on the outcomes of its actions.
The Archimedes system is comprised of several components:
- Identity: An initial identity that the ego assumes. This identity can be updated over time based on the ego's experiences and the success of its actions.
- Goal: An initial goal that the ego strives to achieve. Like the identity, the goal can be updated over time.
- Memory Store: A memory store where past thoughts and actions are stored and can be retrieved. This memory store is implemented using the Pinecone vector database, which enables efficient storage and retrieval of thoughts based on their similarity.
- Stage: The stage where thoughts are presented to the ego. Each thought is processed by the ego, which generates an action based on the thought.
- Backstage: The backstage where new thoughts are generated. The thoughts are ranked based on their relevance to the ego's current identity and goal, and the most relevant thought is presented on the stage.
- Actions: Actions generated by the ego are stored as text files in a designated folder. The system includes functions to add new actions and retrieve existing actions.
The Archimedes system operates in a loop, with each iteration consisting of the following steps:
- Generate a new thought in the backstage.
- Present the thought on the stage and generate an action based on the thought.
- Attempt to achieve the goal using the generated action.
- Reflect on the identity and the goal, and update them if necessary.
This process is repeated until a termination condition is met. Currently, the system runs for a fixed number of iterations, but this could be modified to depend on other conditions, such as achieving the goal or reaching a certain level of performance.
Here's a simple example of how to use the Archimedes system:
- First install the required dependencies
- Update the file in
main.py
to include the initial identity and goal (There's a few examples in there already) - Run
python main.py
- Pinecone for the memory store
- OpenAI's GPT-3 for thought generation
- Python 3.8 or above
Contributions to Archimedes are warmly welcomed! Here are some areas where the project could potentially be improved:
- The Backstage: This is very raw version of the backstage, ideally how it should work is that it has the ability to rank the thoughts by their urgency, and bubble the right one to the top.
- Better use of memories: The system remembers it's thoughts, but these could be better integrated into the prompts, to create new, more interesting thoughts.
- Performance Evaluation: Implement a system for evaluating the performance of the AGI, such as measuring how well it's achieving its goals or how its performance changes over time.
- Learning and Adaptation: Improve the system's ability to learn from its past actions and adapt its future actions accordingly.
- Parallelization: Implement a system for generating and evaluating multiple thoughts in parallel, which could potentially speed up the process.
- Interactivity: Add the ability for the AGI to interact with its environment, such as by taking in inputs from the user or the outside world. One thing I thought about would be if it was able to re-write the main archimedes file, based on the success of its actions.
- Stimulus: In humans, thoughts like "I'm hungry" pop into your head based on your needs outside of your mind, and these thoughts cause us to act on them by, for example going to the fridge. The backstage could introduce this concept with more nunace, where "unwanted" thoughts occassionally bubble to the top, to make sure the AI isn't just navel gazing, but actually attempting to do important work.
If you have an idea for an improvement or a new feature, feel free to submit a pull request or open an issue on GitHub. We look forward to your contributions!
Please feel free to use however you like!