sotopia-lab / sotopia

Sotopia: an Open-ended Social Learning Environment (ICLR 2024 spotlight)
https://docs.sotopia.world
MIT License
164 stars 20 forks source link

[BUG]: potential buggy behavior in script background #24

Closed XuhuiZhou closed 8 months ago

XuhuiZhou commented 9 months ago

Description of the bug

The current setting of the ScriptBackground has the to_natural_language function that would wipe off the agents' background when either of agent's background is blank. This would reduce all the sotopia situation with "stranger" relationship to sotopia-lite

@bugsz Can you double check this and see if we need to fix this problem?

Steps To Reproduce

see the ScriptBackground class or run mutual friends scenarios.

Additional Information

No response

bugsz commented 9 months ago

Based on my observation the scenario happened on all relation=stranger episodes. Interestingly this only affects those in interaction mode. The main difference lies in how we retrieve the background. In script writing mode we are using script_background = env.inbox[0][1], which directly get the background from self.recv_message("Environment", self.background). In interaction mode we are using the env.reset()'s return, which returns backgrounds from after doing render_text_for_agent. Not familiar with these tags, but from the code in test_get_bio.py I supposed that render_text_for_agent will delete some of the information.

Maybe we could change from and to or in to_natural_language?