original_docstring: 
          Generates the outputs for all programs and order them. The team checks if the first 
          action is valid before submitting it to the environment. If it is not valid, then 
          the second best action will be tried, and so on until a valid action is obtained.
          
docstring: Generates the outputs for all programs and order them. The team checks if the first
  action is valid before submitting it to the environment. If it is not valid, then
  the second best action will be tried, and so on until a valid action is obtained.
docstring_tokens: Generates the outputs for all programs and order them . The team checks if the first action is valid before submitting it to the environment . If it is not valid then the second best action will be tried and so on until a valid action is obtained .
code: def _select_program(self, inputs, valid_actions, force_reset):
          """
          Generates the outputs for all programs and order them. The team checks if the first 
          action is valid before submitting it to the environment. If it is not valid, then 
          the second best action will be tried, and so on until a valid action is obtained.
          """
          partial_outputs = []
          valid_programs = []
          for program in self.programs:
              actions = program.get_raw_actions()
              possible_action = set(actions).intersection(valid_actions)
              if len(possible_action) > 0:
                  partial_outputs.append(program.execute(inputs, force_reset))
                  valid_programs.append(program)
          selected_program = valid_programs[partial_outputs.index(max(partial_outputs))]
          return selected_program
code_tokens: def _select_program ( self , inputs , valid_actions , force_reset ) : partial_outputs = [ ] valid_programs = [ ] for program in self . programs : actions = program . get_raw_actions ( ) possible_action = set ( actions ) . intersection ( valid_actions ) if len ( possible_action ) > 0 : partial_outputs . append ( program . execute ( inputs , force_reset ) ) valid_programs . append ( program ) selected_program = valid_programs [ partial_outputs . index ( max ( partial_outputs ) ) ] return selected_program
short_docstring: Generates the outputs for all programs and order them.
short_docstring_tokens: Generates the outputs for all programs and order them .
comment: """
          Generates the outputs for all programs and order them. The team checks if the first 
          action is valid before submitting it to the environment. If it is not valid, then 
          the second best action will be tried, and so on until a valid action is obtained.
          """