Skip to content

devbravo/EngageX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Social Media Network Simulation for Reinforcement Learning Agents

📚 Overview

This project simulates a dynamic social media environment to develop and evaluate reinforcement learning (RL) agents. The RL agent’s goal is to optimize its influence within the network by strategically deciding when to post, engage with other users, follow/unfollow, and maximize overall engagement.

The simulation incorporates realistic user behaviors and network dynamics, including posting activity, engagement patterns, and evolving follower relationships. This serves as a foundation for studying social media dynamics and testing agent strategies in controlled yet realistic environments.

🚀 Features

  • User Types: Simulated users with distinct behavioral patterns such as lurkers, casual users, active users, influencers, and bots.
  • Dynamic Posting and Engagement: Users post content based on probability and engage with visible posts in their network.
  • Follower Dynamics: Agents grow and manage their follower networks through follow-back, follow, and unfollow actions.
  • Customizable Simulation: Adjust user distributions, posting probabilities, and engagement patterns to explore diverse scenarios.
  • Data Collection and Analysis: Metrics such as post frequency, engagement levels, and follower growth rates are tracked to evaluate agent and network behaviors.

🔧 Tools and Technologies

  • Mesa: For agent-based modeling and simulation.
  • NetworkX: For modeling the social media network graph.
  • Plotly: For creating interactive visualizations of simulation results.
  • Python Libraries: NumPy, pandas, matplotlib for data manipulation and plotting.

📈 Metrics and Goals

Key metrics include:

  • Post Frequency and Engagement: Tracking posting and engagement trends over simulation steps.
  • Follower Growth: Analyzing how users and agents grow their influence.
  • Network Structure: Visualizing and analyzing the evolving network graph.
  • RL Agent Performance: Evaluating the agent’s ability to optimize posting strategies and engagement actions.

🧠 Insights and Applications

  • Reinforcement Learning: This simulation is designed to train RL agents on how to navigate complex social systems.
  • Social Media Research: Analyze and simulate user behaviors in social networks to test new features or moderation policies.
  • Marketing Strategy: Model and optimize content strategies for influencers and brands using AI.

🛠️ Setup Instructions

  1. Clone the repository:

git clone https://github.com/your-username/social-media-simulation.git cd social-media-simulation

  1. Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install dependencies:
pip install --pre "mesa[viz]" networkx matplotlib plotly pandas

4.Run the simulation notebook or script: python main.py

📊 Example Results

Visualizations from the simulation include:

  • Post frequency and engagement trends over time.
  • Follower dynamics by user type.
  • Network graphs showing relationships and influence patterns.

Post vs Engagement Example Network Graph Example

📈 Future Work

  • Implement multi-day RL strategies for agents.
  • Add advanced network dynamics such as trending topics and hashtags.
  • Incorporate time-based active hours for realistic posting schedules.
  • Experiment with various RL algorithms for agent optimization.

🤝 Contributions

Contributions are welcome! Feel free to submit a pull request or open an issue to suggest features or report bugs.

📝 License

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published