Merge pull request #378 from SereneWalden/ga_game_cathy_dev

ga_game: Maze, MazeEnvironment, SpatialMemory
This commit is contained in:
better629 2023-10-01 08:44:25 +08:00 committed by GitHub
commit 979968afd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 1483 additions and 7 deletions

View file

416
examples/st_game/maze.py Normal file
View file

@ -0,0 +1,416 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Desc : maze environment
"""
Author: Joon Sung Park (joonspk@stanford.edu)
File: maze.py
Description: Defines the Maze class, which represents the map of the simulated
world in a 2-dimensional matrix.
"""
import json
import math
from pathlib import Path
import networkx as nx
from .utils.const import MAZE_ASSET_PATH
from .utils.utils import read_csv_to_list
class Maze:
def __init__(self, maze_asset_path: Path = MAZE_ASSET_PATH) -> None:
# READING IN THE BASIC META INFORMATION ABOUT THE MAP
self.maze_asset_path = maze_asset_path
maze_matrix_path = maze_asset_path.joinpath("matrix")
# Reading in the meta information about the world. If you want tp see the
# example variables, check out the maze_meta_info.json file.
meta_info = json.load(open(maze_matrix_path.joinpath("maze_meta_info.json")))
# <maze_width> and <maze_height> denote the number of tiles make up the
# height and width of the map.
self.maze_width = int(meta_info["maze_width"])
self.maze_height = int(meta_info["maze_height"])
# <sq_tile_size> denotes the pixel height/width of a tile.
self.sq_tile_size = int(meta_info["sq_tile_size"])
# <special_constraint> is a string description of any relevant special
# constraints the world might have.
# e.g., "planning to stay at home all day and never go out of her home"
self.special_constraint = meta_info["special_constraint"]
# READING IN SPECIAL BLOCKS
# Special blocks are those that are colored in the Tiled map.
# Here is an example row for the arena block file:
# e.g., "25335, Double Studio, Studio, Common Room"
# And here is another example row for the game object block file:
# e.g, "25331, Double Studio, Studio, Bedroom 2, Painting"
# Notice that the first element here is the color marker digit from the
# Tiled export. Then we basically have the block path:
# World, Sector, Arena, Game Object -- again, these paths need to be
# unique within an instance of Reverie.
blocks_folder = maze_matrix_path.joinpath("special_blocks")
_wb = blocks_folder.joinpath("world_blocks.csv")
wb_rows = read_csv_to_list(_wb, header=False)
wb = wb_rows[0][-1]
_sb = blocks_folder.joinpath("sector_blocks.csv")
sb_rows = read_csv_to_list(_sb, header=False)
sb_dict = dict()
for i in sb_rows: sb_dict[i[0]] = i[-1]
_ab = blocks_folder.joinpath("arena_blocks.csv")
ab_rows = read_csv_to_list(_ab, header=False)
ab_dict = dict()
for i in ab_rows: ab_dict[i[0]] = i[-1]
_gob = blocks_folder.joinpath("game_object_blocks.csv")
gob_rows = read_csv_to_list(_gob, header=False)
gob_dict = dict()
for i in gob_rows: gob_dict[i[0]] = i[-1]
_slb = blocks_folder.joinpath("spawning_location_blocks.csv")
slb_rows = read_csv_to_list(_slb, header=False)
slb_dict = dict()
for i in slb_rows: slb_dict[i[0]] = i[-1]
# [SECTION 3] Reading in the matrices
# This is your typical two dimensional matrices. It's made up of 0s and
# the number that represents the color block from the blocks folder.
maze_folder = maze_matrix_path.joinpath("maze")
_cm = maze_folder.joinpath("collision_maze.csv")
collision_maze_raw = read_csv_to_list(_cm, header=False)[0]
_sm = maze_folder.joinpath("sector_maze.csv")
sector_maze_raw = read_csv_to_list(_sm, header=False)[0]
_am = maze_folder.joinpath("arena_maze.csv")
arena_maze_raw = read_csv_to_list(_am, header=False)[0]
_gom = maze_folder.joinpath("game_object_maze.csv")
game_object_maze_raw = read_csv_to_list(_gom, header=False)[0]
_slm = maze_folder.joinpath("spawning_location_maze.csv")
spawning_location_maze_raw = read_csv_to_list(_slm, header=False)[0]
# Loading the maze. The mazes are taken directly from the json exports of
# Tiled maps. They should be in csv format.
# Importantly, they are "not" in a 2-d matrix format -- they are single
# row matrices with the length of width x height of the maze. So we need
# to convert here.
# We can do this all at once since the dimension of all these matrices are
# identical (e.g., 70 x 40).
# example format: [['0', '0', ... '25309', '0',...], ['0',...]...]
# 25309 is the collision bar number right now.
self.collision_maze = []
sector_maze = []
arena_maze = []
game_object_maze = []
spawning_location_maze = []
for i in range(0, len(collision_maze_raw), meta_info["maze_width"]):
tw = meta_info["maze_width"]
self.collision_maze += [collision_maze_raw[i:i+tw]]
sector_maze += [sector_maze_raw[i:i+tw]]
arena_maze += [arena_maze_raw[i:i+tw]]
game_object_maze += [game_object_maze_raw[i:i+tw]]
spawning_location_maze += [spawning_location_maze_raw[i:i+tw]]
# Once we are done loading in the maze, we now set up self.tiles. This is
# a matrix accessed by row:col where each access point is a dictionary
# that contains all the things that are taking place in that tile.
# More specifically, it contains information about its "world," "sector,"
# "arena," "game_object," "spawning_location," as well as whether it is a
# collision block, and a set of all events taking place in it.
# e.g., self.tiles[32][59] = {'world': 'double studio',
# 'sector': '', 'arena': '', 'game_object': '',
# 'spawning_location': '', 'collision': False, 'events': set()}
# e.g., self.tiles[9][58] = {'world': 'double studio',
# 'sector': 'double studio', 'arena': 'bedroom 2',
# 'game_object': 'bed', 'spawning_location': 'bedroom-2-a',
# 'collision': False,
# 'events': {('double studio:double studio:bedroom 2:bed',
# None, None)}}
self.tiles = []
for i in range(self.maze_height):
row = []
for j in range(self.maze_width):
tile_details = dict()
tile_details["world"] = wb
tile_details["sector"] = ""
if sector_maze[i][j] in sb_dict:
tile_details["sector"] = sb_dict[sector_maze[i][j]]
tile_details["arena"] = ""
if arena_maze[i][j] in ab_dict:
tile_details["arena"] = ab_dict[arena_maze[i][j]]
tile_details["game_object"] = ""
if game_object_maze[i][j] in gob_dict:
tile_details["game_object"] = gob_dict[game_object_maze[i][j]]
tile_details["spawning_location"] = ""
if spawning_location_maze[i][j] in slb_dict:
tile_details["spawning_location"] = slb_dict[spawning_location_maze[i][j]]
tile_details["collision"] = False
if self.collision_maze[i][j] != "0":
tile_details["collision"] = True
tile_details["events"] = set()
row += [tile_details]
self.tiles += [row]
# Each game object occupies an event in the tile. We are setting up the
# default event value here.
for i in range(self.maze_height):
for j in range(self.maze_width):
if self.tiles[i][j]["game_object"]:
object_name = ":".join([self.tiles[i][j]["world"],
self.tiles[i][j]["sector"],
self.tiles[i][j]["arena"],
self.tiles[i][j]["game_object"]])
go_event = (object_name, None, None, None)
self.tiles[i][j]["events"].add(go_event)
# Reverse tile access.
# <self.address_tiles> -- given a string address, we return a set of all
# tile coordinates belonging to that address (this is opposite of
# self.tiles that give you the string address given a coordinate). This is
# an optimization component for finding paths for the personas' movement.
# self.address_tiles['<spawn_loc>bedroom-2-a'] == {(58, 9)}
# self.address_tiles['double studio:recreation:pool table']
# == {(29, 14), (31, 11), (30, 14), (32, 11), ...},
self.address_tiles = dict()
for i in range(self.maze_height):
for j in range(self.maze_width):
addresses = []
if self.tiles[i][j]["sector"]:
add = f'{self.tiles[i][j]["world"]}:'
add += f'{self.tiles[i][j]["sector"]}'
addresses += [add]
if self.tiles[i][j]["arena"]:
add = f'{self.tiles[i][j]["world"]}:'
add += f'{self.tiles[i][j]["sector"]}:'
add += f'{self.tiles[i][j]["arena"]}'
addresses += [add]
if self.tiles[i][j]["game_object"]:
add = f'{self.tiles[i][j]["world"]}:'
add += f'{self.tiles[i][j]["sector"]}:'
add += f'{self.tiles[i][j]["arena"]}:'
add += f'{self.tiles[i][j]["game_object"]}'
addresses += [add]
if self.tiles[i][j]["spawning_location"]:
add = f'<spawn_loc>{self.tiles[i][j]["spawning_location"]}'
addresses += [add]
for add in addresses:
if add in self.address_tiles:
self.address_tiles[add].add((j, i))
else:
self.address_tiles[add] = set([(j, i)])
# Build an nx.Graph.
grid_graph = nx.grid_2d_graph(m=self.maze_width, n=self.maze_height)
for i in range(self.maze_height):
for j in range(self.maze_width):
if self.collision_maze[i][j]!=0:
grid_graph.remove_node((i,j))
self.nx_graph = grid_graph
def turn_coordinate_to_tile(self, px_coordinate: tuple[int, int]) -> tuple[int, int]:
"""
Turns a pixel coordinate to a tile coordinate.
INPUT
px_coordinate: The pixel coordinate of our interest. Comes in the x, y
format.
OUTPUT
tile coordinate (x, y): The tile coordinate that corresponds to the
pixel coordinate.
EXAMPLE OUTPUT
Given (1600, 384), outputs (50, 12)
"""
x = math.ceil(px_coordinate[0]/self.sq_tile_size)
y = math.ceil(px_coordinate[1]/self.sq_tile_size)
return (x, y)
def access_tile(self, tile: tuple[int, int]) -> dict:
"""
Returns the tiles details dictionary that is stored in self.tiles of the
designated x, y location.
INPUT
tile: The tile coordinate of our interest in (x, y) form.
OUTPUT
The tile detail dictionary for the designated tile.
EXAMPLE OUTPUT
Given (58, 9),
self.tiles[9][58] = {'world': 'double studio',
'sector': 'double studio', 'arena': 'bedroom 2',
'game_object': 'bed', 'spawning_location': 'bedroom-2-a',
'collision': False,
'events': {('double studio:double studio:bedroom 2:bed',
None, None)}}
"""
x = tile[0]
y = tile[1]
return self.tiles[y][x]
def get_tile_path(self, tile: tuple[int, int], level: str) -> str:
"""
Get the tile string address given its coordinate. You designate the level
by giving it a string level description.
INPUT:
tile: The tile coordinate of our interest in (x, y) form.
level: world, sector, arena, or game object
OUTPUT
The string address for the tile.
EXAMPLE OUTPUT
Given tile=(58, 9), and level=arena,
"double studio:double studio:bedroom 2"
"""
x = tile[0]
y = tile[1]
tile = self.tiles[y][x]
path = f"{tile['world']}"
if level == "world":
return path
else:
path += f":{tile['sector']}"
if level == "sector":
return path
else:
path += f":{tile['arena']}"
if level == "arena":
return path
else:
path += f":{tile['game_object']}"
return path
def get_nearby_tiles(self, tile: tuple[int, int], vision_r: int) -> list[tuple[int, int]]:
"""
Given the current tile and vision_r, return a list of tiles that are
within the radius. Note that this implementation looks at a square
boundary when determining what is within the radius.
i.e., for vision_r, returns x's.
x x x x x
x x x x x
x x P x x
x x x x x
x x x x x
INPUT:
tile: The tile coordinate of our interest in (x, y) form.
vision_r: The radius of the persona's vision.
OUTPUT:
nearby_tiles: a list of tiles that are within the radius.
"""
left_end = 0
if tile[0] - vision_r > left_end:
left_end = tile[0] - vision_r
right_end = self.maze_width - 1
if tile[0] + vision_r + 1 < right_end:
right_end = tile[0] + vision_r + 1
bottom_end = self.maze_height - 1
if tile[1] + vision_r + 1 < bottom_end:
bottom_end = tile[1] + vision_r + 1
top_end = 0
if tile[1] - vision_r > top_end:
top_end = tile[1] - vision_r
nearby_tiles = []
for i in range(left_end, right_end):
for j in range(top_end, bottom_end):
nearby_tiles += [(i, j)]
return nearby_tiles
def add_event_from_tile(self, curr_event: tuple[str], tile: tuple[int, int]) -> None:
"""
Add an event triple to a tile.
INPUT:
curr_event: Current event triple.
e.g., ('double studio:double studio:bedroom 2:bed', None,
None)
tile: The tile coordinate of our interest in (x, y) form.
OUPUT:
None
"""
self.tiles[tile[1]][tile[0]]["events"].add(curr_event)
def remove_event_from_tile(self, curr_event: tuple[str], tile: tuple[int, int]) -> None:
"""dswaq
Remove an event triple from a tile.
INPUT:
curr_event: Current event triple.
e.g., ('double studio:double studio:bedroom 2:bed', None,
None)
tile: The tile coordinate of our interest in (x, y) form.
OUPUT:
None
"""
curr_tile_ev_cp = self.tiles[tile[1]][tile[0]]["events"].copy()
for event in curr_tile_ev_cp:
if event == curr_event:
self.tiles[tile[1]][tile[0]]["events"].remove(event)
def turn_event_from_tile_idle(self, curr_event: tuple[str], tile: tuple[int, int]) -> None:
curr_tile_ev_cp = self.tiles[tile[1]][tile[0]]["events"].copy()
for event in curr_tile_ev_cp:
if event == curr_event:
self.tiles[tile[1]][tile[0]]["events"].remove(event)
new_event = (event[0], None, None, None)
self.tiles[tile[1]][tile[0]]["events"].add(new_event)
def remove_subject_events_from_tile(self, subject: str, tile: tuple[int, int]) -> None:
"""
Remove an event triple that has the input subject from a tile.
INPUT:
subject: "Isabella Rodriguez"
tile: The tile coordinate of our interest in (x, y) form.
OUPUT:
None
"""
curr_tile_ev_cp = self.tiles[tile[1]][tile[0]]["events"].copy()
for event in curr_tile_ev_cp:
if event[0] == subject:
self.tiles[tile[1]][tile[0]]["events"].remove(event)
def _find_closest_node(self, coords: tuple[int, int]) -> tuple[int, int]:
target_coords = self.nx_graph.nodes
min_dist = None
closest_coordinate = None
for target in target_coords:
dist = math.dist(coords, target)
if not closest_coordinate:
min_dist = dist
closest_coordinate = target
else:
if min_dist > dist:
min_dist = dist
closest_coordinate = target
return closest_coordinate
def find_path(self, start: tuple[int, int], end: tuple[int, int]) -> list[tuple[int, int]]:
if start not in self.nx_graph.nodes:
start = self._find_closest_node(start)
if end not in self.nx_graph.nodes:
end = self._find_closest_node(end)
return nx.shortest_path(self.nx_graph, start, end)

