examples/src/main/java/io/github/agentsoz/jill/example/greeter/Greeter.java
@Override
  public void start(PrintStream writer, String[] params) {
    // Parse the arguments
    parse(params);

    // Create a new belief set about neighbours
    BeliefSetField[] fields = {new BeliefSetField("name", String.class, true),
        new BeliefSetField("gender", String.class, false),};

    try {
      // Attach this belief set to this agent
      this.createBeliefSet(beliefset, fields);

      // Add beliefs about neighbours
      registerNeighbours(rand, numNeighbours);
      Log.debug("Agent " + getName() + " is initialising with " + numNeighbours + " neighbours");

      // Post the goal to be friendly
      post(new BeFriendly("BeFriendly"));
    } catch (BeliefBaseException e) {
      Log.error(e.getMessage());
    }
  }
@Override
  public void start(PrintStream writer, String[] params) {
    // Parse the arguments
    parse(params);

    // Create a new belief set about neighbours
    BeliefSetField[] fields = {new BeliefSetField("name", String.class, true),
        new BeliefSetField("gender", String.class, false),};

    try {
      // Attach this belief set to this agent
      this.createBeliefSet(beliefset, fields);

      // Add beliefs about neighbours
      registerNeighbours(rand, numNeighbours);
      Log.debug("Agent " + getName() + " is initialising with " + numNeighbours + " neighbours");

      // Post the goal to be friendly
      post(new BeFriendly("BeFriendly"));
    } catch (BeliefBaseException e) {
      Log.error(e.getMessage());
    }
  }
@ Override public void start ( PrintStream writer , String [ ] params ) { // Parse the arguments parse ( params ) ; // Create a new belief set about neighbours BeliefSetField [ ] fields = { new BeliefSetField ( "name" , String . class , true ) , new BeliefSetField ( "gender" , String . class , false ) , } ; try { // Attach this belief set to this agent this . createBeliefSet ( beliefset , fields ) ; // Add beliefs about neighbours registerNeighbours ( rand , numNeighbours ) ; Log . debug ( "Agent " + getName ( ) + " is initialising with " + numNeighbours + " neighbours" ) ; // Post the goal to be friendly post ( new BeFriendly ( "BeFriendly" ) ) ; } catch ( BeliefBaseException e ) { Log . error ( e . getMessage ( ) ) ; } }
{@inheritDoc}.
{