physis.core.task
Interface Task

All Known Implementing Classes:
TaskAdapter

public interface Task

It represents a task, more specifically a function. The arguments and resulted values are integers.


Method Summary
 void changeBonuses(double multiplier)
          Multiplies the bonuses via multiplying the bonus's part above 1.0.
 boolean checkActivity(int[] input, int[] output)
          Checks an IO activity whether it performs the represented task.
 int getCounter()
          Gets the value of task counter.
 int getID()
          Returns the internal ID of the task.
 int getInputSize()
          Returns the number of input arguments.
 double getMeritMultiplier(int nth)
          Returns the merit multiplier when the task is performed.
 java.lang.String getName()
          Name specification: groupname_idname_inputnumber_outputnumber
 int getNumberOfRewardedPerforms()
          Not all executions of a task are rewarded.
 int getOutputSize()
          Returns the number of generated values.
 void increaseCounter()
          If the task is performed, the counter should be increased.
 void setID(int id)
          Sets the internal ID
 void setMeritMultipliers(double[] meritmultipliers)
          Sets the meritmultipliers.
 boolean shouldBeCleared()
          Answers the question: Should the I/O-buffer (@see Metabolism) be cleared after completing this task.
 

Method Detail

getInputSize

public int getInputSize()
Returns the number of input arguments.

getOutputSize

public int getOutputSize()
Returns the number of generated values.

checkActivity

public boolean checkActivity(int[] input,
                             int[] output)
Checks an IO activity whether it performs the represented task.

getMeritMultiplier

public double getMeritMultiplier(int nth)
Returns the merit multiplier when the task is performed.
Parameters:
nth - The number indicating how many times the task was performed.

setMeritMultipliers

public void setMeritMultipliers(double[] meritmultipliers)
Sets the meritmultipliers.

getNumberOfRewardedPerforms

public int getNumberOfRewardedPerforms()
Not all executions of a task are rewarded. It's easy to repeat, but it's hard to invent.

changeBonuses

public void changeBonuses(double multiplier)
Multiplies the bonuses via multiplying the bonus's part above 1.0.

shouldBeCleared

public boolean shouldBeCleared()
Answers the question: Should the I/O-buffer (@see Metabolism) be cleared after completing this task.

increaseCounter

public void increaseCounter()
If the task is performed, the counter should be increased.

getCounter

public int getCounter()
Gets the value of task counter. It means that the task was performed this many times.

getName

public java.lang.String getName()
Name specification: groupname_idname_inputnumber_outputnumber

getID

public int getID()
Returns the internal ID of the task. This ID is set by TaskFactory. The ID used int the organism's performed tasks table.

setID

public void setID(int id)
Sets the internal ID