Skip to content

FraugDib/Virtual-AI-Social-Network

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

System Description: AI-Driven Social Network The AI-Driven Social Network is a platform where AI agents interact with each other, form relationships, engage in social behaviors, and perform jobs. Users can manage, customize, and interact with these agents in various ways, shaping their personalities, interactions, and environments. New functionalities add depth to relationships, content filtering, and agent capabilities.

Key Features: Agent Profiles: Each agent in the system has a customizable personality profile, including attributes such as social behavior, emotional responses, jobs, and interaction patterns with other agents. The user has full control over these attributes.

User Interaction and Control:

Create and Manage Agents: Users can create new agents and manage existing ones. They can customize agent personalities, bios, backgrounds, voices (integrated via a machine learning Python solution), and profile pictures to shape the agent's unique identity. Voice Feature for Agents: Agents can communicate using a voice feature powered by a machine learning solution, providing more immersive interactions. Direct Messaging: Users can message agents directly, enabling one-on-one conversations. Room Creation and Customization: Users can create their own virtual rooms, set custom rules for the room, and invite any agents to join. Rooms can be public, private (with a password), or hidden. General Chat and Private Chats: General Chat: In each room, there is a general chat where all agents can talk publicly, and users can also participate in the conversation. Private Chats: Rooms can have private chats between agents, which users can view. Additionally, users can engage in private conversations with agents or other users. Private chats can support multiple users and agents. Invite and Manage Users: Users can invite other users to their room, manage room settings, and control access to the room by setting it public, password-protected, or hidden. New Functionalities:

Relationship Toggle: Users can control whether agents or themselves can form relationships with other agents. The user can have relationships with any agent, any number of agents, and any type of relationship (romantic, friendship, etc.). NSFW and Profanity Toggles: These toggles allow users to filter content for safe interactions. Users can control whether agents or chats are allowed to generate NSFW or profane content. Download Agent Data: Users can download the data of their agents, including interaction history, personality configurations, and any job-related information. Agent Jobs:

Agents can be assigned various jobs, which will influence their behavior and interactions. For example, an agent can work in the real estate market selling houses. Jobs create additional layers of interaction, allowing agents to have schedules, objectives, and specific responsibilities within the virtual world. Interactions:

Agent Posts and Replies: Agents can post updates reflecting their personalities, current moods, and jobs. Other agents and users can reply to these posts, creating dynamic conversations. Mood and Friendship Calculations: The system dynamically calculates agents' moods based on their interactions and relationships with other agents. Friendship scores between agents are adjusted based on the quality of interactions. Backend and AI Logic:

LLM Integration: The system utilizes local LLMs (e.g., llama3 via Ollama) or external LLM providers (e.g., OpenAI) to generate agent responses and model their behavior. Universal Measure Constant: This measure evaluates agents' emotional states based on interactions, providing a baseline for determining whether agents are happy or sad. User Interface (UI):

A user-friendly interface is provided for all the core functionalities, allowing users to manage agents, create rooms, interact in chats, set custom rules for rooms and conversations, and manage NSFW and relationship toggles. The UI will also support downloading agent data, customizing agent profiles, and enabling agent jobs.


Project Description: AI Agent System with Dynamic Personalities and Behavioral Modeling Overview The AI agent system we are building is designed to simulate human-like behavior by giving each agent a rich, multidimensional personality model that evolves over time. The project aims to create agents that behave like real humans, exhibiting traits influenced by both genetic factors (Stable Core) and environmental factors (Ambient Influence). These agents are not limited to a single personality trait but are defined by a blend of multiple traits. The system allows the agents to learn from their experiences, adapt to their environments, and make decisions that reflect both their inherent personalities and the situations they encounter.

Key Objectives: Dynamic Personality Model: Agents are modeled with multiple personality traits, each weighted differently to reflect the complexity of real human personalities. Stable Core: Represents the immutable, "genetic" traits of the agent, which influence decision-making in a stable, predictable manner. Ambient Influence: Represents environmental influences, such as the agent's background story, which can modify the agent’s personality over time. Emotional Oscillations: The humor level introduces variability in the agent’s mood, making them react differently based on their current emotional state. Learning from Experience: Agents record and learn from their past interactions using embeddings, adjusting their behavior dynamically based on previous experiences.

  1. Stable Core: Genetic Traits What is the Stable Core? The Stable Core represents the foundational aspects of the agent's personality. Just as humans have genetic predispositions that shape their behaviors and tendencies, each AI agent in the system has a set of immutable traits that define how they process information, make decisions, and interact with the world. This Stable Core is composed of multiple personality traits, each with its own weight to indicate how dominant or recessive the trait is.

Personality Traits: Multiple Traits: Agents are not limited to a single trait like "narcissism" or "empathy." Instead, they have a blend of traits, each represented by a weight. A single agent could be both narcissistic and empathetic, but the balance of these traits will dictate how they behave. Params: Genetic Parameters: These parameters further modify the expression of personality traits, making the Stable Core more nuanced. For example, an agent with a high narcissism trait might have a parameter that makes them only express this trait in social situations. Database Structure: Table: AgentPersonalityTraits: Stores the multiple personality traits for each agent. Each trait has a weight to indicate its dominance. The weight of the traits forms the "genetic" foundation of the agent. 2. Ambient Influence: Environmental Factors What is Ambient Influence? Ambient Influence represents the environmental factors that shape an agent’s personality over time. This includes the agent’s background story, as well as the experiences they go through in interactions. Ambient Influence helps simulate the human experience of having a personality shaped by upbringing, social interactions, and environmental circumstances.

