Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Social agent name should map to mission. #2008

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions smarts/core/scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,8 @@ def setdefault(l: list, index: int, default):

file_match = os.path.join(social_agents_path, "*.pkl")
for missions_file_path in glob.glob(file_match):
count = 0
with open(missions_file_path, "rb") as missions_file:
count = 0
missions = pickle.load(missions_file)

for mission_and_actor in missions:
Expand Down Expand Up @@ -428,7 +428,7 @@ def setdefault(l: list, index: int, default):
social_agents_info = []
for l in agent_bucketer:
social_agents_info.append(
{agent.id: (agent, mission) for agent, mission in l}
{agent.actor_name: (agent, mission) for agent, mission in l}
)
return social_agents_info

Expand Down