Package com.tnsai.environment
Class CompositeEnvironment
java.lang.Object
com.tnsai.environment.CompositeEnvironment
- All Implemented Interfaces:
Environment
Combines multiple environments into a single view.
Perception merges data from all sub-environments. Actions are routed to the first environment that handles them.
-
Constructor Details
-
CompositeEnvironment
-
-
Method Details
-
perceive
Description copied from interface:EnvironmentAgent perceives the current state of the environment.- Specified by:
perceivein interfaceEnvironment- Returns:
- the current percept from the environment
-
act
Description copied from interface:EnvironmentAgent acts on the environment.- Specified by:
actin interfaceEnvironment- Parameters:
actionName- the action to performparameters- action parameters- Returns:
- the outcome of the action
-
onChange
Description copied from interface:EnvironmentRegisters a listener for environment changes.- Specified by:
onChangein interfaceEnvironment- Parameters:
listener- called when the environment changes
-
getName
Description copied from interface:EnvironmentGets the environment name/type.- Specified by:
getNamein interfaceEnvironment
-