aima.core.environment.vacuum.FullyObservableVacuumEnvironmentPerceptToStateFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aima-core Show documentation
Show all versions of aima-core Show documentation
AIMA-Java Core Algorithms from the book Artificial Intelligence a Modern Approach 3rd Ed.
package aima.core.environment.vacuum;
import aima.core.agent.Percept;
import aima.core.search.framework.PerceptToStateFunction;
/**
* Map fully observable state percepts to their corresponding state
* representation.
*
* @author Andrew Brown
*/
public class FullyObservableVacuumEnvironmentPerceptToStateFunction implements
PerceptToStateFunction {
/**
* Default Constructor.
*/
public FullyObservableVacuumEnvironmentPerceptToStateFunction() {
}
@Override
public Object getState(Percept p) {
// Note: VacuumEnvironmentState implements
// FullyObservableVacuumEnvironmentPercept
return (VacuumEnvironmentState) p;
}
}