This versatile reposity provides simulation environment with OpenAi Gym APIs for Living Architecture System developed by a colaboration with Living Architecture System Group.
At following, we overview what are included in this reposity, and detailed information is provided by each hyper-link.
- LAS-Scenes:
- Royal Ontario Museum (ROM) Exhibit: Transforming Space
- V-REP Scene:
livingArchitecture_ROM_exhibit.ttt
- V-REP Scene:
- Royal Ontario Museum (ROM) Exhibit: Transforming Space
- Environment:
- Living Architecture Environment
- LASEnv.py
- Visitor Environment
- BrightLightExcitedVisitorEnv.py
- RedLightExcitedVisitor_LAS_Env.py
- Living Architecture Environment
- LASAgent:
- Intermediate Internal Environment Classes
- Internal Environment for Single Agent
- Implemented in
InternalEnvOfAgent.py
- Implemented in
- Internal Environment for Agent Community
- Implemented in
InternalEnvOfCommunity.py
- Implemented in
- Internal Environment for Single Agent
- Learning Agent Classes
- Actor-Critic LASAgent
- Implemented in
LASAgent_Actor_Critic.py
- Implemented in
- Random action LASAgent
- Implememted in
RandomLASAgent.py
- Implememted in
- Actor-Critic LASAgent
- Intermediate Internal Environment Classes
- Visitor Agent class:
- Bright-light-excited Visitor who is excited when there is a bright light with intensity >=0.95 in LAS.
- Implemented in:
BrightLightExcitedVisitorAgent.py
- Implemented in:
- Red-light-excited Visitor who is excited when there is a red light being trun on in LAS.
- Implemented in:
RedLightExcitedVisitorAgent.py
- Implemented in:
- Bright-light-excited Visitor who is excited when there is a bright light with intensity >=0.95 in LAS.
In our design, the interaction between LAS and Environment is parallel with the interaction between Visitor and Environment, as shown in Figure 1. These two interactions can run in different process, and the stop of interaction between Visitor and Environment will not affect the interaction between LAS and Environment.
Figure 1. Interaction Pattern
- For Interaction With Virtual Environment
- Step 1: Run the Simulating Scene in V-REP
- Step 2: Run Python Script - Interaction between LAS-Agent and Environment
- General Framework
- Instantiate LAS Environment Object
- Instantiate LAS Agent Object
- Interaction in while loop
- Example Script:
- Non-distributed Single Giant LAS Agent:
Interaction_Single_Agent_and_Env.py
- Distributed Multi-agent:
Interaction_Distributed_Agent_Community_and_Env.py
- Random LAS Agent:
Interaction_RandomLASAgent_and_Env.py
- Non-distributed Single Giant LAS Agent:
- General Framework
- Step 3: Run Python Script - Interaction between Visitor-Agent and Environment
- General Framework
- Instantiate Visitor Environment Object
- Instantiate Visitor Agent Object
- Interaction in while loop
- Example Scritp:
- Bright-light-excited Visitor Agent:
Interaction_Multi_BrightLightExcitedVisitor_and_Env.py
- Bright-light-excited Visitor Agent:
- General Framework
- For Interaction With Real Environment: For LAS Agent, the only difference when interacting with real environment is in the receiving of observation and delivering of action. And for real environment, visitor is physical humanbody. Therefore, we only need to consider Python Script - Interaction between LAS-Agent and Environment.
- General Framework:
- Instantiate LAS Agent Object
- Interaction in while loop
- Overall framework for this script:
- General Framework:
# Instatiate LAS-Agent
agent = InternalEnvOfAgent(...)
try:
# Interaction loop
while True:
TODO: <Note(Integration): "observation = get_observation()">
take_action_flag, action = agent.feed_observation(observation)
if take_action_flag == True:
TODO: <Note(Integration): "take_action(action)">
except KeyboardInterrupt:
agent.stop()
When interacting with real or virtual environment, all data will be saved in directory ../ROM_Experiment_results/
i.e. sub-directory ROM_Experiment_results
of the parent directory of interaction_script
.
- Organization Meta-Data
- For non-distributed single giant agent:
- ROM_Experiment_results
- LAS_Single_Agent
- interaction_data
- models
- summary
- LAS_Single_Agent
- ROM_Experiment_results
- For distributed multi-agent:
- ROM_Experiment_results
- LAS_Agent_Community
- interaction_data
- LAS_Agent_Community_agent_1
- interaction_data
- models
- summary
- LAS_Agent_Community_agent_2
- interaction_data
- models
- summary
- LAS_Agent_Community_agent_3
- interaction_data
- models
- summary
- LAS_Agent_Community
- ROM_Experiment_results
- For non-distributed single giant agent:
- Visualize Meta-Data: The visualization of meta-data is done by utilizing TensorBoard.
- General:
tensorboard --logdir name1:/path/to/logs/1,name2:/path/to/logs/2
(For more details on how to use tensorboard, please checktensorboard --helpfull
) - Example:
tensorboard --logdir agent_community_agent1:path/to/ROM_Experiment_results/LAS_Agent_Community_agent_1/summary,agent_community_agent2:path/to/ROM_Experiment_results/LAS_Agent_Community_agent_2/summary,agent_community_agent3:path/to/ROM_Experiment_results/LAS_Agent_Community_agent_3/summary,agent_community_agent3:path/to/ROM_Experiment_results/LAS_Agent_Community_agent_1/summary,agent_community_agent2:path/to/ROM_Experiment_results/LAS_Agent_Community_agent_3/summary,single_agent:path/to/ROM_Experiment_results/LAS_Single_Agent/summary
- General:
- OpenAi gym package:
pip install gym
- Tensorflow