예제 #1
0
 def register(cls, id, entry_point, **kwargs):
     if id in Experience.experience.keys():
         raise Exception('Cannot re-register id: {}'.format(id))
     Experience.experience[id] = ClassSpec(id, entry_point, **kwargs)
예제 #2
0
 def register(cls, id, entry_point, **kwargs):
     if id in ExplorationProcess.process.keys():
         raise Exception('Cannot re-register id: {}'.format(id))
     ExplorationProcess.process[id] = ClassSpec(id, entry_point, **kwargs)
예제 #3
0
파일: agent.py 프로젝트: supershun1978/marl
 def register(cls, id, entry_point, **kwargs):
     if id in Agent.agents.keys():
         raise Exception('Cannot re-register id: {}'.format(id))
     Agent.agents[id] = ClassSpec(id, entry_point, **kwargs)
예제 #4
0
 def register(cls, id, entry_point, **kwargs):
     if id in Policy.policy.keys():
         raise Exception("Cannot re-register id: {}".format(id))
     Policy.policy[id] = ClassSpec(id, entry_point, **kwargs)
예제 #5
0
파일: model.py 프로젝트: supershun1978/marl
 def register(cls, id, entry_point, **kwargs):
     if id in Model.model.keys():
         raise Exception('Cannot re-register id: {}'.format(id))
     Model.model[id] = ClassSpec(id, entry_point, **kwargs)