Spaces:
Running
Running
File size: 1,260 Bytes
be5548b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
#!/usr/bin/env python3
import argparse
from utils import *
parser = argparse.ArgumentParser()
parser.add_argument(
"--env",
help="gym environment to load",
default='SocialAI-DrawingEnv-v1',
)
parser.add_argument(
"--seed",
type=int,
help="random seed to generate the environment with",
default=-1
)
parser.add_argument(
"--tile_size",
type=int,
help="size at which to render tiles",
default=32
)
# Put all env related arguments after --env_args, e.g. --env_args nb_foo 1 is_bar True
parser.add_argument("--env-args", nargs='*', default=None)
args = parser.parse_args()
env = gym.make(args.env, **env_args_str_to_dict(args.env_args))
# draw tree
env.parameter_tree.draw_tree(
filename="viz/SocialAIParam/{}_raw_tree".format(args.env),
ignore_labels=["Num_of_colors"],
folded_nodes=["Collaboration", "AppleStealing"],
label_parser={
"AppleStealing": "Adversarial",
"Pragmatic_frame_complexity": "Introductory_sequence",
},
selected_parameters={
"Env_type": "Information_seeking",
"Pragmatic_frame_complexity": "Eye_contact",
"Peer_help": "N",
"Cue_type": "Pointing",
"Problem": "Doors",
"N": "1",
"Peer": "N",
}
)
|