Package ise.mace.tokens

Examples of ise.mace.tokens.AgentType


    if (ordinal == AgentType.values().length)
    {
      ordinal = 0;
    }

    AgentType type = AgentType.values()[ordinal++];

    if (!type.equals(AgentType.NOSTRATEGY))
    {
      return type;
    }
    return nextAgentType();
  }
View Full Code Here


    //Distinguish between stag (cooperate) and rabbit (defect)
    foodArray = this.getFoodTypes();
    cooperateFood = foodArray.get(0);
    defectFood = foodArray.get(1);

    AgentType group_type = null;

    //Each group must have a representative in the special group. If this
    //doesn't happen then something wrong is going on!
    if (getConn().getGroupById(this.getDataModel().getName()) == null)
    {
View Full Code Here

    if (currentPanel.isEmpty() || (currentPanel.contains(getDataModel().getId())))
      return null;

    //Get the preferred strategy for an agent i.e. its type and the strategy adopted by the panel
    //Positive or negative rating depends on the similarity of these two strategies
    AgentType groupStrategy = getConn().getGroupById(groupID).getGroupStrategy();
    AgentType followerStrategy = getDataModel().getAgentType();

    //The rating weighting is a simple function of the group's population
    int population = getConn().getGroupById(groupID).getMemberList().size();
    double rating = 1 / population;
View Full Code Here

   */
  @Override
  protected Tuple<AgentType, Double> makePayments()
  {
    double currentFoodReserve;
    AgentType strategy = getDataModel().getGroupStrategy();

    currentFoodReserve = getDataModel().getCurrentReservedFood();

    if (this.getDataModel().getReservedFoodHistory().size() < 3)
      return new Tuple<AgentType, Double>(strategy, 200.0);
View Full Code Here

   */
  @Override
  protected Tuple<AgentType, Double> makePayments()
  {
    double currentFoodReserve;
    AgentType strategy = getDataModel().getGroupStrategy();

    currentFoodReserve = getDataModel().getCurrentReservedFood();

    if (this.getDataModel().getReservedFoodHistory().size() < 3)
      return new Tuple<AgentType, Double>(strategy, 200.0);
View Full Code Here

    }
  }

  private void doLeadersHunt()
  {
    AgentType strategy = decideGroupStrategy();
    this.dm.setGroupStrategy(strategy);

    Tuple<AgentType, Double> finalStrategy = makePayments();
    if (finalStrategy.getValue() != getDataModel().getCurrentReservedFood())
    {
View Full Code Here

    if (currentPanel.isEmpty() || (currentPanel.contains(getDataModel().getId())))
      return null;

    //Get the preferred strategy for an agent i.e. its type and the strategy adopted by the panel
    //Positive or negative rating depends on the similarity of these two strategies
    AgentType groupStrategy = getConn().getGroupById(groupID).getGroupStrategy();
    AgentType followerStrategy = getDataModel().getAgentType();

    //The rating weighting is a simple function of the group's population
    int population = getConn().getGroupById(groupID).getMemberList().size();
    double rating = 1 / population;
View Full Code Here

    if (currentPanel.isEmpty() || (currentPanel.contains(getDataModel().getId())))
      return null;

    //Get the preferred strategy for an agent i.e. its type and the strategy adopted by the panel
    //Positive or negative rating depends on the similarity of these two strategies
    AgentType groupStrategy = getConn().getGroupById(groupID).getGroupStrategy();
    AgentType followerStrategy = getDataModel().getAgentType();

    //The rating weighting is a simple function of the group's population
    int population = getConn().getGroupById(groupID).getMemberList().size();
    double rating = 1 / population;
View Full Code Here

TOP

Related Classes of ise.mace.tokens.AgentType

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.