001 package aima.search.map; 002 003 004 /** 005 * A scenario specifies an environment, the agent's knowledge about the 006 * environment, and the agents initial location. It can be used to specify 007 * settings for route planning agent applications. 008 * 009 * @author R. Lunde 010 */ 011 public class Scenario { 012 /** 013 * A map-based environment. Note that the contained map must be of type 014 * {@link ExtendableMap}. 015 */ 016 private final MapEnvironment env; 017 /** A map reflecting the knowledge of the agent about the environment. */ 018 private final Map agentMap; 019 /** Initial location of the agent. */ 020 private final String initAgentLoc; 021 022 /** 023 * Creates a scenario. 024 * 025 * @param env 026 * a map-based environment. Note that the contained map must be 027 * of type {@link ExtendableMap} 028 * @param agentMap 029 * a map reflecting the knowledge of the agent about the 030 * environment 031 * @param agentLoc 032 * initial location of the agent 033 */ 034 public Scenario(MapEnvironment env, Map agentMap, String agentLoc) { 035 this.agentMap = agentMap; 036 this.env = env; 037 this.initAgentLoc = agentLoc; 038 } 039 040 public MapEnvironment getEnv() { 041 return env; 042 } 043 044 public Map getEnvMap() { 045 return env.getMap(); 046 } 047 048 public Map getAgentMap() { 049 return agentMap; 050 } 051 052 public String getInitAgentLocation() { 053 return initAgentLoc; 054 } 055 }