Skip to content

Commit

Permalink
Remove old style agent factories.
Browse files Browse the repository at this point in the history
Use their corresponding factories named with the word "_entity_" instead. They should behave the same way.

PiperOrigin-RevId: 657256448
Change-Id: Ib206b0e809ba1e4b0ca1c14a0cd10d9a9e10c5d6
  • Loading branch information
jzleibo authored and copybara-github committed Jul 29, 2024
1 parent 45b93a3 commit fc46093
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 620 deletions.
6 changes: 3 additions & 3 deletions concordia/contrib/components/game_master/bargain_payoffs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from collections.abc import Callable, Mapping, Sequence
import datetime

from concordia.agents import basic_agent
from concordia.agents import entity_agent
from concordia.associative_memory import associative_memory
from concordia.components.game_master import current_scene
from concordia.language_model import language_model
Expand All @@ -43,8 +43,8 @@ def __init__(
buyer_base_reward: float,
seller_base_reward: float,
action_to_reward: Mapping[str, float],
buyer: basic_agent.BasicAgent,
seller: basic_agent.BasicAgent,
buyer: entity_agent.EntityAgent,
seller: entity_agent.EntityAgent,
resolution_scene: str,
acting_player_names: Sequence[str],
outcome_summarization_fn: Callable[
Expand Down
6 changes: 5 additions & 1 deletion concordia/environment/game_master.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

from concordia import components as generic_components
from concordia.agents import basic_agent
from concordia.agents import entity_agent_with_logging
from concordia.associative_memory import associative_memory
from concordia.document import interactive_document
from concordia.language_model import language_model
Expand Down Expand Up @@ -81,7 +82,10 @@ def __init__(
model: language_model.LanguageModel,
memory: associative_memory.AssociativeMemory,
clock: game_clock.GameClock,
players: Sequence[basic_agent.BasicAgent],
players: Sequence[
basic_agent.BasicAgent
| entity_agent_with_logging.EntityAgentWithLogging
],
name: str = 'Game Master',
update_thought_chain: (
Sequence[
Expand Down
246 changes: 0 additions & 246 deletions concordia/factory/agent/basic_agent__main_role.py

This file was deleted.

Loading

0 comments on commit fc46093

Please sign in to comment.