public override IPercept getPerceptSeenBy(IAgent anAgent) { if (anAgent is NondeterministicVacuumAgent) { // This agent expects a fully observable environment. It gets a clone of the environment state. return(envState.Clone()); } // Other agents get a local percept. string loc = envState.getAgentLocation(anAgent); return(new LocalVacuumEnvironmentPercept(loc, envState.getLocationState(loc))); }