def __init__(self, env, handle, name, port, sample_buffer_capacity=1000,
                 RLModel=None, **kwargs):
        """
        Parameters
        ----------
        env: environment
        handle: group handle
        name: str
            name of the model (be used when store model)
        port: int
            port of socket or suffix of pipe
        sample_buffer_capacity: int
            the maximum number of samples (s,r,a,s') to collect in a game round
        RLModel: BaseModel
            the RL algorithm class
        kwargs: dict
            arguments for RLModel
        """
        BaseModel.__init__(self, env, handle)

        assert RLModel is not None

        kwargs['env'] = env
        kwargs['handle'] = handle
        kwargs['name'] = name
        addr = 'magent-pipe-' + str(port)  # named pipe
        # addr = ('localhost', port) # socket
        proc = multiprocessing.Process(
            target=model_client,
            args=(addr, sample_buffer_capacity, RLModel, kwargs),
        )

        self.client_proc = proc
        proc.start()
        listener = multiprocessing.connection.Listener(addr)
        self.conn = listener.accept()

        Parameters
        ----------
        env: environment
        handle: group handle
        name: str
            name of the model (be used when store model)
        port: int
            port of socket or suffix of pipe
        sample_buffer_capacity: int
            the maximum number of samples (s,r,a,s') to collect in a game round
        RLModel: BaseModel
            the RL algorithm class
        kwargs: dict
            arguments for RLModel
        
python/magent/model.py