coopihc.inference.BaseInferenceEngine.BaseInferenceEngine
- class BaseInferenceEngine(*args, buffer_depth=1, **kwargs)[source]
- Bases: - object- The base Inference Engine from which other engines can be defined. This engine does nothing but return the same state. Any new inference method can subclass - InferenceEngineto have a buffer and- add_observationmethod (required by the bundle)- Parameters
- buffer_depth (int, optional) – number of observations that are stored, defaults to 1 
 - Methods - add observation - Bind function to the engine with a given name. - Apply this decorator to use self.agent_observation as default value to infer from if agent_observation = None - infer- render- reset _summary_ - Attributes - The agent's last action - host- The last observation. - role- The current agent state - unwrapped- add_observation(observation)[source]
- add observation - Add an observation to a buffer. If the buffer does not exist, create a naive buffer. The buffer has a size given by buffer length - Parameters
- observation ( - State) – observation produced by an engine
 
 - bind(func, as_name=None)[source]
- Bind function to the engine with a given name. If as_name is None, then the func name is used. - Parameters
- func (function) – function to bind 
- as_name (string, optional) – name of resulting method, defaults to None 
 
- Returns
- bound method 
- Return type
- method 
 
 - default_value()[source]
- Apply this decorator to use self.agent_observation as default value to infer from if agent_observation = None