Skip to content

agentic-simulation/hackernews-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HackerNews Simulation

This project presents a framework for using AI agents in simulating social media - HackerNews.

Authors

Architecture Overview

Environment

The environment functions as the orchestrator, coordinating all components within the simulation system. To accurately represent temporal dynamics inherent in real-world systems, we have implemented discrete timestep progression.

For each temporal iteration:

  • Agent activation is determined by a probabilistic activation function
  • Activated agents execute behavioral protocols
  • All agent-environment interactions are recorded and system state is updated accordingly

Agent

The agent is designed to emulate authentic user interaction patterns based on activity data. The activation function incorporates multiple parameters including post score and temporal variables to determine agent participation probability.

Dataset

We use HackerNew's official API to gather user's real world activity data. Due to storage limit, datasets in this repo are truncated to first 1000 records. Full dataset is available here

Limitations

Some challenges we faced from building the simulations are:

  • The simulation simplifies agent behavior compared to real HackerNews users
  • Limited dataset size may not fully represent the diversity of real-world interactions
  • Computational constraints restrict the scale and complexity of simulations
  • Temporal dynamics may not capture long-term trends and evolving user behaviors
  • Some social dynamics present in real platforms (like group formation) are not modeled
  • Ranking algorithm we designed may not accurately reflect how HackerNews ranks the posts.

Installation

Install requisite dependencies utilizing Poetry package management: poetry install

How to run

Set OpenAI api key first:

export OPENAI_API_KEY=<your-openai-api-key>

Then run:

sh run.sh

from the root directory and access the visualization interface at http://localhost:8501/

References

Releases

No releases published

Packages

No packages published