Reduce LLM call rate: shorter convos, less frequent, hard cap
Browse files- max_turns: 6 → 3 (halves turns per conversation)
- initiation base_chance: /20 → /40 (halves conversation start rate)
- max simultaneous conversations: dynamic → hard cap of 2
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
src/soci/actions/conversation.py
CHANGED
|
@@ -35,7 +35,7 @@ class Conversation:
|
|
| 35 |
turns: list[ConversationTurn] = field(default_factory=list)
|
| 36 |
topic: str = ""
|
| 37 |
is_active: bool = True
|
| 38 |
-
max_turns: int =
|
| 39 |
|
| 40 |
@property
|
| 41 |
def is_finished(self) -> bool:
|
|
|
|
| 35 |
turns: list[ConversationTurn] = field(default_factory=list)
|
| 36 |
topic: str = ""
|
| 37 |
is_active: bool = True
|
| 38 |
+
max_turns: int = 3
|
| 39 |
|
| 40 |
@property
|
| 41 |
def is_finished(self) -> bool:
|
src/soci/actions/social.py
CHANGED
|
@@ -17,7 +17,7 @@ def should_initiate_conversation(agent: Agent, other_id: str, clock: SimClock) -
|
|
| 17 |
return False
|
| 18 |
|
| 19 |
# Extraversion drives conversation initiation
|
| 20 |
-
base_chance = agent.persona.extraversion /
|
| 21 |
|
| 22 |
# Boost if social need is low (lonely agents seek conversation)
|
| 23 |
if agent.needs.social < 0.3:
|
|
|
|
| 17 |
return False
|
| 18 |
|
| 19 |
# Extraversion drives conversation initiation
|
| 20 |
+
base_chance = agent.persona.extraversion / 40.0 # 0.025 to 0.25
|
| 21 |
|
| 22 |
# Boost if social need is low (lonely agents seek conversation)
|
| 23 |
if agent.needs.social < 0.3:
|
src/soci/engine/simulation.py
CHANGED
|
@@ -456,8 +456,8 @@ class Simulation:
|
|
| 456 |
|
| 457 |
async def _handle_social_interactions(self, agents: list[Agent]) -> None:
|
| 458 |
"""Check if any idle co-located agents should start conversations."""
|
| 459 |
-
#
|
| 460 |
-
max_convos =
|
| 461 |
if len(self.active_conversations) >= max_convos:
|
| 462 |
return
|
| 463 |
|
|
|
|
| 456 |
|
| 457 |
async def _handle_social_interactions(self, agents: list[Agent]) -> None:
|
| 458 |
"""Check if any idle co-located agents should start conversations."""
|
| 459 |
+
# Hard cap: at most 2 simultaneous conversations to keep LLM calls low
|
| 460 |
+
max_convos = 2
|
| 461 |
if len(self.active_conversations) >= max_convos:
|
| 462 |
return
|
| 463 |
|