Examples of BeliefBase


Examples of cz.cuni.mff.abacs.burglar.logics.objects.agents.BeliefBase

  private boolean shouldDraw(Position position) {
    if(! this.isInScreen(position))
      return false;
   
    if(VisualBurglar.FLAG_PLAYER_CONTROL_MODE){
      BeliefBase beliefs = this._map.getBurglar().getBeliefBase();
     
     
     
    //  if(position.isTypeOf(BaseInterface.Type.DOOR)){
    //    int[] rooms = ((Door)position).getRoomIds();
    //    if(beliefs.isKnownRoom(rooms[0]) && beliefs.isKnownRoom(rooms[1]))
    //      return true;
    //  }else{
        if(beliefs.isKnownRoom(position.getRoomId()) || beliefs.isKnownPosition(position))
          return true;
    //  }
      return false;
    }
   
View Full Code Here

Examples of cz.cuni.mff.abacs.burglar.logics.objects.agents.BeliefBase

   
    int x = this._screen.mapXToScreenX(position.getX());
    int y = this._screen.mapYToScreenY(position.getY());
   
   
    BeliefBase burglarBeliefs = this._map.getBurglar().getBeliefBase();
   
    boolean observedRoom = burglarBeliefs.isObservedRoom(position.getRoomId());
   
    if(observedRoom){
      if(VisualBurglar.FLAG_SOLID_BACKGROUND == false){
        this._imgFloor.draw(x, y, GraphicPlayState.SCALE);
      }else{
        graphics.setColor(new Color(255, 255, 102));
        graphics.fillRect(
            x, y,
            VisualBurglar.RESOURCE_BLOCK_SIZE * GraphicPlayState.SCALE,
            VisualBurglar.RESOURCE_BLOCK_SIZE * GraphicPlayState.SCALE
        );
      }
    }else{
      if(VisualBurglar.FLAG_SOLID_BACKGROUND == false){
        this._imgFloor.draw(x, y, GraphicPlayState.SCALE, COLOR_FILTER_MISTAKEN);
      }else{
        graphics.setColor(COLOR_FILTER_MISTAKEN);
        graphics.fillRect(
            x, y,
            VisualBurglar.RESOURCE_BLOCK_SIZE * GraphicPlayState.SCALE,
            VisualBurglar.RESOURCE_BLOCK_SIZE * GraphicPlayState.SCALE
        );
      }
    }
   
    if(position.isTypeOf(BaseInterface.Type.FLOOR))
      return;
   
    if(burglarBeliefs.isKnownPosition(position))
      position = burglarBeliefs.getKnownPosition(position.getId());
    Color filter = COLOR_FILTER_KNOWN;
   
    switch(position.getType()){
    case CAMERA:
      if(((Camera)position).isActive()){
View Full Code Here

Examples of cz.cuni.mff.abacs.burglar.logics.objects.agents.BeliefBase

  private static Element addBeliefBaseXML(
      Agent agent,
      Document doc
  ) {
    Element bBaseElement = doc.createElement(STR_BELIEFBASE);
    BeliefBase bb = agent.getBeliefBase();
    for(Position position : bb.getKnownPositions()){
      Element posElement = generatePositionXML(position, doc);
      bBaseElement.appendChild(posElement);
    }
    return bBaseElement;
  }
View Full Code Here

Examples of cz.cuni.mff.abacs.burglar.logics.objects.agents.BeliefBase

      GameMap map,
      Agent agent,
      List<Integer> roomsToEnter,
      List<Integer> roomsToAvoid
  ) {
    BeliefBase belief = agent.getBeliefBase();
   
    // sort positions by type:
    List<Position> positions = belief.getKnownPositions();
   
    // rooms:
    List<Integer> rooms = map.getRoomIds();
   
    // items:
    List<Item> items = map.getItems();
   
    // TODO
   
    // passive agents:
    List<Agent> passiveAgents = belief.getPassiveAgents();
   
    return generateAgentProblem(
        positions,
        rooms,
        items,
View Full Code Here

Examples of cz.cuni.mff.abacs.burglar.logics.objects.agents.BeliefBase

      // fill the belief base object:
      ifnode.getNodeType() == Node.ELEMENT_NODE &&
        node.getNodeName().equals(STR_BELIEFBASE)
      ){
        Element mind = (Element)node;
        BeliefBase knowledge = burglar.getBeliefBase();
        knowledge.seenFromNear(XMLLoader.getPositions(mind, map));
      }
     
      // fill the inventory:
      ifnode.getNodeType() == Node.ELEMENT_NODE &&
        node.getNodeName().equals(STR_INVENTORY)
View Full Code Here

Examples of cz.cuni.mff.abacs.burglar.logics.objects.agents.BeliefBase

      // fill the belief base object:
      ifnode.getNodeType() == Node.ELEMENT_NODE &&
        node.getNodeName().equals(STR_BELIEFBASE)
      ){
        Element mind = (Element)node;
        BeliefBase knowledge = guard.getBeliefBase();
        knowledge.seenFromNear(XMLLoader.getPositions(mind, map));
      }
     
      // fill the inventory:
      ifnode.getNodeType() == Node.ELEMENT_NODE &&
        node.getNodeName().equals(STR_INVENTORY)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.