public class Head extends AbstractHead
Constructor and Description |
---|
Head(World world)
Instantiates a new head.
|
Modifier and Type | Method and Description |
---|---|
void |
changeOracleConnection()
Change oracle connection.
|
void |
computeAMessage(Message m)
Compute A message.
|
double |
getAction()
Gets the action.
|
java.util.ArrayList<Context> |
getActiveContexts()
Gets the active contexts.
|
double |
getAugmentationFactorError()
Gets the augmentation factor error.
|
double |
getAugmentationInexactError()
Gets the augmentation inexact error.
|
double |
getAveragePredictionCriticity()
Gets the average prediction criticity.
|
int |
getAveragePredictionCriticityWeight()
Gets the average prediction criticity weight.
|
Context |
getBestContext()
Gets the best context.
|
java.util.ArrayList<Context> |
getContexts()
Gets the contexts.
|
double |
getCriticity()
Gets the criticity.
|
double |
getCriticity(Context context)
Gets the criticity.
|
double |
getDiminutionFactorError()
Gets the diminution factor error.
|
double |
getDiminutionInexactError()
Gets the diminution inexact error.
|
double |
getErrorAllowed()
Gets the error allowed.
|
java.lang.String |
getFunctionSelected()
Gets the function selected.
|
double |
getInexactAllowed()
Gets the inexact allowed.
|
Context |
getLastUsedContext()
Gets the last used context.
|
double |
getMinErrorAllowed()
Gets the min error allowed.
|
double |
getMinInexactAllowed()
Gets the min inexact allowed.
|
int |
getnConflictBeforeAugmentation()
Gets the n conflict before augmentation.
|
int |
getnConflictBeforeInexactAugmentation()
Gets the n conflict before inexact augmentation.
|
Context |
getNewContext()
Gets the new context.
|
boolean |
getNoBestContext()
Gets the no best context.
|
int |
getnPropositionsReceived()
Gets the n propositions received.
|
int |
getnSuccessBeforeDiminution()
Gets the n success before diminution.
|
int |
getnSuccessBeforeInexactDiminution()
Gets the n success before inexact diminution.
|
double |
getOldCriticity()
Gets the old criticity.
|
double |
getOldOracleValue()
Gets the old oracle value.
|
BlackBoxAgent |
getOracle()
Gets the oracle.
|
double |
getOracleValue()
Gets the oracle value.
|
double |
getPrediction()
Gets the prediction.
|
java.util.ArrayList<? extends Agent> |
getTargets()
Gets the targets.
|
boolean |
isContextFromPropositionWasSelected()
Checks if is context from proposition was selected.
|
boolean |
isNewContextWasCreated()
Checks if is new context was created.
|
boolean |
isNoCreation()
Checks if is no creation.
|
void |
play()
The core method of the head agent.
|
void |
setAction(double action)
Sets the action.
|
void |
setAugmentationFactorError(double augmentationFactorError)
Sets the augmentation factor error.
|
void |
setAugmentationInexactError(double augmentationInexactError)
Sets the augmentation inexact error.
|
void |
setAveragePredictionCriticity(double averagePredictionCriticity)
Sets the average prediction criticity.
|
void |
setAveragePredictionCriticityWeight(int averagePredictionCriticityWeight)
Sets the average prediction criticity weight.
|
void |
setBestContext(Context bestContext)
Sets the best context.
|
void |
setContextFromPropositionWasSelected(boolean contextFromPropositionWasSelected)
Sets the context from proposition was selected.
|
void |
setContexts(java.util.ArrayList<Context> contexts)
Sets the contexts.
|
void |
setCriticity(double criticity)
Sets the criticity.
|
void |
setDataForErrorMargin(double errorAllowed,
double augmentationFactorError,
double diminutionFactorError,
double minErrorAllowed,
int nConflictBeforeAugmentation,
int nSuccessBeforeDiminution)
Sets the data for error margin.
|
void |
setDataForInexactMargin(double inexactAllowed,
double augmentationInexactError,
double diminutionInexactError,
double minInexactAllowed,
int nConflictBeforeInexactAugmentation,
int nSuccessBeforeInexactDiminution)
Sets the data for inexact margin.
|
void |
setDiminutionFactorError(double diminutionFactorError)
Sets the diminution factor error.
|
void |
setDiminutionInexactError(double diminutionInexactError)
Sets the diminution inexact error.
|
void |
setErrorAllowed(double errorAllowed)
Sets the error allowed.
|
void |
setFunctionSelected(java.lang.String functionSelected)
Sets the function selected.
|
void |
setInexactAllowed(double inexactAllowed)
Sets the inexact allowed.
|
void |
setLastUsedContext(Context lastUsedContext)
Sets the last used context.
|
void |
setMinErrorAllowed(double minErrorAllowed)
Sets the min error allowed.
|
void |
setMinInexactAllowed(double minInexactAllowed)
Sets the min inexact allowed.
|
void |
setnConflictBeforeAugmentation(int nConflictBeforeAugmentation)
Sets the n conflict before augmentation.
|
void |
setnConflictBeforeInexactAugmentation(int nConflictBeforeInexactAugmentation)
Sets the n conflict before inexact augmentation.
|
void |
setNewContext(Context newContext)
Sets the new context.
|
void |
setNoCreation(boolean noCreation)
Sets the no creation.
|
void |
setnPropositionsReceived(int nPropositionsReceived)
Sets the n propositions received.
|
void |
setnSuccessBeforeDiminution(int nSuccessBeforeDiminution)
Sets the n success before diminution.
|
void |
setnSuccessBeforeInexactDiminution(int nSuccessBeforeInexactDiminution)
Sets the n success before inexact diminution.
|
void |
setOldCriticity(double oldCriticity)
Sets the old criticity.
|
void |
setOldOracleValue(double oldOracleValue)
Sets the old oracle value.
|
void |
setOracle(BlackBoxAgent oracle)
Sets the oracle.
|
void |
setOracleValue(double oracleValue)
Sets the oracle value.
|
void |
setPrediction(double prediction)
Sets the prediction.
|
getWorld, setWorld
die, getID, getMessages, getMessagesBin, getName, isDying, readMessage, sendExpressMessage, sendMessage, sendMessage, setDying, setID, setMessages, setMessagesBin, setName
public Head(World world)
world
- the worldpublic void setDataForErrorMargin(double errorAllowed, double augmentationFactorError, double diminutionFactorError, double minErrorAllowed, int nConflictBeforeAugmentation, int nSuccessBeforeDiminution)
errorAllowed
- the error allowedaugmentationFactorError
- the augmentation factor errordiminutionFactorError
- the diminution factor errorminErrorAllowed
- the min error allowednConflictBeforeAugmentation
- the n conflict before augmentationnSuccessBeforeDiminution
- the n success before diminutionpublic void setDataForInexactMargin(double inexactAllowed, double augmentationInexactError, double diminutionInexactError, double minInexactAllowed, int nConflictBeforeInexactAugmentation, int nSuccessBeforeInexactDiminution)
inexactAllowed
- the inexact allowedaugmentationInexactError
- the augmentation inexact errordiminutionInexactError
- the diminution inexact errorminInexactAllowed
- the min inexact allowednConflictBeforeInexactAugmentation
- the n conflict before inexact augmentationnSuccessBeforeInexactDiminution
- the n success before inexact diminutionpublic void computeAMessage(Message m)
Agent
computeAMessage
in class AbstractHead
m
- the mpublic void play()
play
in class SystemAgent
public java.util.ArrayList<Context> getContexts()
public void setContexts(java.util.ArrayList<Context> contexts)
contexts
- the new contextspublic Context getBestContext()
public void setBestContext(Context bestContext)
bestContext
- the new best contextpublic java.util.ArrayList<? extends Agent> getTargets()
SystemAgent
getTargets
in class AbstractHead
public java.util.ArrayList<Context> getActiveContexts()
public double getCriticity()
public boolean getNoBestContext()
public double getCriticity(Context context)
context
- the contextpublic void setCriticity(double criticity)
criticity
- the new criticitypublic double getAction()
public void setAction(double action)
action
- the new actionpublic Context getLastUsedContext()
public void setLastUsedContext(Context lastUsedContext)
lastUsedContext
- the new last used contextpublic boolean isNoCreation()
public void setNoCreation(boolean noCreation)
noCreation
- the new no creationpublic BlackBoxAgent getOracle()
public void setOracle(BlackBoxAgent oracle)
oracle
- the new oraclepublic double getOracleValue()
public void setOracleValue(double oracleValue)
oracleValue
- the new oracle valuepublic double getOldOracleValue()
public void setOldOracleValue(double oldOracleValue)
oldOracleValue
- the new old oracle valuepublic double getOldCriticity()
public void setOldCriticity(double oldCriticity)
oldCriticity
- the new old criticitypublic double getErrorAllowed()
public void setErrorAllowed(double errorAllowed)
errorAllowed
- the new error allowedpublic double getAveragePredictionCriticity()
public void setAveragePredictionCriticity(double averagePredictionCriticity)
averagePredictionCriticity
- the new average prediction criticitypublic int getAveragePredictionCriticityWeight()
public void setAveragePredictionCriticityWeight(int averagePredictionCriticityWeight)
averagePredictionCriticityWeight
- the new average prediction criticity weightpublic Context getNewContext()
public void setNewContext(Context newContext)
newContext
- the new new contextpublic void changeOracleConnection()
public java.lang.String getFunctionSelected()
public void setFunctionSelected(java.lang.String functionSelected)
functionSelected
- the new function selectedpublic double getInexactAllowed()
public void setInexactAllowed(double inexactAllowed)
inexactAllowed
- the new inexact allowedpublic double getAugmentationFactorError()
public void setAugmentationFactorError(double augmentationFactorError)
augmentationFactorError
- the new augmentation factor errorpublic double getDiminutionFactorError()
public void setDiminutionFactorError(double diminutionFactorError)
diminutionFactorError
- the new diminution factor errorpublic int getnConflictBeforeAugmentation()
public void setnConflictBeforeAugmentation(int nConflictBeforeAugmentation)
nConflictBeforeAugmentation
- the new n conflict before augmentationpublic int getnSuccessBeforeDiminution()
public void setnSuccessBeforeDiminution(int nSuccessBeforeDiminution)
nSuccessBeforeDiminution
- the new n success before diminutionpublic double getMinErrorAllowed()
public void setMinErrorAllowed(double minErrorAllowed)
minErrorAllowed
- the new min error allowedpublic double getAugmentationInexactError()
public void setAugmentationInexactError(double augmentationInexactError)
augmentationInexactError
- the new augmentation inexact errorpublic double getDiminutionInexactError()
public void setDiminutionInexactError(double diminutionInexactError)
diminutionInexactError
- the new diminution inexact errorpublic int getnConflictBeforeInexactAugmentation()
public void setnConflictBeforeInexactAugmentation(int nConflictBeforeInexactAugmentation)
nConflictBeforeInexactAugmentation
- the new n conflict before inexact augmentationpublic int getnSuccessBeforeInexactDiminution()
public void setnSuccessBeforeInexactDiminution(int nSuccessBeforeInexactDiminution)
nSuccessBeforeInexactDiminution
- the new n success before inexact diminutionpublic double getMinInexactAllowed()
public void setMinInexactAllowed(double minInexactAllowed)
minInexactAllowed
- the new min inexact allowedpublic int getnPropositionsReceived()
public void setnPropositionsReceived(int nPropositionsReceived)
nPropositionsReceived
- the new n propositions receivedpublic boolean isNewContextWasCreated()
public boolean isContextFromPropositionWasSelected()
public void setContextFromPropositionWasSelected(boolean contextFromPropositionWasSelected)
contextFromPropositionWasSelected
- the new context from proposition was selectedpublic double getPrediction()
public void setPrediction(double prediction)
prediction
- the new prediction