Beispiel #1
0
 def all_vocab(self, opts):
     game_opts = opts['game_opts']
     vocab = []
     vocab.append('info')
     vocab.append('go')
     vocab.append('visit')
     vocab.append('all')
     vocab.append('excluding')
     vocab.append('avoid')
     vocab.append('switch')
     vocab.append('cycle_switch')
     vocab.append('block')
     vocab.append('water')
     vocab.append('agent')
     vocab.append('agent0')
     vocab.append('goal')
     vocab.append('visited')
     for s in range(game_opts['ncolors'].max_possible()):
         vocab.append('color' + str(s))
     for s in range(game_opts['ngoals'].max_possible()):
         vocab.append('goal' + str(s))
     for s in range(game_opts['ngoals_active'].max_possible()):
         vocab.append('obj' + str(s))
     feat_opts = opts.get('featurizer')
     if (feat_opts is not None) and feat_opts.get('abs_loc_vocab'):
         gf.add_absolute_loc_vocab(vocab, game_opts)
     return vocab
Beispiel #2
0
 def all_vocab(self, opts):
     game_opts = opts['game_opts']
     vocab = []
     vocab.append('info')
     vocab.append('corner')
     vocab.append('obj0')
     vocab.append('at')
     vocab.append('go')
     vocab.append('absolute')
     vocab.append('block')
     vocab.append('water')
     vocab.append('agent')
     vocab.append('agent0')
     gf.add_absolute_loc_vocab(vocab, game_opts)
     for s in range(game_opts['ngoals'].max_possible()):
         vocab.append('goal' + str(s))
     return vocab
Beispiel #3
0
 def all_vocab(self, opts):
     game_opts = opts['game_opts']
     vocab = []
     vocab.append('info')
     vocab.append('switch')
     vocab.append('pushable_block')
     vocab.append('cycle_switch')
     vocab.append('block')
     vocab.append('water')
     vocab.append('agent')
     vocab.append('agent0')
     for s in range(game_opts['ncolors'].max_possible()):
         vocab.append('color' + str(s))
     feat_opts = opts.get('featurizer')
     if (feat_opts is not None) and feat_opts.get('abs_loc_vocab'):
         gf.add_absolute_loc_vocab(vocab, game_opts)
     return vocab
Beispiel #4
0
 def all_vocab(self, opts):
     game_opts = opts['game_opts']
     vocab = []
     vocab.append('info')
     vocab.append('corner')
     vocab.append('obj0')
     vocab.append('go')
     vocab.append('absolute')
     vocab.append('block')
     vocab.append('water')
     vocab.append('agent')
     vocab.append('agent0')
     feat_opts = opts.get('featurizer')
     if (feat_opts is not None) and feat_opts.get('abs_loc_vocab'):
         gf.add_absolute_loc_vocab(vocab, game_opts)
     if game_opts.get('fixed_goal'):
         if game_opts['fixed_goal'].generate() == True:
             vocab.append('ax0y0')
     else: #need to add names for goal coordinates
         gf.add_absolute_loc_vocab(vocab, game_opts)
     return vocab