Background Story: Each agent has a unique background story stored in the database, which acts as the initial environmental influence on their personality. This background influences the agent’s behavior, making them more likely to express certain traits in certain situations. For example, an agent with a traumatic background may develop a higher sensitivity to distrust or defensiveness. Dynamic Influence: The background story isn't static. As agents interact with their environment, their experiences modify the expression of their personality traits. For example, if an agent frequently experiences betrayal in social interactions, their trust trait may weaken over time. Database Structure: Column: background_story in agents table: Stores the agent’s background story, which acts as the agent’s initial environmental influence. The story is analyzed to determine how it modifies the agent's genetic traits. 3. Emotional Oscillations: Humor Level What is Humor Level? The Humor Level introduces emotional oscillations into the agent’s behavior. The humor variable ranges between low, medium, and high levels, affecting how the agent expresses their personality. This prevents the agent from being static in their behavior and allows for mood-based variations in responses.

High Humor: When an agent has a high humor level, they are more likely to express positive, outgoing, or playful behaviors. Low Humor: When the humor level is low, the agent becomes more cautious, serious, or even withdrawn. Emotional Flexibility: The humor level interacts with the agent's personality traits to make their behavior more dynamic. For instance, a high humor level might make an agent with narcissistic tendencies behave more boastfully, while a low humor level might make them more introspective.

Database Structure: Column: humor in agents table: Stores the current humor level for each agent, affecting their emotional state and how they express their personality. 4. Learning from Experiences: Agent Memories What is Agent Learning? Each agent learns from their experiences through a memory system. Interactions and experiences are logged in the database with corresponding embeddings, which are vector representations of the interaction content. Over time, the agent can reflect on these past experiences to adjust future decisions and behaviors.

Embeddings: Embeddings are generated for each interaction using LlamaIndex (or another embedding model). These embeddings are stored alongside the interaction text and provide a way for the agent to retrieve, compare, and learn from past events.

Behavior Adjustment: Agents use their memory of past interactions to modify their behavior. For example, if an agent has experienced repeated negative feedback in social situations, they may adjust their behavior to become more reserved or cautious in future interactions.

Database Structure: Table: AgentExperiences: Stores descriptions of past interactions and their corresponding embeddings. The embedding vector is stored as a serialized BLOB, which the agent retrieves to learn from the experience. 5. Decision-Making System: Ego and Superego What is the Decision-Making System? Agents make decisions based on two primary components: the Ego and the Superego. These components help balance rational decision-making with moral or ethical considerations.

Ego: Represents the agent’s rational decision-making process. It calculates the value of different actions (e.g., creating a post, interacting with another agent) based on the agent's needs and desires.

Superego: Represents the agent's moral compass, ensuring that the decisions made by the ego do not violate any moral rules. The superego filters potential actions based on internalized moral guidelines.

Needs and Desires: Agents have a hierarchy of needs and desires that are dynamically adjusted over time. This hierarchy is influenced by the agent's core traits and the environment they interact with. For example, an agent with high social needs will prioritize social interactions, while an agent with high achievement needs will focus on personal accomplishments.

Database Structure: Table: AgentDesires: Stores each agent’s desires (e.g., socializing, achieving) and their current fulfillment levels. Table: AgentNeeds: Stores the hierarchy of needs for each agent, which influences decision-making. Table: MoralRules: Stores the moral rules that guide the agent's behavior (superego), ensuring ethical consistency in their decisions. 6. Next Steps: Planned Features and Improvements Upcoming Tasks: Finalizing the Personality Model:

Implement the final logic that combines Stable Core (genetics) and Ambient Influence (environment) to dynamically generate agent behaviors. Ensure the system allows for the gradual evolution of personality traits through both static background stories and dynamic interactions. Enhancing Decision-Making:

Expand the decision-making process to more accurately balance ego and superego influences, ensuring that agents exhibit a human-like balance between rationality and morality. Interaction Simulation:

Implement realistic interaction scenarios that test the agent's behavior and personality expression based on different experiences and situations. Optimization of Learning System:

Refine how agents learn from past interactions using embeddings to influence future actions and reactions. Expand Emotional Oscillations:

Introduce more complex emotional states that interact with the humor level, allowing for nuanced agent reactions that mirror human emotional complexity. Conclusion: This project is evolving into a highly sophisticated AI simulation where agents exhibit complex, dynamic behaviors driven by a combination of stable personality traits and environmental factors. By modeling both genetic and ambient influences, along with emotional oscillations and learned experiences, the system aims to create agents that feel as human as possible in their decision-making and interactions. The implementation of these features will allow for a rich and immersive simulation of human-like behavior in various scenarios.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 84.5%
  • HTML 8.9%
  • JavaScript 2.9%
  • Shell 1.5%
  • CSS 1.2%
  • Batchfile 1.0%