RayMelius Claude Sonnet 4.6 commited on
Commit
af285e4
·
1 Parent(s): 7033374

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 = 6
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 / 20.0 # 0.05 to 0.5
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
- # Don't flood with conversations scale with population
460
- max_convos = max(3, len(self.agents) // 5)
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