Add initial setup for TinyTroupe simulation: environment, agents, configuration, and example world interaction
This commit is contained in:
21
agents.py
Normal file
21
agents.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
from tinytroupe.agent import TinyPerson
|
||||
|
||||
# These are the agents that are loaded into TinyWorlds
|
||||
|
||||
def create_aisha():
|
||||
return TinyPerson.load_specification(load_agent_spec("Aisha"))
|
||||
|
||||
def create_diego():
|
||||
return TinyPerson.load_specification(load_agent_spec("Diego"))
|
||||
|
||||
def create_elena():
|
||||
return TinyPerson.load_specification(load_agent_spec("Elena"))
|
||||
|
||||
def create_nakamura():
|
||||
return TinyPerson.load_specification(load_agent_spec("Nakamura"))
|
||||
|
||||
def load_agent_spec(name):
|
||||
return json.load(open(os.path.join(os.path.dirname(__file__), f'./agents/{name}.agent.json')))
|
Reference in New Issue
Block a user