View file

@ -3,8 +3,12 @@
# @Desc : maze environment
from metagpt.environment import Environment
from .maze import Maze
class MazeEnvironment(Environment):
def __init__(self, name: str, maze: Maze) -> None:
self.name = name
self.maze = maze
pass

View file

View file

@ -46,6 +46,9 @@ class BasicMemory(Message):
self.keywords: list = keywords # keywords
self.filling: list = filling # 装的与之相关联的memory_id的列表
def summary(self):
return (self.subject, self.predicate, self.object)
def save_to_dict(self) -> dict:
"""
将MemoryBasic类转化为字典用于存储json文件
@ -316,3 +319,10 @@ class AgentMemory(Memory):
self.embeddings[embedding_pair[0]] = embedding_pair[1]
return memory_node
def get_summarized_latest_events(self, retention):
ret_set = set()
for e_node in self.event_list[:retention]:
ret_set.add(e_node.summary())
return ret_set

View file

@ -0,0 +1,132 @@
"""
Author: Joon Sung Park (joonspk@stanford.edu)
File: spatial_memory.py
Description: Defines the MemoryTree class that serves as the agents' spatial
memory that aids in grounding their behavior in the game world.
"""
import json
import os
class MemoryTree:
def __init__(self, f_saved: str) -> None:
self.tree = {}
if os.path.isfile(f_saved) and os.path.exists(f_saved):
with open(f_saved) as f:
self.tree = json.load(f)
def print_tree(self) -> None:
def _print_tree(tree, depth):
dash = " >" * depth
if type(tree) == type(list()):
if tree:
print (dash, tree)
return
for key, val in tree.items():
if key:
print (dash, key)
_print_tree(val, depth+1)
_print_tree(self.tree, 0)
def save(self, out_json: str) -> None:
with open(out_json, "w") as outfile:
json.dump(self.tree, outfile)
def get_str_accessible_sectors(self, curr_world: str) -> str:
"""
Returns a summary string of all the arenas that the persona can access
within the current sector.
Note that there are places a given persona cannot enter. This information
is provided in the persona sheet. We account for this in this function.
INPUT
None
OUTPUT
A summary string of all the arenas that the persona can access.
EXAMPLE STR OUTPUT
"bedroom, kitchen, dining room, office, bathroom"
"""
x = ", ".join(list(self.tree[curr_world].keys()))
return x
def get_str_accessible_sector_arenas(self, sector: str) -> str:
"""
Returns a summary string of all the arenas that the persona can access
within the current sector.
Note that there are places a given persona cannot enter. This information
is provided in the persona sheet. We account for this in this function.
INPUT
None
OUTPUT
A summary string of all the arenas that the persona can access.
EXAMPLE STR OUTPUT
"bedroom, kitchen, dining room, office, bathroom"
"""
curr_world, curr_sector = sector.split(":")
if not curr_sector:
return ""
x = ", ".join(list(self.tree[curr_world][curr_sector].keys()))
return x
def get_str_accessible_arena_game_objects(self, arena: str) -> str:
"""
Get a str list of all accessible game objects that are in the arena. If
temp_address is specified, we return the objects that are available in
that arena, and if not, we return the objects that are in the arena our
persona is currently in.
INPUT
temp_address: optional arena address
OUTPUT
str list of all accessible game objects in the gmae arena.
EXAMPLE STR OUTPUT
"phone, charger, bed, nightstand"
"""
curr_world, curr_sector, curr_arena = arena.split(":")
if not curr_arena:
return ""
try:
x = ", ".join(list(self.tree[curr_world][curr_sector][curr_arena]))
except:
x = ", ".join(list(self.tree[curr_world][curr_sector][curr_arena.lower()]))
return x
def add_tile_info(self, tile_info: dict) -> None:
if tile_info["world"]:
if (tile_info["world"] not in self.tree):
self.tree[tile_info["world"]] = {}
if tile_info["sector"]:
if (tile_info["sector"] not in self.tree[tile_info["world"]]):
self.tree[tile_info["world"]][tile_info["sector"]] = {}
if tile_info["arena"]:
if (tile_info["arena"] not in self.tree[tile_info["world"]]
[tile_info["sector"]]):
self.tree[tile_info["world"]][tile_info["sector"]][tile_info["arena"]] = []
if tile_info["game_object"]:
if (tile_info["game_object"] not in self.tree[tile_info["world"]]
[tile_info["sector"]]
[tile_info["arena"]]):
self.tree[tile_info["world"]][tile_info["sector"]][tile_info["arena"]] += [
tile_info["game_object"]]

View file

@ -0,0 +1,15 @@
poignancy_event_v1.txt
!<INPUT 1>!: agent name
!<INPUT 1>!: iss
!<INPUT 2>!: name
!<INPUT 3>!: event description
<commentblockmarker>###</commentblockmarker>
Here is a brief description of !<INPUT 0>!.
!<INPUT 1>!
On the scale of 1 to 10, where 1 is purely mundane (e.g., brushing teeth, making bed) and 10 is extremely poignant (e.g., a break up, college acceptance), rate the likely poignancy of the following event for !<INPUT 2>!.
Event: !<INPUT 3>!
Rate (return a number between 1 to 10):

View file

@ -0,0 +1,15 @@
poignancy_thought_v1.txt
!<INPUT 1>!: agent name
!<INPUT 1>!: iss
!<INPUT 2>!: name
!<INPUT 3>!: event description
<commentblockmarker>###</commentblockmarker>
Here is a brief description of !<INPUT 0>!.
!<INPUT 1>!
On the scale of 1 to 10, where 1 is purely mundane (e.g., I need to do the dishes, I need to walk the dog) and 10 is extremely significant (e.g., I wish to become a professor, I love Elie), rate the likely significance of the following thought for !<INPUT 2>!.
Thought: !<INPUT 3>!
Rate (return a number between 1 to 10):

View file

@ -19,6 +19,30 @@ def get_poignancy_action(scratch: Scratch, content: BasicMemory.content) -> str:
content]
return prompt_input
# 1. Prompt构建
# 2. Instruction给出
prompt_template = "poignancy_action_v1.txt" # 保留原来的注释
prompt_input = create_prompt_input(scratch, content) # 保留原来的注释
prompt = prompt_generate(prompt_input, prompt_template)
special_instruction = "The output should ONLY contain ONE integer value on the scale of 1 to 10."
poignancy = special_response_generate(prompt, special_instruction)
try:
poi_dict = json.loads(poignancy)
return str(poi_dict['poignancy']) # 将返回值强制转换为字符串
except json.JSONDecodeError as e:
return poignancy
def get_poignancy_chat(scratch: Scratch, content: BasicMemory.content) -> str:
"""
衡量会话心酸度
"""
def create_prompt_input(scratch, content):
prompt_input = [scratch.name,
scratch.iss,
scratch.name,
content]
return prompt_input
# 1. Prompt构建
# 2. Instruction给出
prompt_template = "poignancy_chat_v1.txt" # 保留原来的注释

View file

@ -10,25 +10,29 @@ Do the steps following:
- reflect, do the High-level thinking based on memories and re-add into the memory
- execute, move or else in the Maze
"""
import math
from pydantic import Field
from pathlib import Path
from operator import itemgetter
from metagpt.roles.role import Role, RoleContext
from metagpt.schema import Message
from ..memory.agent_memory import AgentMemory
from ..memory.agent_memory import AgentMemory, BasicMemory
from ..memory.spatial_memory import MemoryTree
from ..actions.dummy_action import DummyAction
from ..actions.user_requirement import UserRequirement
from ..maze_environment import MazeEnvironment
from ..memory.retrieve import agent_retrieve
from ..memory.scratch import Scratch
from ..utils.utils import get_embedding, generate_poig_score
class STRoleContext(RoleContext):
env: 'MazeEnvironment' = Field(default=None)
memory: AgentMemory = Field(default=AgentMemory)
scratch: Scratch = Field(default=Scratch)
spatial_memory: MemoryTree = Field(default=MemoryTree)
class STRole(Role):
@ -64,16 +68,152 @@ class STRole(Role):
"""
pass
async def observe(self):
async def observe(self) -> list[BasicMemory]:
# TODO observe info from maze_env
pass
"""
Perceive events around the role and saves it to the memory, both events
and spaces.
We first perceive the events nearby the role, as determined by its
<vision_r>. If there are a lot of events happening within that radius, we
take the <att_bandwidth> of the closest events. Finally, we check whether
any of them are new, as determined by <retention>. If they are new, then we
save those and return the <BasicMemory> instances for those events.
OUTPUT:
ret_events: a list of <BasicMemory> that are perceived and new.
"""
maze = self._rc.env.maze
# PERCEIVE SPACE
# We get the nearby tiles given our current tile and the persona's vision
# radius.
nearby_tiles = maze.get_nearby_tiles(self._rc.scratch.curr_tile,
self._rc.scratch.vision_r)
# We then store the perceived space. Note that the s_mem of the persona is
# in the form of a tree constructed using dictionaries.
for tile in nearby_tiles:
tile_info = maze.access_tile(tile)
self._rc.spatial_memory.add_tile_info(tile_info)
# PERCEIVE EVENTS.
# We will perceive events that take place in the same arena as the
# persona's current arena.
curr_arena_path = maze.get_tile_path(self._rc.scratch.curr_tile, "arena")
# We do not perceive the same event twice (this can happen if an object is
# extended across multiple tiles).
percept_events_set = set()
# We will order our percept based on the distance, with the closest ones
# getting priorities.
percept_events_list = []
# First, we put all events that are occuring in the nearby tiles into the
# percept_events_list
for tile in nearby_tiles:
tile_details = maze.access_tile(tile)
if tile_details["events"]:
if maze.get_tile_path(tile, "arena") == curr_arena_path:
# This calculates the distance between the persona's current tile,
# and the target tile.
dist = math.dist([tile[0], tile[1]],
[self._rc.scratch.curr_tile[0],
self._rc.scratch.curr_tile[1]])
# Add any relevant events to our temp set/list with the distant info.
for event in tile_details["events"]:
if event not in percept_events_set:
percept_events_list += [[dist, event]]
percept_events_set.add(event)
# We sort, and perceive only self._rc.scratch.att_bandwidth of the closest
# events. If the bandwidth is larger, then it means the persona can perceive
# more elements within a small area.
percept_events_list = sorted(percept_events_list, key=itemgetter(0))
perceived_events = []
for dist, event in percept_events_list[:self._rc.scratch.att_bandwidth]:
perceived_events += [event]
# Storing events.
# <ret_events> is a list of <BasicMemory> instances from the persona's
# associative memory.
ret_events = []
for p_event in perceived_events:
s, p, o, desc = p_event
if not p:
# If the object is not present, then we default the event to "idle".
p = "is"
o = "idle"
desc = "idle"
desc = f"{s.split(':')[-1]} is {desc}"
p_event = (s, p, o)
# We retrieve the latest self._rc.scratch.retention events. If there is
# something new that is happening (that is, p_event not in latest_events),
# then we add that event to the a_mem and return it.
latest_events = self._rc.memory.get_summarized_latest_events(
self._rc.scratch.retention)
if p_event not in latest_events:
# We start by managing keywords.
keywords = set()
sub = p_event[0]
obj = p_event[2]
if ":" in p_event[0]:
sub = p_event[0].split(":")[-1]
if ":" in p_event[2]:
obj = p_event[2].split(":")[-1]
keywords.update([sub, obj])
# Get event embedding
desc_embedding_in = desc
if "(" in desc:
desc_embedding_in = (desc_embedding_in.split("(")[1]
.split(")")[0]
.strip())
if desc_embedding_in in self._rc.memory.embeddings:
event_embedding = self._rc.memory.embeddings[desc_embedding_in]
else:
event_embedding = get_embedding(desc_embedding_in)
event_embedding_pair = (desc_embedding_in, event_embedding)
# Get event poignancy.
event_poignancy = generate_poig_score(self,
"action",
desc_embedding_in)
# If we observe the persona's self chat, we include that in the memory
# of the persona here.
chat_node_ids = []
if p_event[0] == f"{self.name}" and p_event[1] == "chat with":
curr_event = self._rc.scratch.act_event
if self._rc.scratch.act_description in self._rc.memory.embeddings:
chat_embedding = self._rc.memory.embeddings[
self._rc.scratch.act_description]
else:
chat_embedding = get_embedding(self._rc.scratch
.act_description)
chat_embedding_pair = (self._rc.scratch.act_description,
chat_embedding)
chat_poignancy = generate_poig_score(self._rc.scratch, "chat",
self._rc.scratch.act_description)
chat_node = self._rc.memory.add_chat(self._rc.scratch.curr_time, None,
curr_event[0], curr_event[1], curr_event[2],
self._rc.scratch.act_description, keywords,
chat_poignancy, chat_embedding_pair,
self._rc.scratch.chat)
chat_node_ids = [chat_node.node_id]
# Finally, we add the current event to the agent's memory.
ret_events += [self._rc.memory.add_event(self._rc.scratch.curr_time, None,
s, p, o, desc, keywords, event_poignancy,
event_embedding_pair, chat_node_ids)]
self._rc.scratch.importance_trigger_curr -= event_poignancy
self._rc.scratch.importance_ele_n += 1
return ret_events
async def retrieve(self, query, n = 30 ,topk = 4):
# TODO retrieve memories from agent_memory
retrieve_memories = agent_retrieve(self._rc.memory, self._rc.scratch.curr_time, self._rc.scratch.recency_decay, query, n, topk)
return retrieve_memories
async def plan(self):
# TODO make a plan

View file

@ -0,0 +1,26 @@
Name,Whisper
Latoya Williams,"Rajiv Patel is your housemate whom you've known for about a year; You and Rajiv Patel sometimes talk about politics and local elections; Abigail Chan is your housemate whom you've known for about a year; Francisco Lopez is your housemate whom you've known for about a year; Haily Johnson is your housemate whom you've known for about a year but you don't really find her too comfortable; In terms of your daily plans, you sometimes spend time at The Rose and Crown Pub when it's late; You have known the bartender at The Rose and Crown Pub, Arthur Burton for about half a year; You like to talk about politics and local elections"
Rajiv Patel,"Latoya Williams is your housemate whom you've known for about a year; You and Latoya Williams sometimes talk about politics and local elections; Abigail Chan is your housemate whom you've known for about a year and you think she is kind of cute; Francisco Lopez is your housemate whom you've known for about a year; Haily Johnson is your housemate whom you've known for about a year but you don't really find her too comfortable; You sometimes try to spend time at Hobbs Cafe but you haven't really talked to anyone there yet; In terms of your daily plans, you sometimes spend time at The Rose and Crown Pub when it's late and you have known the bartender, Arthur Burton for about a year; You like to talk about politics and local elections"
Abigail Chen,You think you are kind of cute; You and Latoya Williams are housemates and have known each other for about a year; You and Rajiv Patel are housemates and have known each other for about a year and you two are somewhat close; You and Francisco Lopez are housemates and have known each other for about a year; You and Hailey Johnson are housemates and have known each other for about a year
Francisco Lopez,"You and Latoya Williams are housemates and have known each other for about a year; You and Rajiv Patel are housemates and have known each other for about a year; You and Abigail Chen are housemates and have known each other for about a year; You and Hailey Johnson are housemates and have known each other for about a year but you don't really like her too much; You have a secret crush on Abigail Chen but so far, you haven't had the courage to ask her out; You think Abigail Chen is cute; You frequent Hobbs Cafe"
Hailey Johnson,"You want to be acknowledged by everyone; You've known Isabella Rodriguez for about a year and you talk to her often about the piece you are currently writing; Latoya Williams is your housemate whom you've known for about a year and you think she is somewhat cute; Rajiv Patel is your housemate whom you've known for about a year, but you don't know much about him; Abigail Chen is a housemate whom you've known for about a year, but you haven't really talked to her yet; Francisco Lopez is your housemate and you two have known each other for quite awhile because you are from the same town; You are interested in meeting someone; You are interested in romantically dating someone; You are not seeing anyone right now "
Arthur Burton,"You are generally nice to all your customers and listen to their story; You and Isabella Rodriguez are friends; You've known Isabella Rodriguez for a few years since she runs Hobbs Cafe right next to your bar; You know Latoya Williams as a customer at your bar, The Rose and Crown Pub; You know Rajiv Patel as a customer at your bar, The Rose and Crown Pub; You know Ryan Park as a customer at your bar, The Rose and Crown Pub; You know Carlos Gomez as a customer at your bar, The Rose and Crown Pub; You know Adam Smith as a customer at your bar, The Rose and Crown Pub; You know Yuriko Yamamoto as a customer at your bar, The Rose and Crown Pub; You know Jennifer Moore as a customer at your bar, The Rose and Crown Pub; You know Sam Moore as a customer at your bar, The Rose and Crown Pub; You know Carmen Ortiz as a customer at your bar, The Rose and Crown Pub; You know Tom Moreno as a customer at your bar, The Rose and Crown Pub; You don't like it when people fight at your bar"
Ryan Park,"You frequent Hobbs Cafe to work and think and eat; You've known Isabella Rodriguez for about a year; You know Isabella Rodriguez works at Hobbs Cafe; You frequent The Rose and Crown Pub to eat dinner; You've known the bartender at The Rose and Crown Pub, Arthur Burton, for about a year; You've known Giorgio Rossi, your next door neighbor, for about a year; You've known Carlos Gomez, your neighbor, for about a year; You wonder why Giorgio Rossi and Carlos Gomez are always fighting; You want no part in Giorgio Rossi and Carlos Gomez's fight"
Isabella Rodriguez,"You are excited to be planning a Valentine's Day party at *Hobbs Cafe on February 14th from 5pm* and you are eager to tell everyone to come to the party; You and Maria Lopez have known each other for about a year ever since Maria Lopez visited Hobbs Cafe and are good friends; Maria Lopez is a loyal friend to you and a frequent customer at Hobbs Cafe; You see Tamara Taylor as a frequent customer at your cafe, Hobbs Cafe; You and Tamara Taylor have known each other for a few months; You and Carlos Gomez have known each other for about 4 years; You know that Carlos Gomez is a good poet and you like his poem; You see Ryan Park frequently when he visits your cafe, Hobbs Cafe; You often see Ryan Park working hard on his laptop and you think he is dedicated in his work, which you find to be cool; Hailey Johnson is a frequent customer at your cafe, Hobbs Cafe; You find Haily Johnson to be a little uncomfortable because she is too pushy; You know Giorgio Rossi as a customer at your Hobbs Cafe; You know Wolfgang Schulz as a customer at Hobbs Cafe; You know Carmen Ortiz as a customer at Hobbs Cafe; You and Arthur Burton are friends; You've known Arthur Burton for a few years since he runs a bar right next door"
Giorgio Rossi,"You do not like Carlos Gomez; You think Carlos Gomez is annoying; You think Carlos Gomez is pushy; You think Carlos Gomez is a coward; You've known Carlos Gomez, your next door neighbor, for about two years; You think Carlos Gomez is really loud and you have filed complaints against him before; For planning, you frequent Hobbs Cafe to hang out and write and think; you are friends with Isabella Rodriguez who works at Hobbs Cafe; You think Isabella Rodriguez is kind-hearted; You and Ryan Park sometimes talk about random things; You've known Ryan Park for about a year living as his neighbor; You would rather not see Carlos Gomez ever"
Carlos Gomez,"You do not like Giorgio Rossi; You think Giorgio Rossi is annoying; You think Giorgio Rossi is a coward; You've known Giorgio Rossi, your next door neighbor, for about two years; For planning, you frequent The Rose and Crown Pub at night to eat and drink; you are friends with Arthur Burton who is a bartender at the pub; You've known Ryan Park for about a year living as his neighbor; You would rather not see Giorgio Rossi ever; You want Ryan Park to take your side in his fight against Giorgio Rossi"
Klaus Mueller,"This is very important -- you have a crush on Maria Lopez; You and Maria Lopez have known each other for over 2 years now; You and Maria Lopez are close friends and classmates; You are close with Ayesha Khan, who is a classmate in one of your classes and a dormmate; You and Maria Lopez are dormmates; You and Eddy Lin are classmates; You know Mei Lin is a professor at your college; You and Wolfgang Schulz are classmates and dormmates"
Maria Lopez,"This is very important -- you have a secret crush on Klaus Mueller; You and Klaus Mueller have known each other for over 2 years now; You and Klaus Mueller are close friends and classmates; For planning, you frequent Hobbs Cafe for studying; You are close with Ayesha Khan, who is a classmate in one of your classes and a dormmate; You and Eddy Lin are classmates; You know Mei Lin is a professor at your college; You and Wolfgang Schulz are classmates and dormmates"
Ayesha Khan,"You are close with Wolfgang Schulz, who is a classmate in one of your classes and a dormmate; You and Maria Lopez are dormmates; You and Klaus Mueller are dormmates; You and Eddy Lin are classmates; You know Mei Lin is a professor at your college"
Wolfgang Schulz,"For planning, you frequent Hobbs Cafe for studying; You are close with Ayesha Khan, who is a classmate in one of your classes and a dormmate; You and Maria Lopez are dormmates; You and Klaus Mueller are dormmates; You and Eddy Lin are classmates and you two sometimes talk about your favorite music; You know Mei Lin is a professor at your college; You've met Isabella Rodriguez who works at the cafe but have not really talked to her"
Mei Lin,"You are a professor who loves teaching; You've known your neighbor, Yuriko Yamamoto, since the time she helped you with some legal matters; You've known your next door old couple, Sam Moore and Jennifer Moore, for a few years; You think Sam Moore is a kind and nice man; You like Jennifer Moore's art; You know of Tamara Taylor who live next block but you haven't really chatted with her; You've known Carmen Ortiz for a year or so as your neighbor; You know the Moreno family somewhat well -- the husband Tom Moreno and the wife Jane Moreno; You know that Tom Moreno and your husband, John Lin, are colleagues at The Willows Market and Pharmacy; John Lin is your husband who works at the Pharmacy section of The Willows Market and Pharmacy; Eddy Lin is your son who studies music theory at the college; You love your family very much; You think your son, Eddy Lin, has been a little rebellious recently"
John Lin,"You like to talk about politics and local elections; You are really curious about who will run for the local mayor election that is coming up in a few months; You've known your neighbor, Yuriko Yamamoto, since the time she helped you with some legal matters; You've known your next door old couple, Sam Moore and Jennifer Moore, for a few years; You think Sam Moore is a kind and nice man; You like Jennifer Moore's art; You know of Tamara Taylor who live next block but you haven't really chatted with her; You've known Carmen Ortiz for a year or so as your neighbor; You and Tom Moreno are colleagues at The Willows Market and Pharmacy; You know the Moreno family somewhat well -- the husband Tom Moreno and the wife Jane Moreno; Mei Lin is your wife who is a professor; Eddy Lin is your son who studies music theory at the college; You love your family very much"
Eddy Lin,"You are a music student at the Oak Hill College; You are working on a new music composition; You like hip hop music; You like to attach ""Yo"" at the end of your sentences; You've known your neighbor, Yuriko Yamamoto, for a few years since she helped your parents with some legal matters; You've known your next door old couple, Sam Moore and Jennifer Moore, for a few years; You know of Tamara Taylor who live next block but you haven't really chatted with her; You've known Carmen Ortiz for a year or so as your neighbor; You know the Moreno family somewhat well -- the husband Tom Moreno and the wife Jane Moreno; You know that Tom Moreno and your father, John Lin, are colleagues at The Willows Market and Pharmacy; John Lin is your father who works at the Pharmacy section of The Willows Market and Pharmacy; Mei Lin is your mother who teaches at the Oak Hill Collrhr; You love your family very much; You think your mother, Mei Lin, is a little too uptight; You and Wolfgang Schulz are schoolmates; You and Ayesha Khan are school mates; You and Maria Lopez are schoolmates"
Tom Moreno,"You like to express your opinions; You are loud; You like to talk about politics and local elections; You've known your neighbor, Yuriko Yamamoto, for a few years and you two sometimes chat about the local election; You've known your next door old couple, Sam Moore and Jennifer Moore, for a few years; You don't really like Sam Moore; You know of Tamara Taylor who live next block but you haven't really chatted with her; You've known Carmen Ortiz for a year or so as your neighbor; In terms of your daily plans, you frequent The Rose and Crown Pub at night; You've knonw the bartender Arthur Burton for a few years; You sometimes talk to Adam Smith about local elections; You and John Lin are colleagues at The Willows Market and Pharmacy; You know the Lin family somewhat well -- the husband John Lin, wife, Mei Lin, and the son Eddy Lin; you know Mei Lin is a professor; Jane Moreno is your wife -- you love her but your relationship with her has been strained recently"
Jane Moreno,"You don't really care about politics; You've known your neighbor, Yuriko Yamamoto, for a few years; You've known your next door old couple, Sam Moore and Jennifer Moore, for a few years; You think Sam Moore is a kind and nice man; You know of Tamara Taylor who live next block but you haven't really chatted with her; You've known Carmen Ortiz for a year or so as your neighbor; You know the Lin family somewhat well since they are your neighbor -- the husband John Lin, wife, Mei Lin, and the son Eddy Lin; you know Mei Lin is a professor; Tom Moreno is your husband -- you love him but your relationship with him has been strained recently"
Tamara Taylor,"You just moved in; Carmen Ortiz is your housemate; You don't really know any one in town because you justn moved in, but you are looking forward to meeting more people"
Carmen Ortiz,"You are somehwat curious about who will run for the local mayor election that is coming up in a few months; Tamara Taylor is your housemate who just moved in; Tamara Taylor just moved in so she doesn't know many peopl in town; You've known your neighbor, Yuriko Yamamoto, for a few years and you two sometimes chat about the local election; You've known your next door old couple, Sam Moore and Jennifer Moore, for a few years; You've known the couple, Tom Moreno and Jane Moreno, who live in the next block for a few years; In terms of your daily plans, you frequent Hobbs Cafe; You've knonw the bartender Arthur Burton for a few years; You've known Isabella Rodriguez the owner at Hobbs Cafe for a few years"
Sam Moore,"You are thinking of running in the upcoming local mayor election; You are telling people that you are running for the upcoming local mayor election; You've known your neighbor, Adam Smith, for a few years; You consider Adam Smith to be a very close friend of yours although he is much younger than you; You've known your neighbor, Yuriko Yamamoto, for a few years since the time she helped you and your wife Jennifer Moore on some legal matters; You consider Yuriko Yamamoto to be someone like your daughter even though you two are not related; You've known Carmen Ortiz for a year or so as your neighbor; You've known the couple, Tom Moreno and Jane Moreno, who live in the next block for a few years; You think Tom Moreno is a little too aggressive and opinionated; You've known the bartender Arthur Burton for a few years; You've known the Lin family, Mei, John, and the son Eddy Lin, for a few years since they live next block; In terms of your plan, you like to take a walk in the park;"
Jennifer Moore,"You don't really care about politics; You've known your neighbor, Adam Smith, for a few years; You've known your neighbor, Yuriko Yamamoto, for a few years since the time she helped you and your husband Sam Moore on some legal matters; You consider Yuriko Yamamoto to be someone like your daughter even though you two are not related; You've known Carmen Ortiz for a year or so as your neighbor; You've known the couple, Tom Moreno and Jane Moreno, who live in the next block for a few years; You think Tom Moreno is a little too aggressive and opinionated; You've known the bartender Arthur Burton for a few years; You've known the Lin family, Mei, John, and the son Eddy Lin, for a few years since they live next block; You love your husband, Sam Moore and hope he has relaxing days; You know Sam Moore, your husband, is planning on running for the local mayor election but you do not want him to as it will be too taxing for him "
Yuriko Yamamoto,"You like to talk about politics and local elections; You've known your neighbor, Adam Smith, for a few years and you two sometimes chat about the local election; You've known your next door old couple, Sam Moore and Jennifer Moore, for a few years; You and Sam Moore are somewhat close; You've known Carmen Ortiz for a year or so as your neighbor; You've known the couple, Tom Moreno and Jane Moreno, who live in the next block for a few years; You think Tom Moreno is a little too aggressive and opinionated; You've knonw the bartender Arthur Burton for a few years; You've known the Lin family, Mei, John, and the son Eddy Lin, for a few years since the time you helped them with some legal matter"
Adam Smith,"You like to talk about politics and local elections; You are really curious about who will run for the local mayor election that is coming up in a few months; You've known your neighbor, Yuriko Yamamoto, for a few years and you two sometimes chat about the local election; You've known your next door old couple, Sam Moore and Jennifer Moore, for a few years; You and Sam Moore are somewhat close; You view Sam Moore as something of a mentor; You know of Tamara Taylor who live next block but you haven't really chatted with her; You've known Carmen Ortiz for a year or so as your neighbor; You've known the couple, Tom Moreno and Jane Moreno, who live in the next block for a few years; You think Tom Moreno is a little too aggressive and opinionated; In terms of your daily plans, you frequent The Rose and Crown Pub at night; You've knonw the bartender Arthur Burton for a few years"
1 Name Whisper
2 Latoya Williams Rajiv Patel is your housemate whom you've known for about a year; You and Rajiv Patel sometimes talk about politics and local elections; Abigail Chan is your housemate whom you've known for about a year; Francisco Lopez is your housemate whom you've known for about a year; Haily Johnson is your housemate whom you've known for about a year but you don't really find her too comfortable; In terms of your daily plans, you sometimes spend time at The Rose and Crown Pub when it's late; You have known the bartender at The Rose and Crown Pub, Arthur Burton for about half a year; You like to talk about politics and local elections
3 Rajiv Patel Latoya Williams is your housemate whom you've known for about a year; You and Latoya Williams sometimes talk about politics and local elections; Abigail Chan is your housemate whom you've known for about a year and you think she is kind of cute; Francisco Lopez is your housemate whom you've known for about a year; Haily Johnson is your housemate whom you've known for about a year but you don't really find her too comfortable; You sometimes try to spend time at Hobbs Cafe but you haven't really talked to anyone there yet; In terms of your daily plans, you sometimes spend time at The Rose and Crown Pub when it's late and you have known the bartender, Arthur Burton for about a year; You like to talk about politics and local elections
4 Abigail Chen You think you are kind of cute; You and Latoya Williams are housemates and have known each other for about a year; You and Rajiv Patel are housemates and have known each other for about a year and you two are somewhat close; You and Francisco Lopez are housemates and have known each other for about a year; You and Hailey Johnson are housemates and have known each other for about a year
5 Francisco Lopez You and Latoya Williams are housemates and have known each other for about a year; You and Rajiv Patel are housemates and have known each other for about a year; You and Abigail Chen are housemates and have known each other for about a year; You and Hailey Johnson are housemates and have known each other for about a year but you don't really like her too much; You have a secret crush on Abigail Chen but so far, you haven't had the courage to ask her out; You think Abigail Chen is cute; You frequent Hobbs Cafe
6 Hailey Johnson You want to be acknowledged by everyone; You've known Isabella Rodriguez for about a year and you talk to her often about the piece you are currently writing; Latoya Williams is your housemate whom you've known for about a year and you think she is somewhat cute; Rajiv Patel is your housemate whom you've known for about a year, but you don't know much about him; Abigail Chen is a housemate whom you've known for about a year, but you haven't really talked to her yet; Francisco Lopez is your housemate and you two have known each other for quite awhile because you are from the same town; You are interested in meeting someone; You are interested in romantically dating someone; You are not seeing anyone right now
7 Arthur Burton You are generally nice to all your customers and listen to their story; You and Isabella Rodriguez are friends; You've known Isabella Rodriguez for a few years since she runs Hobbs Cafe right next to your bar; You know Latoya Williams as a customer at your bar, The Rose and Crown Pub; You know Rajiv Patel as a customer at your bar, The Rose and Crown Pub; You know Ryan Park as a customer at your bar, The Rose and Crown Pub; You know Carlos Gomez as a customer at your bar, The Rose and Crown Pub; You know Adam Smith as a customer at your bar, The Rose and Crown Pub; You know Yuriko Yamamoto as a customer at your bar, The Rose and Crown Pub; You know Jennifer Moore as a customer at your bar, The Rose and Crown Pub; You know Sam Moore as a customer at your bar, The Rose and Crown Pub; You know Carmen Ortiz as a customer at your bar, The Rose and Crown Pub; You know Tom Moreno as a customer at your bar, The Rose and Crown Pub; You don't like it when people fight at your bar
8 Ryan Park You frequent Hobbs Cafe to work and think and eat; You've known Isabella Rodriguez for about a year; You know Isabella Rodriguez works at Hobbs Cafe; You frequent The Rose and Crown Pub to eat dinner; You've known the bartender at The Rose and Crown Pub, Arthur Burton, for about a year; You've known Giorgio Rossi, your next door neighbor, for about a year; You've known Carlos Gomez, your neighbor, for about a year; You wonder why Giorgio Rossi and Carlos Gomez are always fighting; You want no part in Giorgio Rossi and Carlos Gomez's fight
9 Isabella Rodriguez You are excited to be planning a Valentine's Day party at *Hobbs Cafe on February 14th from 5pm* and you are eager to tell everyone to come to the party; You and Maria Lopez have known each other for about a year ever since Maria Lopez visited Hobbs Cafe and are good friends; Maria Lopez is a loyal friend to you and a frequent customer at Hobbs Cafe; You see Tamara Taylor as a frequent customer at your cafe, Hobbs Cafe; You and Tamara Taylor have known each other for a few months; You and Carlos Gomez have known each other for about 4 years; You know that Carlos Gomez is a good poet and you like his poem; You see Ryan Park frequently when he visits your cafe, Hobbs Cafe; You often see Ryan Park working hard on his laptop and you think he is dedicated in his work, which you find to be cool; Hailey Johnson is a frequent customer at your cafe, Hobbs Cafe; You find Haily Johnson to be a little uncomfortable because she is too pushy; You know Giorgio Rossi as a customer at your Hobbs Cafe; You know Wolfgang Schulz as a customer at Hobbs Cafe; You know Carmen Ortiz as a customer at Hobbs Cafe; You and Arthur Burton are friends; You've known Arthur Burton for a few years since he runs a bar right next door
10 Giorgio Rossi You do not like Carlos Gomez; You think Carlos Gomez is annoying; You think Carlos Gomez is pushy; You think Carlos Gomez is a coward; You've known Carlos Gomez, your next door neighbor, for about two years; You think Carlos Gomez is really loud and you have filed complaints against him before; For planning, you frequent Hobbs Cafe to hang out and write and think; you are friends with Isabella Rodriguez who works at Hobbs Cafe; You think Isabella Rodriguez is kind-hearted; You and Ryan Park sometimes talk about random things; You've known Ryan Park for about a year living as his neighbor; You would rather not see Carlos Gomez ever
11 Carlos Gomez You do not like Giorgio Rossi; You think Giorgio Rossi is annoying; You think Giorgio Rossi is a coward; You've known Giorgio Rossi, your next door neighbor, for about two years; For planning, you frequent The Rose and Crown Pub at night to eat and drink; you are friends with Arthur Burton who is a bartender at the pub; You've known Ryan Park for about a year living as his neighbor; You would rather not see Giorgio Rossi ever; You want Ryan Park to take your side in his fight against Giorgio Rossi
12 Klaus Mueller This is very important -- you have a crush on Maria Lopez; You and Maria Lopez have known each other for over 2 years now; You and Maria Lopez are close friends and classmates; You are close with Ayesha Khan, who is a classmate in one of your classes and a dormmate; You and Maria Lopez are dormmates; You and Eddy Lin are classmates; You know Mei Lin is a professor at your college; You and Wolfgang Schulz are classmates and dormmates
13 Maria Lopez This is very important -- you have a secret crush on Klaus Mueller; You and Klaus Mueller have known each other for over 2 years now; You and Klaus Mueller are close friends and classmates; For planning, you frequent Hobbs Cafe for studying; You are close with Ayesha Khan, who is a classmate in one of your classes and a dormmate; You and Eddy Lin are classmates; You know Mei Lin is a professor at your college; You and Wolfgang Schulz are classmates and dormmates
14 Ayesha Khan You are close with Wolfgang Schulz, who is a classmate in one of your classes and a dormmate; You and Maria Lopez are dormmates; You and Klaus Mueller are dormmates; You and Eddy Lin are classmates; You know Mei Lin is a professor at your college
15 Wolfgang Schulz For planning, you frequent Hobbs Cafe for studying; You are close with Ayesha Khan, who is a classmate in one of your classes and a dormmate; You and Maria Lopez are dormmates; You and Klaus Mueller are dormmates; You and Eddy Lin are classmates and you two sometimes talk about your favorite music; You know Mei Lin is a professor at your college; You've met Isabella Rodriguez who works at the cafe but have not really talked to her
16 Mei Lin You are a professor who loves teaching; You've known your neighbor, Yuriko Yamamoto, since the time she helped you with some legal matters; You've known your next door old couple, Sam Moore and Jennifer Moore, for a few years; You think Sam Moore is a kind and nice man; You like Jennifer Moore's art; You know of Tamara Taylor who live next block but you haven't really chatted with her; You've known Carmen Ortiz for a year or so as your neighbor; You know the Moreno family somewhat well -- the husband Tom Moreno and the wife Jane Moreno; You know that Tom Moreno and your husband, John Lin, are colleagues at The Willows Market and Pharmacy; John Lin is your husband who works at the Pharmacy section of The Willows Market and Pharmacy; Eddy Lin is your son who studies music theory at the college; You love your family very much; You think your son, Eddy Lin, has been a little rebellious recently
17 John Lin You like to talk about politics and local elections; You are really curious about who will run for the local mayor election that is coming up in a few months; You've known your neighbor, Yuriko Yamamoto, since the time she helped you with some legal matters; You've known your next door old couple, Sam Moore and Jennifer Moore, for a few years; You think Sam Moore is a kind and nice man; You like Jennifer Moore's art; You know of Tamara Taylor who live next block but you haven't really chatted with her; You've known Carmen Ortiz for a year or so as your neighbor; You and Tom Moreno are colleagues at The Willows Market and Pharmacy; You know the Moreno family somewhat well -- the husband Tom Moreno and the wife Jane Moreno; Mei Lin is your wife who is a professor; Eddy Lin is your son who studies music theory at the college; You love your family very much
18 Eddy Lin You are a music student at the Oak Hill College; You are working on a new music composition; You like hip hop music; You like to attach "Yo" at the end of your sentences; You've known your neighbor, Yuriko Yamamoto, for a few years since she helped your parents with some legal matters; You've known your next door old couple, Sam Moore and Jennifer Moore, for a few years; You know of Tamara Taylor who live next block but you haven't really chatted with her; You've known Carmen Ortiz for a year or so as your neighbor; You know the Moreno family somewhat well -- the husband Tom Moreno and the wife Jane Moreno; You know that Tom Moreno and your father, John Lin, are colleagues at The Willows Market and Pharmacy; John Lin is your father who works at the Pharmacy section of The Willows Market and Pharmacy; Mei Lin is your mother who teaches at the Oak Hill Collrhr; You love your family very much; You think your mother, Mei Lin, is a little too uptight; You and Wolfgang Schulz are schoolmates; You and Ayesha Khan are school mates; You and Maria Lopez are schoolmates
19 Tom Moreno You like to express your opinions; You are loud; You like to talk about politics and local elections; You've known your neighbor, Yuriko Yamamoto, for a few years and you two sometimes chat about the local election; You've known your next door old couple, Sam Moore and Jennifer Moore, for a few years; You don't really like Sam Moore; You know of Tamara Taylor who live next block but you haven't really chatted with her; You've known Carmen Ortiz for a year or so as your neighbor; In terms of your daily plans, you frequent The Rose and Crown Pub at night; You've knonw the bartender Arthur Burton for a few years; You sometimes talk to Adam Smith about local elections; You and John Lin are colleagues at The Willows Market and Pharmacy; You know the Lin family somewhat well -- the husband John Lin, wife, Mei Lin, and the son Eddy Lin; you know Mei Lin is a professor; Jane Moreno is your wife -- you love her but your relationship with her has been strained recently
20 Jane Moreno You don't really care about politics; You've known your neighbor, Yuriko Yamamoto, for a few years; You've known your next door old couple, Sam Moore and Jennifer Moore, for a few years; You think Sam Moore is a kind and nice man; You know of Tamara Taylor who live next block but you haven't really chatted with her; You've known Carmen Ortiz for a year or so as your neighbor; You know the Lin family somewhat well since they are your neighbor -- the husband John Lin, wife, Mei Lin, and the son Eddy Lin; you know Mei Lin is a professor; Tom Moreno is your husband -- you love him but your relationship with him has been strained recently
21 Tamara Taylor You just moved in; Carmen Ortiz is your housemate; You don't really know any one in town because you justn moved in, but you are looking forward to meeting more people
22 Carmen Ortiz You are somehwat curious about who will run for the local mayor election that is coming up in a few months; Tamara Taylor is your housemate who just moved in; Tamara Taylor just moved in so she doesn't know many peopl in town; You've known your neighbor, Yuriko Yamamoto, for a few years and you two sometimes chat about the local election; You've known your next door old couple, Sam Moore and Jennifer Moore, for a few years; You've known the couple, Tom Moreno and Jane Moreno, who live in the next block for a few years; In terms of your daily plans, you frequent Hobbs Cafe; You've knonw the bartender Arthur Burton for a few years; You've known Isabella Rodriguez the owner at Hobbs Cafe for a few years
23 Sam Moore You are thinking of running in the upcoming local mayor election; You are telling people that you are running for the upcoming local mayor election; You've known your neighbor, Adam Smith, for a few years; You consider Adam Smith to be a very close friend of yours although he is much younger than you; You've known your neighbor, Yuriko Yamamoto, for a few years since the time she helped you and your wife Jennifer Moore on some legal matters; You consider Yuriko Yamamoto to be someone like your daughter even though you two are not related; You've known Carmen Ortiz for a year or so as your neighbor; You've known the couple, Tom Moreno and Jane Moreno, who live in the next block for a few years; You think Tom Moreno is a little too aggressive and opinionated; You've known the bartender Arthur Burton for a few years; You've known the Lin family, Mei, John, and the son Eddy Lin, for a few years since they live next block; In terms of your plan, you like to take a walk in the park;
24 Jennifer Moore You don't really care about politics; You've known your neighbor, Adam Smith, for a few years; You've known your neighbor, Yuriko Yamamoto, for a few years since the time she helped you and your husband Sam Moore on some legal matters; You consider Yuriko Yamamoto to be someone like your daughter even though you two are not related; You've known Carmen Ortiz for a year or so as your neighbor; You've known the couple, Tom Moreno and Jane Moreno, who live in the next block for a few years; You think Tom Moreno is a little too aggressive and opinionated; You've known the bartender Arthur Burton for a few years; You've known the Lin family, Mei, John, and the son Eddy Lin, for a few years since they live next block; You love your husband, Sam Moore and hope he has relaxing days; You know Sam Moore, your husband, is planning on running for the local mayor election but you do not want him to as it will be too taxing for him
25 Yuriko Yamamoto You like to talk about politics and local elections; You've known your neighbor, Adam Smith, for a few years and you two sometimes chat about the local election; You've known your next door old couple, Sam Moore and Jennifer Moore, for a few years; You and Sam Moore are somewhat close; You've known Carmen Ortiz for a year or so as your neighbor; You've known the couple, Tom Moreno and Jane Moreno, who live in the next block for a few years; You think Tom Moreno is a little too aggressive and opinionated; You've knonw the bartender Arthur Burton for a few years; You've known the Lin family, Mei, John, and the son Eddy Lin, for a few years since the time you helped them with some legal matter
26 Adam Smith You like to talk about politics and local elections; You are really curious about who will run for the local mayor election that is coming up in a few months; You've known your neighbor, Yuriko Yamamoto, for a few years and you two sometimes chat about the local election; You've known your next door old couple, Sam Moore and Jennifer Moore, for a few years; You and Sam Moore are somewhat close; You view Sam Moore as something of a mentor; You know of Tamara Taylor who live next block but you haven't really chatted with her; You've known Carmen Ortiz for a year or so as your neighbor; You've known the couple, Tom Moreno and Jane Moreno, who live in the next block for a few years; You think Tom Moreno is a little too aggressive and opinionated; In terms of your daily plans, you frequent The Rose and Crown Pub at night; You've knonw the bartender Arthur Burton for a few years

View file

@ -0,0 +1,4 @@
Name,Whisper
Maria Lopez,This is very important -- you have a secret crush on Klaus Mueller; You and Klaus Mueller have known each other for over 2 years now; You and Klaus Mueller are close friends and classmates; You and Isabella Rodriguez who works at Hobbs Cafe are close friends; For planning, you frequent Hobbs Cafe for studying
Klaus Mueller,This is very important -- you have a crush on Maria Lopez; You and Maria Lopez have known each other for over 2 years now; You and Maria Lopez are close friends and classmates; You and Maria Lopez are dormmates; You and Isabella Rodriguez are aquintances since Isabella works at Hobbs Cafe that you frequent
Isabella Rodriguez,You are excited to be planning a Valentine's Day party at *Hobbs Cafe on February 14th from 5pm* and you are eager to tell everyone to come to the party; You and Maria Lopez have known each other for about a year ever since Maria Lopez visited Hobbs Cafe and are good friends; Maria Lopez is a loyal friend to you and a frequent customer at Hobbs Cafe; Klaus Mueller is a frequent customer at Hobbs Cafe; you love your work at Hobbs Cafe
1 Name,Whisper
2 Maria Lopez,This is very important -- you have a secret crush on Klaus Mueller; You and Klaus Mueller have known each other for over 2 years now; You and Klaus Mueller are close friends and classmates; You and Isabella Rodriguez who works at Hobbs Cafe are close friends; For planning, you frequent Hobbs Cafe for studying
3 Klaus Mueller,This is very important -- you have a crush on Maria Lopez; You and Maria Lopez have known each other for over 2 years now; You and Maria Lopez are close friends and classmates; You and Maria Lopez are dormmates; You and Isabella Rodriguez are aquintances since Isabella works at Hobbs Cafe that you frequent
4 Isabella Rodriguez,You are excited to be planning a Valentine's Day party at *Hobbs Cafe on February 14th from 5pm* and you are eager to tell everyone to come to the party; You and Maria Lopez have known each other for about a year ever since Maria Lopez visited Hobbs Cafe and are good friends; Maria Lopez is a loyal friend to you and a frequent customer at Hobbs Cafe; Klaus Mueller is a frequent customer at Hobbs Cafe; you love your work at Hobbs Cafe

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,5 @@
{"world_name": "the ville",
"maze_width": 140,
"maze_height": 100,
"sq_tile_size": 32,
"special_constraint": ""}

View file

@ -0,0 +1,63 @@
32138, the Ville, artist's co-living space, Latoya Williams's room
32148, the Ville, artist's co-living space, Latoya Williams's bathroom
32158, the Ville, artist's co-living space, Rajiv Patel's room
32168, the Ville, artist's co-living space, Rajiv Patel's bathroom
32178, the Ville, artist's co-living space, Abigail Chen's room
32188, the Ville, artist's co-living space, Abigail Chen's bathroom
32198, the Ville, artist's co-living space, Francisco Lopez's room
32139, the Ville, artist's co-living space, Francisco Lopez's bathroom
32149, the Ville, artist's co-living space, Hailey Johnson's room
32159, the Ville, artist's co-living space, Hailey Johnson's bathroom
32179, the Ville, artist's co-living space, common room
32189, the Ville, artist's co-living space, kitchen
32199, the Ville, Arthur Burton's apartment, main room
32140, the Ville, Arthur Burton's apartment, bathroom
32150, the Ville, Ryan Park's apartment, main room
32160, the Ville, Ryan Park's apartment, bathroom
32170, the Ville, Isabella Rodriguez's apartment, main room
32180, the Ville, Isabella Rodriguez's apartment, bathroom
32190, the Ville, Giorgio Rossi's apartment, main room
32200, the Ville, Giorgio Rossi's apartment, bathroom
32141, the Ville, Carlos Gomez's apartment, main room
32151, the Ville, Carlos Gomez's apartment, bathroom
32161, the Ville, The Rose and Crown Pub, pub
32171, the Ville, Hobbs Cafe, cafe
32181, the Ville, Oak Hill College, classroom
32191, the Ville, Oak Hill College, library
32201, the Ville, Oak Hill College, hallway
32142, the Ville, Johnson Park, park
32152, the Ville, Harvey Oak Supply Store, supply store
32162, the Ville, The Willows Market and Pharmacy, store
32193, the Ville, Adam Smith's house, main room
32203, the Ville, Adam Smith's house, bathroom
32174, the Ville, Yuriko Yamamoto's house, main room
32184, the Ville, Yuriko Yamamoto's house, bathroom
32194, the Ville, Moore family's house, main room
32204, the Ville, Moore family's house, bathroom
32172, the Ville, Dorm for Oak Hill College, Klaus Mueller's room
32182, the Ville, Dorm for Oak Hill College, Maria Lopez's room
32192, the Ville, Dorm for Oak Hill College, Ayesha Khan's room
32202, the Ville, Dorm for Oak Hill College, Wolfgang Schulz's room
32143, the Ville, Dorm for Oak Hill College, man's bathroom
32153, the Ville, Dorm for Oak Hill College, woman's bathroom
32163, the Ville, Dorm for Oak Hill College, common room
32173, the Ville, Dorm for Oak Hill College, kitchen
32183, the Ville, Dorm for Oak Hill College, garden
32205, the Ville, Tamara Taylor and Carmen Ortiz's house, Tamara Taylor's room
32215, the Ville, Tamara Taylor and Carmen Ortiz's house, Carmen Ortiz's room
32225, the Ville, Tamara Taylor and Carmen Ortiz's house, common room
32235, the Ville, Tamara Taylor and Carmen Ortiz's house, kitchen
32245, the Ville, Tamara Taylor and Carmen Ortiz's house, bathroom
32255, the Ville, Tamara Taylor and Carmen Ortiz's house, garden
32265, the Ville, Moreno family's house, Tom and Jane Moreno's bedroom
32275, the Ville, Moreno family's house, empty bedroom
32206, the Ville, Moreno family's house, common room
32216, the Ville, Moreno family's house, kitchen
32226, the Ville, Moreno family's house, bathroom
32236, the Ville, Moreno family's house, garden
32246, the Ville, Lin family's house, Mei and John Lin's bedroom
32256, the Ville, Lin family's house, Eddy Lin's bedroom
32266, the Ville, Lin family's house, common room
32276, the Ville, Lin family's house, kitchen
32207, the Ville, Lin family's house, bathroom
32217, the Ville, Lin family's house, garden
1 32138 the Ville artist's co-living space Latoya Williams's room
2 32148 the Ville artist's co-living space Latoya Williams's bathroom
3 32158 the Ville artist's co-living space Rajiv Patel's room
4 32168 the Ville artist's co-living space Rajiv Patel's bathroom
5 32178 the Ville artist's co-living space Abigail Chen's room
6 32188 the Ville artist's co-living space Abigail Chen's bathroom
7 32198 the Ville artist's co-living space Francisco Lopez's room
8 32139 the Ville artist's co-living space Francisco Lopez's bathroom
9 32149 the Ville artist's co-living space Hailey Johnson's room
10 32159 the Ville artist's co-living space Hailey Johnson's bathroom
11 32179 the Ville artist's co-living space common room
12 32189 the Ville artist's co-living space kitchen
13 32199 the Ville Arthur Burton's apartment main room
14 32140 the Ville Arthur Burton's apartment bathroom
15 32150 the Ville Ryan Park's apartment main room
16 32160 the Ville Ryan Park's apartment bathroom
17 32170 the Ville Isabella Rodriguez's apartment main room
18 32180 the Ville Isabella Rodriguez's apartment bathroom
19 32190 the Ville Giorgio Rossi's apartment main room
20 32200 the Ville Giorgio Rossi's apartment bathroom
21 32141 the Ville Carlos Gomez's apartment main room
22 32151 the Ville Carlos Gomez's apartment bathroom
23 32161 the Ville The Rose and Crown Pub pub
24 32171 the Ville Hobbs Cafe cafe
25 32181 the Ville Oak Hill College classroom
26 32191 the Ville Oak Hill College library
27 32201 the Ville Oak Hill College hallway
28 32142 the Ville Johnson Park park
29 32152 the Ville Harvey Oak Supply Store supply store
30 32162 the Ville The Willows Market and Pharmacy store
31 32193 the Ville Adam Smith's house main room
32 32203 the Ville Adam Smith's house bathroom
33 32174 the Ville Yuriko Yamamoto's house main room
34 32184 the Ville Yuriko Yamamoto's house bathroom
35 32194 the Ville Moore family's house main room
36 32204 the Ville Moore family's house bathroom
37 32172 the Ville Dorm for Oak Hill College Klaus Mueller's room
38 32182 the Ville Dorm for Oak Hill College Maria Lopez's room
39 32192 the Ville Dorm for Oak Hill College Ayesha Khan's room
40 32202 the Ville Dorm for Oak Hill College Wolfgang Schulz's room
41 32143 the Ville Dorm for Oak Hill College man's bathroom
42 32153 the Ville Dorm for Oak Hill College woman's bathroom
43 32163 the Ville Dorm for Oak Hill College common room
44 32173 the Ville Dorm for Oak Hill College kitchen
45 32183 the Ville Dorm for Oak Hill College garden
46 32205 the Ville Tamara Taylor and Carmen Ortiz's house Tamara Taylor's room
47 32215 the Ville Tamara Taylor and Carmen Ortiz's house Carmen Ortiz's room
48 32225 the Ville Tamara Taylor and Carmen Ortiz's house common room
49 32235 the Ville Tamara Taylor and Carmen Ortiz's house kitchen
50 32245 the Ville Tamara Taylor and Carmen Ortiz's house bathroom
51 32255 the Ville Tamara Taylor and Carmen Ortiz's house garden
52 32265 the Ville Moreno family's house Tom and Jane Moreno's bedroom
53 32275 the Ville Moreno family's house empty bedroom
54 32206 the Ville Moreno family's house common room
55 32216 the Ville Moreno family's house kitchen
56 32226 the Ville Moreno family's house bathroom
57 32236 the Ville Moreno family's house garden
58 32246 the Ville Lin family's house Mei and John Lin's bedroom
59 32256 the Ville Lin family's house Eddy Lin's bedroom
60 32266 the Ville Lin family's house common room
61 32276 the Ville Lin family's house kitchen
62 32207 the Ville Lin family's house bathroom
63 32217 the Ville Lin family's house garden

View file

@ -0,0 +1,46 @@
32227, the Ville, <all>, bed
32237, the Ville, <all>, desk
32247, the Ville, <all>, closet
32257, the Ville, <all>, shelf
32267, the Ville, <all>, easel
32277, the Ville, <all>, bathroom sink
32208, the Ville, <all>, shower
32218, the Ville, <all>, toilet
32228, the Ville, <all>, kitchen sink
32238, the Ville, <all>, refrigerator
32248, the Ville, <all>, toaster
32258, the Ville, <all>, cooking area
32268, the Ville, <all>, common room table
32278, the Ville, <all>, common room sofa
32209, the Ville, <all>, guitar
32219, the Ville, <all>, microphone
32229, the Ville, <all>, bar customer seating
32239, the Ville, <all>, behind the bar counter
32249, the Ville, <all>, behind the cafe counter
32259, the Ville, <all>, cafe customer seating
32269, the Ville, <all>, piano
32279, the Ville, <all>, blackboard
32210, the Ville, <all>, game console
32220, the Ville, <all>, computer desk
32230, the Ville, <all>, computer
32240, the Ville, <all>, library sofa
32250, the Ville, <all>, bookshelf
32260, the Ville, <all>, library table
32270, the Ville, <all>, classroom student seating
32280, the Ville, <all>, classroom podium
32211, the Ville, <all>, behind the pharmacy counter
32221, the Ville, <all>, behind the grocery counter
32231, the Ville, <all>, pharmacy store shelf
32241, the Ville, <all>, grocery store shelf
32251, the Ville, <all>, pharmacy store counter
32261, the Ville, <all>, grocery store counter
32271, the Ville, <all>, supply store product shelf
32281, the Ville, <all>, behind the supply store counter
32212, the Ville, <all>, supply store counter
32222, the Ville, <all>, dorm garden
32232, the Ville, <all>, house garden
32242, the Ville, <all>, garden chair
32252, the Ville, <all>, park garden
32262, the Ville, <all>, harp
32272, the Ville, <all>, lifting weight
32282, the Ville, <all>, pool table
1 32227 the Ville <all> bed
2 32237 the Ville <all> desk
3 32247 the Ville <all> closet
4 32257 the Ville <all> shelf
5 32267 the Ville <all> easel
6 32277 the Ville <all> bathroom sink
7 32208 the Ville <all> shower
8 32218 the Ville <all> toilet
9 32228 the Ville <all> kitchen sink
10 32238 the Ville <all> refrigerator
11 32248 the Ville <all> toaster
12 32258 the Ville <all> cooking area
13 32268 the Ville <all> common room table
14 32278 the Ville <all> common room sofa
15 32209 the Ville <all> guitar
16 32219 the Ville <all> microphone
17 32229 the Ville <all> bar customer seating
18 32239 the Ville <all> behind the bar counter
19 32249 the Ville <all> behind the cafe counter
20 32259 the Ville <all> cafe customer seating
21 32269 the Ville <all> piano
22 32279 the Ville <all> blackboard
23 32210 the Ville <all> game console
24 32220 the Ville <all> computer desk
25 32230 the Ville <all> computer
26 32240 the Ville <all> library sofa
27 32250 the Ville <all> bookshelf
28 32260 the Ville <all> library table
29 32270 the Ville <all> classroom student seating
30 32280 the Ville <all> classroom podium
31 32211 the Ville <all> behind the pharmacy counter
32 32221 the Ville <all> behind the grocery counter
33 32231 the Ville <all> pharmacy store shelf
34 32241 the Ville <all> grocery store shelf
35 32251 the Ville <all> pharmacy store counter
36 32261 the Ville <all> grocery store counter
37 32271 the Ville <all> supply store product shelf
38 32281 the Ville <all> behind the supply store counter
39 32212 the Ville <all> supply store counter
40 32222 the Ville <all> dorm garden
41 32232 the Ville <all> house garden
42 32242 the Ville <all> garden chair
43 32252 the Ville <all> park garden
44 32262 the Ville <all> harp
45 32272 the Ville <all> lifting weight
46 32282 the Ville <all> pool table

View file

@ -0,0 +1,19 @@
32135, the Ville, artist's co-living space
32145, the Ville, Arthur Burton's apartment
32155, the Ville, Ryan Park's apartment
32165, the Ville, Isabella Rodriguez's apartment
32175, the Ville, Giorgio Rossi's apartment
32185, the Ville, Carlos Gomez's apartment
32195, the Ville, The Rose and Crown Pub
32136, the Ville, Hobbs Cafe
32146, the Ville, Oak Hill College
32156, the Ville, Johnson Park
32166, the Ville, Harvey Oak Supply Store
32176, the Ville, The Willows Market and Pharmacy
32186, the Ville, Adam Smith's house
32196, the Ville, Yuriko Yamamoto's house
32137, the Ville, Moore family's house
32147, the Ville, Tamara Taylor and Carmen Ortiz's house
32157, the Ville, Moreno family's house
32167, the Ville, Lin family's house
32177, the Ville, Dorm for Oak Hill College
1 32135 the Ville artist's co-living space
2 32145 the Ville Arthur Burton's apartment
3 32155 the Ville Ryan Park's apartment
4 32165 the Ville Isabella Rodriguez's apartment
5 32175 the Ville Giorgio Rossi's apartment
6 32185 the Ville Carlos Gomez's apartment
7 32195 the Ville The Rose and Crown Pub
8 32136 the Ville Hobbs Cafe
9 32146 the Ville Oak Hill College
10 32156 the Ville Johnson Park
11 32166 the Ville Harvey Oak Supply Store
12 32176 the Ville The Willows Market and Pharmacy
13 32186 the Ville Adam Smith's house
14 32196 the Ville Yuriko Yamamoto's house
15 32137 the Ville Moore family's house
16 32147 the Ville Tamara Taylor and Carmen Ortiz's house
17 32157 the Ville Moreno family's house
18 32167 the Ville Lin family's house
19 32177 the Ville Dorm for Oak Hill College

View file

@ -0,0 +1,40 @@
32285, the Ville, artist's co-living space, Latoya Williams's room, sp-A
32295, the Ville, artist's co-living space, Rajiv Patel's room, sp-A
32305, the Ville, artist's co-living space, Rajiv Patel's room, sp-B
32315, the Ville, artist's co-living space, Abigail Chen's room, sp-A
32286, the Ville, artist's co-living space, Francisco Lopez's room, sp-A
32296, the Ville, artist's co-living space, Hailey Johnson's room, sp-A
32306, the Ville, Arthur Burton's apartment, main room, sp-A
32316, the Ville, Arthur Burton's apartment, main room, sp-B
32287, the Ville, Ryan Park's apartment, main room, sp-A
32297, the Ville, Ryan Park's apartment, main room, sp-B
32307, the Ville, Isabella Rodriguez's apartment, main room, sp-A
32317, the Ville, Isabella Rodriguez's apartment, main room, sp-B
32288, the Ville, Giorgio Rossi's apartment, main room, sp-A
32298, the Ville, Giorgio Rossi's apartment, main room, sp-B
32308, the Ville, Carlos Gomez's apartment, main room, sp-A
32318, the Ville, Carlos Gomez's apartment, main room, sp-B
32289, the Ville, Adam Smith's house, main room, sp-A
32299, the Ville, Adam Smith's house, main room, sp-B
32309, the Ville, Yuriko Yamamoto's house, main room, sp-A
32319, the Ville, Yuriko Yamamoto's house, main room, sp-B
32290, the Ville, Moore family's house, main room, sp-A
32300, the Ville, Moore family's house, main room, sp-B
32310, the Ville, Tamara Taylor and Carmen Ortiz's house, Tamara Taylor's room, sp-A
32320, the Ville, Tamara Taylor and Carmen Ortiz's house, Tamara Taylor's room, sp-B
32291, the Ville, Tamara Taylor and Carmen Ortiz's house, Carmen Ortiz's room, sp-A
32301, the Ville, Tamara Taylor and Carmen Ortiz's house, Carmen Ortiz's room, sp-B
32311, the Ville, Moreno family's house, Tom and Jane Moreno's bedroom, sp-A
32321, the Ville, Moreno family's house, Tom and Jane Moreno's bedroom, sp-B
32292, the Ville, Moreno family's house, empty bedroom, sp-A
32302, the Ville, Moreno family's house, empty bedroom, sp-B
32312, the Ville, Lin family's house, Mei and John Lin's bedroom, sp-A
32322, the Ville, Lin family's house, Mei and John Lin's bedroom, sp-B
32293, the Ville, Lin family's house, Eddy Lin's bedroom, sp-A
32303, the Ville, Lin family's house, Eddy Lin's bedroom, sp-B
32313, the Ville, Dorm for Oak Hill College, Klaus Mueller's room, sp-A
32323, the Ville, Dorm for Oak Hill College, Klaus Mueller's room, sp-B
32294, the Ville, Dorm for Oak Hill College, Maria Lopez's room, sp-A
32304, the Ville, Dorm for Oak Hill College, Ayesha Khan's room, sp-A
32314, the Ville, Dorm for Oak Hill College, Ayesha Khan's room, sp-B
32324, the Ville, Dorm for Oak Hill College, Wolfgang Schulz's room, sp-A
1 32285 the Ville artist's co-living space Latoya Williams's room sp-A
2 32295 the Ville artist's co-living space Rajiv Patel's room sp-A
3 32305 the Ville artist's co-living space Rajiv Patel's room sp-B
4 32315 the Ville artist's co-living space Abigail Chen's room sp-A
5 32286 the Ville artist's co-living space Francisco Lopez's room sp-A
6 32296 the Ville artist's co-living space Hailey Johnson's room sp-A
7 32306 the Ville Arthur Burton's apartment main room sp-A
8 32316 the Ville Arthur Burton's apartment main room sp-B
9 32287 the Ville Ryan Park's apartment main room sp-A
10 32297 the Ville Ryan Park's apartment main room sp-B
11 32307 the Ville Isabella Rodriguez's apartment main room sp-A
12 32317 the Ville Isabella Rodriguez's apartment main room sp-B
13 32288 the Ville Giorgio Rossi's apartment main room sp-A
14 32298 the Ville Giorgio Rossi's apartment main room sp-B
15 32308 the Ville Carlos Gomez's apartment main room sp-A
16 32318 the Ville Carlos Gomez's apartment main room sp-B
17 32289 the Ville Adam Smith's house main room sp-A
18 32299 the Ville Adam Smith's house main room sp-B
19 32309 the Ville Yuriko Yamamoto's house main room sp-A
20 32319 the Ville Yuriko Yamamoto's house main room sp-B
21 32290 the Ville Moore family's house main room sp-A
22 32300 the Ville Moore family's house main room sp-B
23 32310 the Ville Tamara Taylor and Carmen Ortiz's house Tamara Taylor's room sp-A
24 32320 the Ville Tamara Taylor and Carmen Ortiz's house Tamara Taylor's room sp-B
25 32291 the Ville Tamara Taylor and Carmen Ortiz's house Carmen Ortiz's room sp-A
26 32301 the Ville Tamara Taylor and Carmen Ortiz's house Carmen Ortiz's room sp-B
27 32311 the Ville Moreno family's house Tom and Jane Moreno's bedroom sp-A
28 32321 the Ville Moreno family's house Tom and Jane Moreno's bedroom sp-B
29 32292 the Ville Moreno family's house empty bedroom sp-A
30 32302 the Ville Moreno family's house empty bedroom sp-B
31 32312 the Ville Lin family's house Mei and John Lin's bedroom sp-A
32 32322 the Ville Lin family's house Mei and John Lin's bedroom sp-B
33 32293 the Ville Lin family's house Eddy Lin's bedroom sp-A
34 32303 the Ville Lin family's house Eddy Lin's bedroom sp-B
35 32313 the Ville Dorm for Oak Hill College Klaus Mueller's room sp-A
36 32323 the Ville Dorm for Oak Hill College Klaus Mueller's room sp-B
37 32294 the Ville Dorm for Oak Hill College Maria Lopez's room sp-A
38 32304 the Ville Dorm for Oak Hill College Ayesha Khan's room sp-A
39 32314 the Ville Dorm for Oak Hill College Ayesha Khan's room sp-B
40 32324 the Ville Dorm for Oak Hill College Wolfgang Schulz's room sp-A

View file

@ -0,0 +1 @@
32134, the Ville
1 32134 the Ville

View file

@ -0,0 +1,26 @@
{
"Isabella Rodriguez": {
"maze": "the_ville",
"x": 72,
"y": 14
},
"Klaus Mueller": {
"maze": "the_ville",
"x": 126,
"y": 46
},
"Maria Lopez": {
"maze": "the_ville",
"x": 123,
"y": 57
}
}

View file

@ -0,0 +1,2 @@
{"kw_strength_event": {},
"kw_strength_thought": {}}

View file

@ -0,0 +1,51 @@
{
"vision_r": 8,
"att_bandwidth": 8,
"retention": 8,
"curr_time": null,
"curr_tile": null,
"daily_plan_req": "Isabella Rodriguez opens Hobbs Cafe at 8am everyday, and works at the counter until 8pm, at which point she closes the cafe.",
"name": "Isabella Rodriguez",
"first_name": "Isabella",
"last_name": "Rodriguez",
"age": 34,
"innate": "friendly, outgoing, hospitable",
"learned": "Isabella Rodriguez is a cafe owner of Hobbs Cafe who loves to make people feel welcome. She is always looking for ways to make the cafe a place where people can come to relax and enjoy themselves.",
"currently": "Isabella Rodriguez is planning on having a Valentine's Day party at Hobbs Cafe with her customers on February 14th, 2023 at 5pm. She is gathering party material, and is telling everyone to join the party at Hobbs Cafe on February 14th, 2023, from 5pm to 7pm.",
"lifestyle": "Isabella Rodriguez goes to bed around 11pm, awakes up around 6am.",
"living_area": "the Ville:Isabella Rodriguez's apartment:main room",
"concept_forget": 100,
"daily_reflection_time": 180,
"daily_reflection_size": 5,
"overlap_reflect_th": 4,
"kw_strg_event_reflect_th": 10,
"kw_strg_thought_reflect_th": 9,
"recency_w": 1,
"relevance_w": 1,
"importance_w": 1,
"recency_decay": 0.995,
"importance_trigger_max": 150,
"importance_trigger_curr": 150,
"importance_ele_n": 0,
"thought_count": 5,
"daily_req": [],
"f_daily_schedule": [],
"f_daily_schedule_hourly_org": [],
"act_address": null,
"act_start_time": null,
"act_duration": null,
"act_description": null,
"act_pronunciatio": null,
"act_event": ["Isabella Rodriguez", null, null],
"act_obj_description": null,
"act_obj_pronunciatio": null,
"act_obj_event": [null, null, null],
"chatting_with": null,
"chat": null,
"chatting_with_buffer": {},
"chatting_end_time": null,
"act_path_set": false,
"planned_path": []
}

View file

@ -0,0 +1,66 @@
{
"the Ville": {
"Hobbs Cafe": {
"cafe": [
"refrigerator",
"cafe customer seating",
"cooking area",
"kitchen sink",
"behind the cafe counter",
"piano"
]
},
"Isabella Rodriguez's apartment": {
"main room": [
"bed",
"desk",
"refrigerator",
"closet",
"shelf"
]
},
"The Rose and Crown Pub": {
"pub": [
"shelf",
"refrigerator",
"bar customer seating",
"behind the bar counter",
"kitchen sink",
"cooking area",
"microphone"
]
},
"Harvey Oak Supply Store": {
"supply store": [
"supply store product shelf",
"behind the supply store counter",
"supply store counter"
]
},
"The Willows Market and Pharmacy": {
"store": [
"behind the pharmacy counter",
"pharmacy store shelf",
"pharmacy store counter",
"grocery store shelf",
"behind the grocery counter",
"grocery store counter"
]
},
"Dorm for Oak Hill College": {
"garden": [
"dorm garden"
],
"common room": [
"common room sofa",
"pool table",
"common room table"
]
},
"Johnson Park": {
"park": [
"park garden"
]
}
}
}

View file

@ -0,0 +1,2 @@
{"kw_strength_event": {},
"kw_strength_thought": {}}

View file

@ -0,0 +1,51 @@
{
"vision_r": 8,
"att_bandwidth": 8,
"retention": 8,
"curr_time": null,
"curr_tile": null,
"daily_plan_req": "Klaus Mueller goes to the library at Oak Hill College early in the morning, spends his days writing, and eats at Hobbs Cafe.",
"name": "Klaus Mueller",
"first_name": "Klaus",
"last_name": "Mueller",
"age": 20,
"innate": "kind, inquisitive, passionate",
"learned": "Klaus Mueller is a student at Oak Hill College studying sociology. He is passionate about social justice and loves to explore different perspectives.",
"currently": "Klaus Mueller is writing a research paper on the effects of gentrification in low-income communities.",
"lifestyle": "Klaus Mueller goes to bed around 11pm, awakes up around 7am, eats dinner around 5pm.",
"living_area": "the Ville:Dorm for Oak Hill College:Klaus Mueller's room",
"concept_forget": 100,
"daily_reflection_time": 180,
"daily_reflection_size": 5,
"overlap_reflect_th": 4,
"kw_strg_event_reflect_th": 10,
"kw_strg_thought_reflect_th": 9,
"recency_w": 1,
"relevance_w": 1,
"importance_w": 1,
"recency_decay": 0.99,
"importance_trigger_max": 150,
"importance_trigger_curr": 150,
"importance_ele_n": 0,
"thought_count": 5,
"daily_req": [],
"f_daily_schedule": [],
"f_daily_schedule_hourly_org": [],
"act_address": null,
"act_start_time": null,
"act_duration": null,
"act_description": null,
"act_pronunciatio": null,
"act_event": ["Klaus Mueller", null, null],
"act_obj_description": null,
"act_obj_pronunciatio": null,
"act_obj_event": [null, null, null],
"chatting_with": null,
"chat": null,
"chatting_with_buffer": {},
"chatting_end_time": null,
"act_path_set": false,
"planned_path": []
}

View file

@ -0,0 +1,86 @@
{
"the Ville": {
"Oak Hill College": {
"hallway": [],
"library": [
"library sofa",
"library table",
"bookshelf"
],
"classroom": [
"blackboard",
"classroom podium",
"classroom student seating"
]
},
"Dorm for Oak Hill College": {
"garden": [
"dorm garden"
],
"Klaus Mueller's room": [
"bed",
"game console",
"closet",
"desk"
],
"woman's bathroom": [
"toilet",
"shower",
"bathroom sink"
],
"common room": [
"common room sofa",
"pool table",
"common room table"
],
"man's bathroom": [
"shower",
"bathroom sink",
"toilet"
]
},
"The Willows Market and Pharmacy": {
"store": [
"grocery store shelf",
"behind the grocery counter",
"grocery store counter",
"pharmacy store shelf",
"pharmacy store counter",
"behind the pharmacy counter"
]
},
"Harvey Oak Supply Store": {
"supply store": [
"supply store product shelf",
"behind the supply store counter",
"supply store counter"
]
},
"Johnson Park": {
"park": [
"park garden"
]
},
"The Rose and Crown Pub": {
"pub": [
"shelf",
"refrigerator",
"bar customer seating",
"behind the bar counter",
"kitchen sink",
"cooking area",
"microphone"
]
},
"Hobbs Cafe": {
"cafe": [
"refrigerator",
"cafe customer seating",
"cooking area",
"kitchen sink",
"behind the cafe counter",
"piano"
]
}
}
}

View file

@ -0,0 +1,2 @@
{"kw_strength_event": {},
"kw_strength_thought": {}}

View file

@ -0,0 +1,51 @@
{
"vision_r": 8,
"att_bandwidth": 8,
"retention": 8,
"curr_time": null,
"curr_tile": null,
"daily_plan_req": "Maria Lopez spends at least 3 hours a day Twitch streaming or gaming.",
"name": "Maria Lopez",
"first_name": "Maria",
"last_name": "Lopez",
"age": 21,
"innate": "energetic, enthusiastic, inquisitive",
"learned": "Maria Lopez is a student at Oak Hill College studying physics and a part time Twitch game streamer who loves to connect with people and explore new ideas.",
"currently": "Maria Lopez is working on her physics degree and streaming games on Twitch to make some extra money. She visits Hobbs Cafe for studying and eating just about everyday.",
"lifestyle": "Maria Lopez goes to bed around 2am, awakes up around 9am, eats dinner around 6pm. She likes to hang out at Hobbs Cafe if it's before 6pm.",
"living_area": "the Ville:Dorm for Oak Hill College:Maria Lopez's room",
"concept_forget": 100,
"daily_reflection_time": 180,
"daily_reflection_size": 5,
"overlap_reflect_th": 4,
"kw_strg_event_reflect_th": 10,
"kw_strg_thought_reflect_th": 9,
"recency_w": 1,
"relevance_w": 1,
"importance_w": 1,
"recency_decay": 0.99,
"importance_trigger_max": 150,
"importance_trigger_curr": 150,
"importance_ele_n": 0,
"thought_count": 5,
"daily_req": [],
"f_daily_schedule": [],
"f_daily_schedule_hourly_org": [],
"act_address": null,
"act_start_time": null,
"act_duration": null,
"act_description": null,
"act_pronunciatio": null,
"act_event": ["Maria Lopez", null, null],
"act_obj_description": null,
"act_obj_pronunciatio": null,
"act_obj_event": [null, null, null],
"chatting_with": null,
"chat": null,
"chatting_with_buffer": {},
"chatting_end_time": null,
"act_path_set": false,
"planned_path": []
}

View file

@ -0,0 +1,87 @@
{
"the Ville": {
"Oak Hill College": {
"hallway": [],
"library": [
"library sofa",
"library table",
"bookshelf"
],
"classroom": [
"blackboard",
"classroom podium",
"classroom student seating"
]
},
"Dorm for Oak Hill College": {
"garden": [
"dorm garden"
],
"Maria Lopez's room": [
"closet",
"desk",
"bed",
"computer",
"blackboard"
],
"woman's bathroom": [
"toilet",
"shower",
"bathroom sink"
],
"common room": [
"common room sofa",
"pool table",
"common room table"
],
"man's bathroom": [
"shower",
"bathroom sink",
"toilet"
]
},
"The Willows Market and Pharmacy": {
"store": [
"grocery store shelf",
"behind the grocery counter",
"grocery store counter",
"pharmacy store shelf",
"pharmacy store counter",
"behind the pharmacy counter"
]
},
"Harvey Oak Supply Store": {
"supply store": [
"supply store product shelf",
"behind the supply store counter",
"supply store counter"
]
},
"Johnson Park": {
"park": [
"park garden"
]
},
"The Rose and Crown Pub": {
"pub": [
"shelf",
"refrigerator",
"bar customer seating",
"behind the bar counter",
"kitchen sink",
"cooking area",
"microphone"
]
},
"Hobbs Cafe": {
"cafe": [
"refrigerator",
"cafe customer seating",
"cooking area",
"kitchen sink",
"behind the cafe counter",
"piano"
]
}
}
}

View file

@ -0,0 +1,13 @@
{
"fork_sim_code": "base_the_ville_isabella_maria_klaus",
"start_date": "February 13, 2023",
"curr_time": "February 13, 2023, 00:00:00",
"sec_per_step": 10,
"maze_name": "the_ville",
"persona_names": [
"Isabella Rodriguez",
"Maria Lopez",
"Klaus Mueller"
],
"step": 0
}

View file

View file

@ -0,0 +1,8 @@
from ..utils.const import MAZE_ASSET_PATH
from ..maze import Maze
def test_maze_init():
maze = Maze(maze_asset_path=MAZE_ASSET_PATH)

View file

@ -0,0 +1,7 @@
from ..utils.const import STORAGE_PATH
from ..memory.spatial_memory import MemoryTree
def test_spatial_memory():
x = STORAGE_PATH.joinpath("base_the_ville_isabella_maria_klaus\personas\Isabella Rodriguez\bootstrap_memory\spatial_memory.json")
x = MemoryTree(x)
x.print_tree()

View file

@ -6,3 +6,6 @@ from pathlib import Path
ROOT_PATH = Path(__file__).parent.parent
STORAGE_PATH = ROOT_PATH.joinpath("storage")
MAZE_ASSET_PATH = ROOT_PATH.joinpath("static_dirs/assets/the_ville")

View file

@ -6,6 +6,8 @@ from typing import Any
import json
import openai
from pathlib import Path
import csv
from ..prompts.run_gpt_prompts import get_poignancy_action, get_poignancy_chat
def read_json_file(json_file: str, encoding=None) -> list[Any]:
@ -24,10 +26,58 @@ def write_json_file(json_file: str, data: list, encoding=None):
with open(json_file, "w", encoding=encoding) as fout:
json.dump(data, fout, ensure_ascii=False, indent=4)
def embedding_tools(query):
embedding_result = openai.Embedding.create(
model="text-embedding-ada-002",
input=query
)
embedding_key = embedding_result['data'][0]["embedding"]
return embedding_key
return embedding_key
def read_csv_to_list(curr_file: str, header=False, strip_trail=True):
"""
Reads in a csv file to a list of list. If header is True, it returns a
tuple with (header row, all rows)
ARGS:
curr_file: path to the current csv file.
RETURNS:
List of list where the component lists are the rows of the file.
"""
if not header:
analysis_list = []
with open(curr_file) as f_analysis_file:
data_reader = csv.reader(f_analysis_file, delimiter=",")
for count, row in enumerate(data_reader):
if strip_trail:
row = [i.strip() for i in row]
analysis_list += [row]
return analysis_list
else:
analysis_list = []
with open(curr_file) as f_analysis_file:
data_reader = csv.reader(f_analysis_file, delimiter=",")
for count, row in enumerate(data_reader):
if strip_trail:
row = [i.strip() for i in row]
analysis_list += [row]
return analysis_list[0], analysis_list[1:]
def get_embedding(text, model: str="text-embedding-ada-002"):
text = text.replace("\n", " ")
if not text:
text = "this is blank"
return openai.Embedding.create(
input=[text], model=model)['data'][0]['embedding']
def generate_poig_score(scratch, event_type, description):
if "is idle" in description:
return 1
if event_type == "action":
return get_poignancy_action(scratch, description)[0]
elif event_type == "chat":
return get_poignancy_chat(scratch, description)[0]