Esempio n. 1
0
 def env_func(artfile):
     env = make_pacman_env(layout_file,
                           ghost_type,
                           encode_onehot=encode_onehot)
     if render:
         env = RenderEnv(env)
     return env
Esempio n. 2
0
 def env_func(artfile):
     env = make_warehouse_env(artfile,
                              boxes=boxes,
                              buckets=buckets,
                              bucket_to_boxes=bucket_to_boxes,
                              character_map=character_map,
                              encode_onehot=encode_onehot)
     if render:
         env = RenderEnv(env)
     return env
Esempio n. 3
0
 def env_func(artfile):
     env = make_pacman_env(layout_file, ghost_type, encode_onehot=False)
     env = MapEnv(env, {entity: i for i, entity in enumerate(kg_entities)})
     env = GraphEnv(env=env,
                    KG=KG,
                    num_entities=len(kg_entities),
                    num_node_feats=num_node_feats,
                    num_edge_feats=num_edge_feats,
                    dont_crop_adj=dont_crop_adj)
     if render:
         env = RenderEnv(env)
     return env
Esempio n. 4
0
def build_env(artfiles, render):
    kg_entities, KG, num_node_feats, num_edge_feats = make_warehouse_knowledge_graph(
    )
    env = make_sampled_warehouse_env(artfiles, encode_onehot=False)
    env = MapEnv(env, {entity: i for i, entity in enumerate(kg_entities)})
    env = GraphEnv(env=env,
                   KG=KG,
                   num_entities=len(kg_entities),
                   num_node_feats=num_node_feats,
                   num_edge_feats=num_edge_feats)
    if render:
        env = RenderEnv(env)
    return env
Esempio n. 5
0
 def env_func(artfile):
     env = make_warehouse_env(artfile,
                              boxes=boxes,
                              buckets=buckets,
                              bucket_to_boxes=bucket_to_boxes,
                              character_map=character_map,
                              encode_onehot=encode_onehot)
     env = MapEnv(env, {entity: i for i, entity in enumerate(kg_entities)})
     env = GraphEnv(env=env,
                    KG=KG,
                    num_entities=len(kg_entities),
                    num_node_feats=num_node_feats,
                    num_edge_feats=num_edge_feats,
                    dont_crop_adj=dont_crop_adj)
     if render:
         env = RenderEnv(env)
     return env
def build_env(env):
    render = env.pop('render')
    env = PacmanEnv(**env)
    if render:
        env = RenderEnv(env)
    return env
Esempio n. 7
0
def build_env(artfile, render):
    env = make_coins_maze_env(artfile, encode_onehot=True)
    if render:
        env = RenderEnv(env)
    return env
Esempio n. 8
0
def build_env(artfiles, render):
    env = make_sampled_warehouse_env(artfiles, encode_onehot=True)
    if render:
        env = RenderEnv(env)
    return env