Compare commits
No commits in common. "fe05a71d3e4ed7d10bf68aa4eda6dd995ec070f4" and "2a1fc257e876c9d2fa7be0ab38d520c32cf8f474" have entirely different histories.
fe05a71d3e
...
2a1fc257e8
@ -8,6 +8,8 @@
|
||||
|
||||
This repository accompanies our research paper titled "[Generative Agents: Interactive Simulacra of Human Behavior](https://arxiv.org/abs/2304.03442)." It contains our core simulation module for generative agents—computational agents that simulate believable human behaviors—and their game environment. Below, we document the steps for setting up the simulation environment on your local machine and for replaying the simulation as a demo animation.
|
||||
|
||||
*Usage Notice: This code repository of generative agents is intended for research use only.*
|
||||
|
||||
## <img src="https://joonsungpark.s3.amazonaws.com:443/static/assets/characters/profile/Isabella_Rodriguez.png" alt="Generative Isabella"> Setting Up the Environment
|
||||
To set up your environment, you will need to generate a `utils.py` file that contains your OpenAI API key and download the necessary packages.
|
||||
|
||||
@ -132,7 +134,7 @@ series = {UIST '23}
|
||||
## <img src="https://joonsungpark.s3.amazonaws.com:443/static/assets/characters/profile/Wolfgang_Schulz.png" alt="Generative Wolfgang"> Acknowledgements
|
||||
|
||||
We encourage you to support the following three amazing artists who have designed the game assets for this project, especially if you are planning to use the assets included here for your own project:
|
||||
* Background art: [PixyMoon (@_PixyMoon\_)](https://twitter.com/_PixyMoon_)
|
||||
* Background art: [PixyMoon (@_PixyMoon _)](https://twitter.com/_PixyMoon_)
|
||||
* Furniture/interior design: [LimeZu (@lime_px)](https://twitter.com/lime_px)
|
||||
* Character design: [ぴぽ (@pipohi)](https://twitter.com/pipohi)
|
||||
|
||||
|
||||
@ -22,16 +22,16 @@ h11==0.14.0
|
||||
idna==3.3
|
||||
importlib-metadata==4.8.2
|
||||
jmespath==1.0.1
|
||||
joblib>=1.1.1
|
||||
kiwisolver==1.4.4
|
||||
matplotlib==3.7.2
|
||||
joblib==1.1.0
|
||||
kiwisolver==1.3.1
|
||||
matplotlib==3.3.4
|
||||
multidict==6.0.4
|
||||
nltk==3.6.5
|
||||
numpy==1.25.2
|
||||
numpy==1.19.5
|
||||
openai==0.27.0
|
||||
outcome==1.2.0
|
||||
packaging==23.0
|
||||
pandas==2.0.3
|
||||
pandas==1.1.5
|
||||
patsy==0.5.3
|
||||
Pillow==8.4.0
|
||||
psycopg2-binary==2.9.5
|
||||
@ -43,9 +43,9 @@ pytz==2021.3
|
||||
regex==2021.11.10
|
||||
requests==2.26.0
|
||||
s3transfer==0.6.0
|
||||
scikit-learn==1.3.0
|
||||
scikit-learn==0.24.2
|
||||
scikit-posthocs==0.7.0
|
||||
scipy==1.11.1
|
||||
scipy==1.5.4
|
||||
seaborn==0.12.2
|
||||
selenium==4.8.2
|
||||
six==1.16.0
|
||||
@ -64,5 +64,5 @@ typing-extensions==4.0.0
|
||||
urllib3==1.26.7
|
||||
wsproto==1.2.0
|
||||
yarl==1.8.2
|
||||
yellowbrick==1.5
|
||||
yellowbrick==1.3.post1
|
||||
zipp==3.6.0
|
||||
|
||||
@ -419,7 +419,7 @@ def revise_identity(persona):
|
||||
|
||||
# print (";adjhfno;asdjao;idfjo;af", p_name)
|
||||
plan_prompt = statements + "\n"
|
||||
plan_prompt += f"Given the statements above, is there anything that {p_name} should remember as they plan for"
|
||||
plan_prompt += f"Given the statements above, is there anything that {p_name} should remember as she plans for"
|
||||
plan_prompt += f" *{persona.scratch.curr_time.strftime('%A %B %d')}*? "
|
||||
plan_prompt += f"If there is any scheduling information, be as specific as possible (include date, time, and location if stated in the statement)\n\n"
|
||||
plan_prompt += f"Write the response from {p_name}'s perspective."
|
||||
@ -427,12 +427,12 @@ def revise_identity(persona):
|
||||
# print (plan_note)
|
||||
|
||||
thought_prompt = statements + "\n"
|
||||
thought_prompt += f"Given the statements above, how might we summarize {p_name}'s feelings about their days up to now?\n\n"
|
||||
thought_prompt += f"Given the statements above, how might we summarize {p_name}'s feelings about her days up to now?\n\n"
|
||||
thought_prompt += f"Write the response from {p_name}'s perspective."
|
||||
thought_note = ChatGPT_single_request(thought_prompt)
|
||||
thought_note = ChatGPT_single_request(plan_prompt)
|
||||
# print (thought_note)
|
||||
|
||||
currently_prompt = f"{p_name}'s status from {(persona.scratch.curr_time - datetime.timedelta(days=1)).strftime('%A %B %d')}:\n"
|
||||
currently_prompt = f"Isabella Rodriguez's status from {(persona.scratch.curr_time - datetime.timedelta(days=1)).strftime('%A %B %d')}:\n"
|
||||
currently_prompt += f"{persona.scratch.currently}\n\n"
|
||||
currently_prompt += f"{p_name}'s thoughts at the end of {(persona.scratch.curr_time - datetime.timedelta(days=1)).strftime('%A %B %d')}:\n"
|
||||
currently_prompt += (plan_note + thought_note).replace('\n', '') + "\n\n"
|
||||
@ -1050,4 +1050,4 @@ def plan(persona, maze, personas, new_day, retrieved):
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -26,7 +26,6 @@ import time
|
||||
import math
|
||||
import os
|
||||
import shutil
|
||||
import traceback
|
||||
|
||||
from selenium import webdriver
|
||||
|
||||
@ -592,8 +591,7 @@ class ReverieServer:
|
||||
|
||||
print (ret_str)
|
||||
|
||||
except:
|
||||
traceback.print_exc()
|
||||
except:
|
||||
print ("Error.")
|
||||
pass
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user