Skip to content

Commit

Permalink
🆕 compiled website
Browse files Browse the repository at this point in the history
  • Loading branch information
GiulioRossetti committed Sep 11, 2024
1 parent 0882dd0 commit 85da789
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 5 deletions.
19 changes: 16 additions & 3 deletions _pages/scenario.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ The configuration parameters are stored in a `config.json` file having the follo
"starting_agents": 1000,
"new_agents_per_iteration": 10
"hourly_activity": {...},
"actions_likelihood": {
"post": 0.2,
"comment": 0.3,
"read": 0.1,
"share": 0.1,
"reply": 0.1,
"search": 0.05,
"news": 0.1,
"cast": 0.05
}
},
"agents": {
"education_levels": ["high school", "bachelor", "master", "phd"],
Expand All @@ -66,7 +76,8 @@ The configuration parameters are stored in a `config.json` file having the follo
"llm_agents": ["llama3", "mistral"],
"n_interests": {"min": 4, "max": 10},
"interests": [...],
"big_five": {...}
"big_five": {...},
"attention_window": 336
},
"posts": {
"visibility_rounds": 36,
Expand All @@ -85,8 +96,9 @@ The `simulation` section contains the parameters that define the simulation:
- `starting_agents`: the number of agents that will be created at the beginning of the simulation by the `YClient`;
- `new_agents_per_iteration`: the number of agents that will be created during each day of the simulation;
- `hourly_activity`: a dictionary that specifies the hourly activity of the agents.
- `actions_likelihood`: a dictionary that specifies the likelihood of each action that an agent can select in a round. During each agent-iteration, the system will sample from this distribution to identify the set of candidate actions the agent will be asked to choose from. Setting individual action likelihood to 0 will prevent the agent from performing that action.

The `agents` section contains the parameters that define the agents:
The `agents` section contains the parameters that will be used to generate the agents profiles:
- `education_levels`: the education levels of the agents;
- `languages`: the languages spoken by the agents;
- `max_length_thread_reading`: the maximum number of posts of a given threads that an agent can read to build a context before commenting;
Expand All @@ -98,7 +110,8 @@ The `agents` section contains the parameters that define the agents:
- `llm_agents`: a list of Large Language Models that the YClient can assign to the agents;
- `n_interests`: the number of interests that the agents can have;
- `interests`: the topics among witch each agent can sample (at creation time) in order to define their interests;
- `big_five`: a dictionary that specifies the Big Five personality traits of the agents (which will be sampled at creation time).
- `big_five`: a dictionary that specifies the Big Five personality traits of the agents (which will be sampled at creation time);
- `attention_window`: the posting/commenting/reacting history (in terms of rounds) the system will use to dynamically estimate the agent's topics of interests.

Using such information, the `YClient` will create the agents population (leveraging the `faker` Python library).

Expand Down
27 changes: 25 additions & 2 deletions _pages/yserver.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,33 @@ pip install requirement_server.txt

#### Run the server

Start the server with the following command:
Set the server preferences modifying the file `config_files/exp_config.json`:

```json
{
"name": "local_test",
"host": "0.0.0.0",
"port": 5010,
"reset_db": "True",
"modules": ["news", "voting"]
}
```
where:
- `name` is the name of the experiment (will be used to name the simulation database - which will be created under the folder `experiments`);
- `host` is the IP address of the server;
- `port` is the port of the server;
- `reset_db` is a flag to reset the database at each server start;
- `modules` is a list of additional modules to be loaded by the server (e.g., news, voting). Please note that the YClient must be configured to use the same modules.

Once the simulation is configured, start the YServer with the following command:

```bash
python y_server.py
```

The server will be then ready to accept requests at `http://localhost:5000`.
The server will be then ready to accept requests at `http://localhost:5010`.

#### Available Modules
- **News**: This module allows the server to access online news sources leveraging RSS feeds.
- **Voting**: This module allows the agents to cast their voting intention after interacting with peers contents (designed to perform political debate simulation).

0 comments on commit 85da789

Please sign in to comment.