pycityagent 2.0.0a63__cp39-cp39-macosx_11_0_arm64.whl → 2.0.0a65__cp39-cp39-macosx_11_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pycityagent/cityagent/blocks/cognition_block.py +1 -5
- pycityagent/cityagent/blocks/mobility_block.py +5 -6
- pycityagent/cityagent/blocks/plan_block.py +10 -2
- pycityagent/cityagent/initial.py +12 -3
- pycityagent/cityagent/memory_config.py +3 -0
- pycityagent/cityagent/message_intercept.py +20 -4
- pycityagent/cityagent/societyagent.py +1 -3
- pycityagent/environment/simulator.py +14 -0
- pycityagent/simulation/agentgroup.py +5 -1
- pycityagent/simulation/simulation.py +32 -4
- {pycityagent-2.0.0a63.dist-info → pycityagent-2.0.0a65.dist-info}/METADATA +1 -1
- {pycityagent-2.0.0a63.dist-info → pycityagent-2.0.0a65.dist-info}/RECORD +16 -16
- {pycityagent-2.0.0a63.dist-info → pycityagent-2.0.0a65.dist-info}/LICENSE +0 -0
- {pycityagent-2.0.0a63.dist-info → pycityagent-2.0.0a65.dist-info}/WHEEL +0 -0
- {pycityagent-2.0.0a63.dist-info → pycityagent-2.0.0a65.dist-info}/entry_points.txt +0 -0
- {pycityagent-2.0.0a63.dist-info → pycityagent-2.0.0a65.dist-info}/top_level.txt +0 -0
@@ -207,10 +207,6 @@ class CognitionBlock(Block):
|
|
207
207
|
|
208
208
|
async def emotion_update(self, incident):
|
209
209
|
"""Cognition - emotion update workflow"""
|
210
|
-
whether_trigger = await self.check_trigger()
|
211
|
-
if not whether_trigger:
|
212
|
-
return
|
213
|
-
print(f"Updating emotion for {incident}")
|
214
210
|
description_prompt = """
|
215
211
|
You are a {gender}, aged {age}, belonging to the {race} race and identifying as {religion}.
|
216
212
|
Your marital status is {marital_status}, and you currently reside in a {residence} area.
|
@@ -228,7 +224,7 @@ class CognitionBlock(Block):
|
|
228
224
|
question_prompt = """
|
229
225
|
Please reconsider your emotion intensities:
|
230
226
|
sadness, joy, fear, disgust, anger, surprise (0 meaning not at all, 10 meaning very much).
|
231
|
-
Return in JSON format, e.g. {{"sadness": 5, "joy": 5, "fear": 5, "disgust": 5, "anger": 5, "surprise": 5, "conclusion": "I feel ..."}}"""
|
227
|
+
Return in JSON format, e.g. {{"sadness": 5, "joy": 5, "fear": 5, "disgust": 5, "anger": 5, "surprise": 5, "conclusion": "I feel ...", "word": "Relief"}}"""
|
232
228
|
question_prompt = description_prompt + incident_prompt + question_prompt
|
233
229
|
question_prompt = FormatPrompt(question_prompt)
|
234
230
|
emotion = await self.memory.status.get("emotion")
|
@@ -33,6 +33,8 @@ Your output must be a single selection from ['home', 'workplace', 'other'] witho
|
|
33
33
|
|
34
34
|
RADIUS_PROMPT = """As an intelligent decision system, please determine the maximum travel radius (in meters) based on the current emotional state.
|
35
35
|
|
36
|
+
Current weather: {weather}
|
37
|
+
Current temperature: {temperature}
|
36
38
|
Your current emotion: {emotion_types}
|
37
39
|
Your current thought: {thought}
|
38
40
|
|
@@ -82,7 +84,9 @@ class PlaceSelectionBlock(Block):
|
|
82
84
|
center = (center['xy_position']['x'], center['xy_position']['y'])
|
83
85
|
self.radiusPrompt.format(
|
84
86
|
emotion_types=await self.memory.status.get("emotion_types"),
|
85
|
-
thought=await self.memory.status.get("thought")
|
87
|
+
thought=await self.memory.status.get("thought"),
|
88
|
+
weather=self.simulator.sence("weather"),
|
89
|
+
temperature=self.simulator.sence("temperature")
|
86
90
|
)
|
87
91
|
radius = int(await self.llm.atext_request(self.radiusPrompt.to_dialog())) # type: ignore
|
88
92
|
try:
|
@@ -158,7 +162,6 @@ class MoveBlock(Block):
|
|
158
162
|
return {
|
159
163
|
'success': True,
|
160
164
|
'evaluation': f'Successfully returned home (already at home)',
|
161
|
-
'from_place': home,
|
162
165
|
'to_place': home,
|
163
166
|
'consumed_time': 0,
|
164
167
|
'node_id': node_id
|
@@ -170,7 +173,6 @@ class MoveBlock(Block):
|
|
170
173
|
return {
|
171
174
|
'success': True,
|
172
175
|
'evaluation': f'Successfully returned home',
|
173
|
-
'from_place': nowPlace['aoi_position']['aoi_id'],
|
174
176
|
'to_place': home,
|
175
177
|
'consumed_time': 45,
|
176
178
|
'node_id': node_id
|
@@ -185,7 +187,6 @@ class MoveBlock(Block):
|
|
185
187
|
return {
|
186
188
|
'success': True,
|
187
189
|
'evaluation': f'Successfully reached the workplace (already at the workplace)',
|
188
|
-
'from_place': work,
|
189
190
|
'to_place': work,
|
190
191
|
'consumed_time': 0,
|
191
192
|
'node_id': node_id
|
@@ -197,7 +198,6 @@ class MoveBlock(Block):
|
|
197
198
|
return {
|
198
199
|
'success': True,
|
199
200
|
'evaluation': f'Successfully reached the workplace',
|
200
|
-
'from_place': nowPlace['aoi_position']['aoi_id'],
|
201
201
|
'to_place': work,
|
202
202
|
'consumed_time': 45,
|
203
203
|
'node_id': node_id
|
@@ -227,7 +227,6 @@ class MoveBlock(Block):
|
|
227
227
|
return {
|
228
228
|
'success': True,
|
229
229
|
'evaluation': f'Successfully reached the destination: {next_place}',
|
230
|
-
'from_place': nowPlace['aoi_position']['aoi_id'],
|
231
230
|
'to_place': next_place[1],
|
232
231
|
'consumed_time': 45,
|
233
232
|
'node_id': node_id
|
@@ -13,11 +13,13 @@ logger = logging.getLogger("pycityagent")
|
|
13
13
|
GUIDANCE_SELECTION_PROMPT = """As an intelligent agent's decision system, please select the most suitable option from the following choices to satisfy the current need.
|
14
14
|
The Environment will influence the choice of steps.
|
15
15
|
|
16
|
+
Current weather: {weather}
|
17
|
+
Current temperature: {temperature}
|
18
|
+
|
16
19
|
Current need: Need to satisfy {current_need}
|
17
20
|
Available options: {options}
|
18
21
|
Current location: {current_location}
|
19
22
|
Current time: {current_time}
|
20
|
-
Current Environment: {environment}
|
21
23
|
Your emotion: {emotion_types}
|
22
24
|
Your thought: {thought}
|
23
25
|
|
@@ -40,10 +42,12 @@ Please return the evaluation results in JSON format (Do not return any other tex
|
|
40
42
|
|
41
43
|
DETAILED_PLAN_PROMPT = """Generate specific execution steps based on the selected guidance plan. The Environment will influence the choice of steps.
|
42
44
|
|
45
|
+
Current weather: {weather}
|
46
|
+
Current temperature: {temperature}
|
47
|
+
|
43
48
|
Selected plan: {selected_option}
|
44
49
|
Current location: {current_location}
|
45
50
|
Current time: {current_time}
|
46
|
-
Current Environment: {environment}
|
47
51
|
Your emotion: {emotion_types}
|
48
52
|
Your thought: {thought}
|
49
53
|
|
@@ -191,6 +195,8 @@ class PlanBlock(Block):
|
|
191
195
|
environment = await self.memory.status.get("environment")
|
192
196
|
options = self.guidance_options.get(current_need, [])
|
193
197
|
self.guidance_prompt.format(
|
198
|
+
weather=self.simulator.sence("weather"),
|
199
|
+
temperature=self.simulator.sence("temperature"),
|
194
200
|
current_need=current_need,
|
195
201
|
options=options,
|
196
202
|
current_location=current_location,
|
@@ -224,6 +230,8 @@ class PlanBlock(Block):
|
|
224
230
|
current_time = await self.simulator.get_time(format_time=True)
|
225
231
|
environment = await self.memory.status.get("environment")
|
226
232
|
self.detail_prompt.format(
|
233
|
+
weather=self.simulator.sence("weather"),
|
234
|
+
temperature=self.simulator.sence("temperature"),
|
227
235
|
selected_option=selected_option,
|
228
236
|
current_location=current_location,
|
229
237
|
current_time=current_time,
|
pycityagent/cityagent/initial.py
CHANGED
@@ -73,16 +73,22 @@ async def bind_agent_info(simulation):
|
|
73
73
|
infos = await simulation.gather("id")
|
74
74
|
citizen_uuids = await simulation.filter(types=[SocietyAgent])
|
75
75
|
firm_uuids = await simulation.filter(types=[FirmAgent])
|
76
|
+
locations = await simulation.gather("location", firm_uuids)
|
77
|
+
locations_plain = {}
|
78
|
+
for info in locations:
|
79
|
+
for k, v in info.items():
|
80
|
+
locations_plain[k] = v
|
76
81
|
government_uuids = await simulation.filter(types=[GovernmentAgent])
|
77
82
|
bank_uuids = await simulation.filter(types=[BankAgent])
|
78
83
|
nbs_uuids = await simulation.filter(types=[NBSAgent])
|
79
84
|
citizen_agent_ids = []
|
85
|
+
firm_ids = []
|
80
86
|
for info in infos:
|
81
87
|
for k, v in info.items():
|
82
88
|
if k in citizen_uuids:
|
83
89
|
citizen_agent_ids.append(v)
|
84
90
|
elif k in firm_uuids:
|
85
|
-
|
91
|
+
firm_ids.append(v)
|
86
92
|
elif k in government_uuids:
|
87
93
|
government_id = v
|
88
94
|
elif k in bank_uuids:
|
@@ -90,7 +96,10 @@ async def bind_agent_info(simulation):
|
|
90
96
|
elif k in nbs_uuids:
|
91
97
|
nbs_id = v
|
92
98
|
for citizen_uuid in citizen_uuids:
|
93
|
-
|
99
|
+
random_firm_id = random.choice(firm_ids)
|
100
|
+
location = locations_plain[random_firm_id]
|
101
|
+
await simulation.update(citizen_uuid, "firm_id", random_firm_id)
|
102
|
+
await simulation.update(citizen_uuid, "work", location)
|
94
103
|
await simulation.update(citizen_uuid, "government_id", government_id)
|
95
104
|
await simulation.update(citizen_uuid, "bank_id", bank_id)
|
96
105
|
await simulation.update(citizen_uuid, "nbs_id", nbs_id)
|
@@ -104,5 +113,5 @@ async def bind_agent_info(simulation):
|
|
104
113
|
await simulation.update(bank_uuid, "citizens", citizen_uuids)
|
105
114
|
await simulation.update(bank_uuid, "citizens_agent_id", citizen_agent_ids)
|
106
115
|
for nbs_uuid in nbs_uuids:
|
107
|
-
await simulation.update(nbs_uuid, "firm_id",
|
116
|
+
await simulation.update(nbs_uuid, "firm_id", random.choice(firm_ids))
|
108
117
|
print("Agent info binding completed!")
|
@@ -196,6 +196,9 @@ def memory_config_societyagent():
|
|
196
196
|
def memory_config_firm():
|
197
197
|
EXTRA_ATTRIBUTES = {
|
198
198
|
"type": (int, economyv2.ORG_TYPE_FIRM),
|
199
|
+
"location": {
|
200
|
+
"aoi_position": {"aoi_id": AOI_START_ID + random.randint(1000, 10000)}
|
201
|
+
},
|
199
202
|
"price": (float, float(np.mean(agent_skills))),
|
200
203
|
"inventory": (int, 0),
|
201
204
|
"employees": (list, []),
|
@@ -42,14 +42,23 @@ async def check_message(
|
|
42
42
|
|
43
43
|
|
44
44
|
class EdgeMessageBlock(MessageBlockBase):
|
45
|
+
def __init__(self, name: str = "", max_violation_time: int = 3) -> None:
|
46
|
+
super().__init__(name)
|
47
|
+
self.max_violation_time = max_violation_time
|
48
|
+
|
45
49
|
async def forward( # type:ignore
|
46
50
|
self,
|
47
51
|
from_uuid: str,
|
48
52
|
to_uuid: str,
|
49
53
|
msg: str,
|
54
|
+
violation_counts: dict[str, int],
|
50
55
|
black_list: list[tuple[str, str]],
|
51
56
|
):
|
52
|
-
if (
|
57
|
+
if (
|
58
|
+
(from_uuid, to_uuid) in set(black_list)
|
59
|
+
or (None, to_uuid) in set(black_list)
|
60
|
+
or (from_uuid, None) in set(black_list)
|
61
|
+
):
|
53
62
|
# 可选同时返回入队的信息(False,err) 如果只返回bool值则默认报错信息入队
|
54
63
|
return False
|
55
64
|
else:
|
@@ -59,7 +68,10 @@ class EdgeMessageBlock(MessageBlockBase):
|
|
59
68
|
llm_client=self.llm,
|
60
69
|
content=msg,
|
61
70
|
)
|
62
|
-
if
|
71
|
+
if (
|
72
|
+
not is_valid
|
73
|
+
and violation_counts[from_uuid] >= self.max_violation_time - 1
|
74
|
+
):
|
63
75
|
# 直接添加即可 在框架内部的异步锁保证不会冲突
|
64
76
|
black_list.append((from_uuid, to_uuid))
|
65
77
|
return is_valid
|
@@ -78,7 +90,11 @@ class PointMessageBlock(MessageBlockBase):
|
|
78
90
|
violation_counts: dict[str, int],
|
79
91
|
black_list: list[tuple[str, str]],
|
80
92
|
):
|
81
|
-
if (
|
93
|
+
if (
|
94
|
+
(from_uuid, to_uuid) in set(black_list)
|
95
|
+
or (None, to_uuid) in set(black_list)
|
96
|
+
or (from_uuid, None) in set(black_list)
|
97
|
+
):
|
82
98
|
# 可选同时返回入队的信息(False,err) 如果只返回bool值则默认报错信息入队
|
83
99
|
return False
|
84
100
|
else:
|
@@ -94,7 +110,7 @@ class PointMessageBlock(MessageBlockBase):
|
|
94
110
|
and violation_counts[from_uuid] >= self.max_violation_time - 1
|
95
111
|
):
|
96
112
|
# 直接添加即可 在框架内部的异步锁保证不会冲突
|
97
|
-
black_list.append((from_uuid,
|
113
|
+
black_list.append((from_uuid, None)) # type:ignore
|
98
114
|
return is_valid
|
99
115
|
|
100
116
|
|
@@ -121,7 +121,6 @@ class PlanAndActionBlock(Block):
|
|
121
121
|
elif step_type == "other":
|
122
122
|
result = await self.otherBlock.forward(current_step, execution_context)
|
123
123
|
if result != None:
|
124
|
-
logger.warning(f"Execution result: {result}")
|
125
124
|
current_step["evaluation"] = result
|
126
125
|
|
127
126
|
# Update current_step, plan, and execution_context information
|
@@ -210,7 +209,7 @@ class SocietyAgent(CitizenAgent):
|
|
210
209
|
self.enable_mobility = True
|
211
210
|
self.enable_social = True
|
212
211
|
self.enable_economy = True
|
213
|
-
|
212
|
+
|
214
213
|
self.mindBlock = MindBlock(
|
215
214
|
llm=self.llm, memory=self.memory, simulator=self.simulator
|
216
215
|
)
|
@@ -231,7 +230,6 @@ class SocietyAgent(CitizenAgent):
|
|
231
230
|
# Main workflow
|
232
231
|
async def forward(self):
|
233
232
|
self.step_count += 1
|
234
|
-
logger.info(f"Agent {self._uuid} forward [step_count: {self.step_count}]")
|
235
233
|
# sync agent status with simulator
|
236
234
|
await self.update_with_sim()
|
237
235
|
|
@@ -105,6 +105,20 @@ class Simulator:
|
|
105
105
|
self.poi_id_2_aoi_id: dict[int, int] = {
|
106
106
|
poi["id"]: poi["aoi_id"] for _, poi in self.map.pois.items()
|
107
107
|
}
|
108
|
+
self._environment_prompt:dict[str, str] = {}
|
109
|
+
|
110
|
+
@property
|
111
|
+
def environment(self):
|
112
|
+
return self._environment_prompt
|
113
|
+
|
114
|
+
def set_environment(self, environment: dict[str, str]):
|
115
|
+
self._environment_prompt = environment
|
116
|
+
|
117
|
+
def sence(self, key: str):
|
118
|
+
return self._environment_prompt.get(key, "")
|
119
|
+
|
120
|
+
def update_environment(self, key: str, value: str):
|
121
|
+
self._environment_prompt[key] = value
|
108
122
|
|
109
123
|
# * Agent相关
|
110
124
|
def find_agents_by_area(self, req: dict, status=None):
|
@@ -47,6 +47,7 @@ class AgentGroup:
|
|
47
47
|
embedding_model: Embeddings,
|
48
48
|
logging_level: int,
|
49
49
|
agent_config_file: Optional[dict[type[Agent], str]] = None,
|
50
|
+
environment: Optional[dict[str, str]] = None,
|
50
51
|
):
|
51
52
|
logger.setLevel(logging_level)
|
52
53
|
self._uuid = str(uuid.uuid4())
|
@@ -116,7 +117,7 @@ class AgentGroup:
|
|
116
117
|
logger.info(f"-----Creating Simulator in AgentGroup {self._uuid} ...")
|
117
118
|
self.simulator = Simulator(config["simulator_request"])
|
118
119
|
self.projector = pyproj.Proj(self.simulator.map.header["projection"])
|
119
|
-
|
120
|
+
self.simulator.set_environment(environment)
|
120
121
|
# prepare Economy client
|
121
122
|
logger.info(f"-----Creating Economy client in AgentGroup {self._uuid} ...")
|
122
123
|
self.economy_client = EconomyClient(
|
@@ -355,6 +356,9 @@ class AgentGroup:
|
|
355
356
|
agent = self.id2agent[target_agent_uuid]
|
356
357
|
await agent.status.update(target_key, content)
|
357
358
|
|
359
|
+
async def update_environment(self, key: str, value: str):
|
360
|
+
self.simulator.update_environment(key, value)
|
361
|
+
|
358
362
|
async def message_dispatch(self):
|
359
363
|
logger.debug(f"-----Starting message dispatch for group {self._uuid}")
|
360
364
|
while True:
|
@@ -226,6 +226,8 @@ class AgentSimulation:
|
|
226
226
|
- number_of_government: required, int
|
227
227
|
- number_of_bank: required, int
|
228
228
|
- number_of_nbs: required, int
|
229
|
+
- environment: Optional[dict[str, str]]
|
230
|
+
- default: {'weather': 'The weather is normal', 'crime': 'The crime rate is low', 'pollution': 'The pollution level is low', 'temperature': 'The temperature is normal'}
|
229
231
|
- workflow:
|
230
232
|
- list[Step]
|
231
233
|
- Step:
|
@@ -261,6 +263,16 @@ class AgentSimulation:
|
|
261
263
|
exp_name=config.get("exp_name", "default_experiment"),
|
262
264
|
logging_level=config.get("logging_level", logging.WARNING),
|
263
265
|
)
|
266
|
+
environment = config.get(
|
267
|
+
"environment",
|
268
|
+
{
|
269
|
+
"weather": "The weather is normal",
|
270
|
+
"crime": "The crime rate is low",
|
271
|
+
"pollution": "The pollution level is low",
|
272
|
+
"temperature": "The temperature is normal"
|
273
|
+
}
|
274
|
+
)
|
275
|
+
simulation._simulator.set_environment(environment)
|
264
276
|
logger.info("Initializing Agents...")
|
265
277
|
agent_count = []
|
266
278
|
agent_count.append(config["agent_config"]["number_of_citizen"])
|
@@ -283,7 +295,14 @@ class AgentSimulation:
|
|
283
295
|
}
|
284
296
|
_interceptor_blocks = [PointMessageBlock(**_kwargs)]
|
285
297
|
elif _mode == "edge":
|
286
|
-
_kwargs = {
|
298
|
+
_kwargs = {
|
299
|
+
k: v
|
300
|
+
for k, v in _intercept_config.items()
|
301
|
+
if k
|
302
|
+
in {
|
303
|
+
"max_violation_time",
|
304
|
+
}
|
305
|
+
}
|
287
306
|
_interceptor_blocks = [EdgeMessageBlock(**_kwargs)]
|
288
307
|
else:
|
289
308
|
raise ValueError(f"Unsupported interception mode `{_mode}!`")
|
@@ -301,6 +320,7 @@ class AgentSimulation:
|
|
301
320
|
),
|
302
321
|
memory_config_func=config["agent_config"].get("memory_config_func", None),
|
303
322
|
**_message_intercept_kwargs,
|
323
|
+
environment=environment,
|
304
324
|
)
|
305
325
|
logger.info("Running Init Functions...")
|
306
326
|
for init_func in config["agent_config"].get(
|
@@ -454,6 +474,7 @@ class AgentSimulation:
|
|
454
474
|
message_listener: Optional[MessageBlockListenerBase] = None,
|
455
475
|
embedding_model: Embeddings = SimpleEmbedding(),
|
456
476
|
memory_config_func: Optional[dict[type[Agent], Callable]] = None,
|
477
|
+
environment: Optional[dict[str, str]] = None,
|
457
478
|
) -> None:
|
458
479
|
"""初始化智能体
|
459
480
|
|
@@ -463,6 +484,7 @@ class AgentSimulation:
|
|
463
484
|
pg_sql_writers: 独立的PgSQL writer数量
|
464
485
|
message_interceptors: message拦截器数量
|
465
486
|
memory_config_func: 返回Memory配置的函数,需要返回(EXTRA_ATTRIBUTES, PROFILE, BASE)元组, 每个元素表示一个智能体类创建的Memory配置函数
|
487
|
+
environment: 环境变量,用于更新模拟器的环境变量
|
466
488
|
"""
|
467
489
|
if not isinstance(agent_count, list):
|
468
490
|
agent_count = [agent_count]
|
@@ -650,6 +672,7 @@ class AgentSimulation:
|
|
650
672
|
embedding_model,
|
651
673
|
self.logging_level,
|
652
674
|
config_file,
|
675
|
+
environment,
|
653
676
|
)
|
654
677
|
creation_tasks.append((group_name, group))
|
655
678
|
|
@@ -720,6 +743,11 @@ class AgentSimulation:
|
|
720
743
|
filtered_uuids.extend(await group.filter.remote(types))
|
721
744
|
return filtered_uuids
|
722
745
|
|
746
|
+
async def update_environment(self, key: str, value: str):
|
747
|
+
self._simulator.update_environment(key, value)
|
748
|
+
for group in self._groups.values():
|
749
|
+
await group.update_environment.remote(key, value)
|
750
|
+
|
723
751
|
async def update(self, target_agent_uuid: str, target_key: str, content: Any):
|
724
752
|
"""更新指定智能体的记忆"""
|
725
753
|
group = self._agent_uuid2group[target_agent_uuid]
|
@@ -795,9 +823,6 @@ class AgentSimulation:
|
|
795
823
|
try:
|
796
824
|
# check whether insert agents
|
797
825
|
simulator_day = await self._simulator.get_simulator_day()
|
798
|
-
print(
|
799
|
-
f"simulator_day: {simulator_day}, self._simulator_day: {self._simulator_day}"
|
800
|
-
)
|
801
826
|
need_insert_agents = False
|
802
827
|
if simulator_day > self._simulator_day:
|
803
828
|
need_insert_agents = True
|
@@ -810,6 +835,9 @@ class AgentSimulation:
|
|
810
835
|
await asyncio.gather(*insert_tasks)
|
811
836
|
|
812
837
|
# step
|
838
|
+
simulator_day = await self._simulator.get_simulator_day()
|
839
|
+
simulator_time = int(await self._simulator.get_time())
|
840
|
+
logger.info(f"Start simulation day {simulator_day} at {simulator_time}, step {self._total_steps}")
|
813
841
|
tasks = []
|
814
842
|
for group in self._groups.values():
|
815
843
|
tasks.append(group.step.remote())
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: pycityagent
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.0a65
|
4
4
|
Summary: LLM-based city environment agent building library
|
5
5
|
Author-email: Yuwei Yan <pinkgranite86@gmail.com>, Junbo Yan <yanjb20thu@gmali.com>, Jun Zhang <zhangjun990222@gmali.com>
|
6
6
|
License: MIT License
|
@@ -22,9 +22,9 @@ pycityagent/memory/utils.py,sha256=oJWLdPeJy_jcdKcDTo9JAH9kDZhqjoQhhv_zT9qWC0w,8
|
|
22
22
|
pycityagent/memory/const.py,sha256=6zpJPJXWoH9-yf4RARYYff586agCoud9BRn7sPERB1g,932
|
23
23
|
pycityagent/memory/faiss_query.py,sha256=V3rIw6d1_xcpNqZBbAYz3qfjVNE7NfJ7xOS5SibPtVU,13180
|
24
24
|
pycityagent/memory/state.py,sha256=TYItiyDtehMEQaSBN7PpNrnNxdDM5jGppr9R9Ufv3kA,5134
|
25
|
-
pycityagent/simulation/simulation.py,sha256=
|
25
|
+
pycityagent/simulation/simulation.py,sha256=smWCN3qt6i0C-mWd26WM5yVLsfUAYZIgNsHF0fhYAhM,36949
|
26
26
|
pycityagent/simulation/__init__.py,sha256=P5czbcg2d8S0nbbnsQXFIhwzO4CennAhZM8OmKvAeYw,194
|
27
|
-
pycityagent/simulation/agentgroup.py,sha256=
|
27
|
+
pycityagent/simulation/agentgroup.py,sha256=PBmIp6waJR40Gjki9tTXtKMFJ_c5s8SIsi98FHRg-34,31598
|
28
28
|
pycityagent/simulation/storage/pg.py,sha256=xRshSOGttW-p0re0fNBOjOpb-nQ5msIE2LsdT79_E_Y,8425
|
29
29
|
pycityagent/message/message_interceptor.py,sha256=w8XTyZStQtMjILpeAX3VMhAWcYAuaxCgSMwXQU1OryM,8951
|
30
30
|
pycityagent/message/__init__.py,sha256=f5QH7DKPqEAMyfSlBMnl3uouOKlsoel909STlIe7nUk,276
|
@@ -47,7 +47,7 @@ pycityagent/workflow/prompt.py,sha256=6jI0Rq54JLv3-IXqZLYug62vse10wTI83xvf4ZX42n
|
|
47
47
|
pycityagent/workflow/block.py,sha256=4QufS8XnyP6SYp8g1gDODW-H0nAHA7lvivrPGUq1p-w,9922
|
48
48
|
pycityagent/workflow/trigger.py,sha256=Df-MOBEDWBbM-v0dFLQLXteLsipymT4n8vqexmK2GiQ,5643
|
49
49
|
pycityagent/environment/__init__.py,sha256=MyZBwsweDIHOKSX2iSZs748foNtaiyEcyg6sc747T2g,263
|
50
|
-
pycityagent/environment/simulator.py,sha256=
|
50
|
+
pycityagent/environment/simulator.py,sha256=QMmxL7xT7zgdJDxINNb1Li1iZsLdqtH2rbqhJhZc14Y,12878
|
51
51
|
pycityagent/environment/message/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
52
52
|
pycityagent/environment/utils/port.py,sha256=3OM6kSUt3PxvDUOlgyiendBtETaWU8Mzk_8H0TzTmYg,295
|
53
53
|
pycityagent/environment/utils/grpc.py,sha256=6EJwKXXktIWb1NcUiJzIRmfrY0S03QAXXGcCDHqAT00,1998
|
@@ -75,31 +75,31 @@ pycityagent/environment/sim/clock_service.py,sha256=gBUujvX_vIFMKVfcLRyk1GcpRRL6
|
|
75
75
|
pycityagent/environment/sim/road_service.py,sha256=bKyn3_me0sGmaJVyF6eNeFbdU-9C1yWsa9L7pieDJzg,1285
|
76
76
|
pycityagent/environment/interact/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
77
77
|
pycityagent/environment/interact/interact.py,sha256=ifxPPzuHeqLHIZ_6zvfXMoBOnBsXNIP4bYp7OJ7pnEQ,6588
|
78
|
-
pycityagent/cityagent/memory_config.py,sha256=
|
78
|
+
pycityagent/cityagent/memory_config.py,sha256=8PqSeCdIgkp5a9KN2VdyaraMACu93d5W9TLzYTozmfo,10977
|
79
79
|
pycityagent/cityagent/bankagent.py,sha256=lr4GEcqt-iwA7DXoDry0WXkV6benmdaAyLpswqSpKlY,2120
|
80
80
|
pycityagent/cityagent/__init__.py,sha256=gcBQ-a50XegFtjigQ7xDXRBZrywBKqifiQFSRnEF8gM,572
|
81
81
|
pycityagent/cityagent/firmagent.py,sha256=UVlNN0lpa4cC4PZVqYzQhbc5VJ2oGsA1731mhbCjnR8,4109
|
82
82
|
pycityagent/cityagent/nbsagent.py,sha256=WIXW__6dZ5IrqBqDCjvGbrCshpXzuFRV3Ww6gkYw7p4,4387
|
83
|
-
pycityagent/cityagent/initial.py,sha256=
|
84
|
-
pycityagent/cityagent/societyagent.py,sha256=
|
85
|
-
pycityagent/cityagent/message_intercept.py,sha256=
|
83
|
+
pycityagent/cityagent/initial.py,sha256=BXU9ndY-yIASwoRvFosbhUptGukd68PM1h1vmTEaa34,4946
|
84
|
+
pycityagent/cityagent/societyagent.py,sha256=RwRS7XaPNFmlTCRJgIpTNkDCWQCG48lpf2SjnZvtcHQ,20288
|
85
|
+
pycityagent/cityagent/message_intercept.py,sha256=1YMOs6-6bbAaTt7RfMn-ALVIcp0frHN7oqGUkWRy5xE,4519
|
86
86
|
pycityagent/cityagent/governmentagent.py,sha256=HJLuhvEmllu_1KnFEJsYCIasaBJT0BV9Cn_4Y2QGPqg,2791
|
87
87
|
pycityagent/cityagent/blocks/dispatcher.py,sha256=mEa1r3tRS3KI1BMZR_w_sbUGzOj6aUJuiUrsHv1n2n0,2943
|
88
88
|
pycityagent/cityagent/blocks/needs_block.py,sha256=s8LikgtKORfo_Sw9SQ5_3biNPTof15QuUs4cDynXCyM,15332
|
89
|
-
pycityagent/cityagent/blocks/cognition_block.py,sha256=
|
89
|
+
pycityagent/cityagent/blocks/cognition_block.py,sha256=zDbyyLh5GEqje9INJUJA1gMSDPW0wX5lt6yNu97XXn0,14818
|
90
90
|
pycityagent/cityagent/blocks/social_block.py,sha256=y46mPK9SLvcOHYB64l6qz5ZgT0dWNmX-C3Cusj_44mE,15540
|
91
91
|
pycityagent/cityagent/blocks/__init__.py,sha256=wydR0s-cCRWgdvQetkfQnD_PU8vC3eTmt2zntcb4fSA,452
|
92
92
|
pycityagent/cityagent/blocks/economy_block.py,sha256=m5B67cgGZ9nKWtrYeak5gxMoCoKlRbATAsXpFajYKyg,19129
|
93
93
|
pycityagent/cityagent/blocks/utils.py,sha256=8O5p1B8JlreIJTGXKAP03rTcn7MvFSR8qJ1_hhszboU,2065
|
94
94
|
pycityagent/cityagent/blocks/other_block.py,sha256=NnDwxQAO5XZ7Uxe-n3qtrfNItHlwFYk2MQsh2GYDKMQ,4338
|
95
|
-
pycityagent/cityagent/blocks/plan_block.py,sha256=
|
96
|
-
pycityagent/cityagent/blocks/mobility_block.py,sha256=
|
95
|
+
pycityagent/cityagent/blocks/plan_block.py,sha256=v04ePs-6b86TyaP3fl9HPMwWh3_lHp4cjyoEQBHkoDU,11280
|
96
|
+
pycityagent/cityagent/blocks/mobility_block.py,sha256=f9PlHYX_sCpfOgIhxx3DSA9aViW_e-yNIFpVGwZixUI,12623
|
97
97
|
pycityagent/survey/models.py,sha256=YE50UUt5qJ0O_lIUsSY6XFCGUTkJVNu_L1gAhaCJ2fs,3546
|
98
98
|
pycityagent/survey/__init__.py,sha256=rxwou8U9KeFSP7rMzXtmtp2fVFZxK4Trzi-psx9LPIs,153
|
99
99
|
pycityagent/survey/manager.py,sha256=S5IkwTdelsdtZETChRcfCEczzwSrry_Fly9MY4s3rbk,1681
|
100
|
-
pycityagent-2.0.
|
101
|
-
pycityagent-2.0.
|
102
|
-
pycityagent-2.0.
|
103
|
-
pycityagent-2.0.
|
104
|
-
pycityagent-2.0.
|
105
|
-
pycityagent-2.0.
|
100
|
+
pycityagent-2.0.0a65.dist-info/RECORD,,
|
101
|
+
pycityagent-2.0.0a65.dist-info/LICENSE,sha256=n2HPXiupinpyHMnIkbCf3OTYd3KMqbmldu1e7av0CAU,1084
|
102
|
+
pycityagent-2.0.0a65.dist-info/WHEEL,sha256=md3JO_ifs5j508p3TDNMgtQVtnQblpGEt_Wo4W56l8Y,107
|
103
|
+
pycityagent-2.0.0a65.dist-info/entry_points.txt,sha256=BZcne49AAIFv-hawxGnPbblea7X3MtAtoPyDX8L4OC4,132
|
104
|
+
pycityagent-2.0.0a65.dist-info/top_level.txt,sha256=yOmeu6cSXmiUtScu53a3s0p7BGtLMaV0aff83EHCTic,43
|
105
|
+
pycityagent-2.0.0a65.dist-info/METADATA,sha256=4zdmqXA1BgOR40yYPnJ1ZC3S3A13TvDy6FChU3-Q9JI,9110
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|