Package aima.core.agent

Examples of aima.core.agent.Agent


  }

  public void addEnvironmentObject(EnvironmentObject eo) {
    envObjects.add(eo);
    if (eo instanceof Agent) {
      Agent a = (Agent) eo;
      if (!agents.contains(a)) {
        agents.add(a);
        this.updateEnvironmentViewsAgentAdded(a);
      }
    }
View Full Code Here


      MapNode node = marks.get(i);
      Point2D pt = new Point2D(node.getLon(), node.getLat());
      locs[i] = map.getNearestLocation(pt);
    }
    heuristic.adaptToGoal(locs[1], map);
    Agent agent = null;
    MapAgentFrame.SelectionState state = frame.getSelection();
    switch (state.getValue(MapAgentFrame.AGENT_SEL)) {
    case 0:
      agent = new MapAgent(map, env, search, new String[] { locs[1] });
      break;
View Full Code Here

    Graphics2D g2 = (Graphics2D) g;
    g2.setBackground(Color.white);
    g2.clearRect(0, 0, getWidth(), getHeight());
    for (int i = 0; i < locations.size(); i++) {
      String location = locations.get(i);
      Agent agent = getAgent(location);
      if (isDirty(location)) {
        g2.setColor(Color.LIGHT_GRAY);
        g2.fillRect(x(11 * i), y(0), scale(10), scale(10));
      }
      g2.setColor(Color.black);
View Full Code Here

    // create environment with random state of cleaning.
    Environment env = new VacuumEnvironment();
    EnvironmentView view = new SimpleEnvironmentView();
    env.addEnvironmentView(view);
   
    Agent a = null;
    a = new ModelBasedReflexVacuumAgent();
    // a = new ReflexVacuumAgent();
    // a = new SimpleReflexVacuumAgent();
    // a = new TableDrivenVacuumAgent();
   
View Full Code Here

        MapNode node = marks.get(i);
        Point2D pt = new Point2D(node.getLon(), node.getLat());
        locs[i] = map.getNearestLocation(pt);
      }
      heuristic.adaptToGoal(locs[1], map);
      Agent agent = null;
      MapAgentFrame.SelectionState state = frame.getSelection();
      switch (state.getValue(MapAgentFrame.AGENT_SEL)) {
      case 0:
        agent = new SDMapAgent(env, search, new String[] { locs[1] });
        break;
View Full Code Here

TOP

Related Classes of aima.core.agent.Agent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.