Class Satisfaction
java.lang.Object
|
+--Satisfaction
- All Implemented Interfaces:
- java.io.Serializable
- public class Satisfaction
- extends java.lang.Object
- implements java.io.Serializable
- See Also:
- Serialized Form
Method Summary |
private float[] |
baseValuesForField(int x,
int y,
boolean coordinated,
float gatherAmount)
|
void |
calcEstimatedSatis()
|
float |
combineSatisfaction(float survival,
float wealth,
float curiosity,
float breeding,
float influence)
|
float |
estimatedSatisBreed()
|
float |
estimatedSatisEndCoordinating()
|
float |
estimatedSatisGather()
|
float |
estimatedSatisMove()
|
float |
estimatedSatisRest()
|
float |
estimatedSatisStartCoordinating()
|
float |
estimatedSatisSubordinate()
|
float |
estimatedSatisUnsubordinate()
|
float[] |
foodBasedSatis(float food,
float baseValueFood,
boolean coordinating)
Berechnet aus den übergebenen Werten die Zufriedenheit für
survival und wealth. |
int |
getAction()
|
float |
getEstSatis(int i)
|
float |
getSatis(int i)
|
java.awt.Point |
getWhereToMove()
|
float |
saturation(float x)
|
float |
saturation(float x,
float norm)
|
float |
saturation(float x,
float norm,
float intensity)
|
void |
setSatis(int i,
float value)
|
void |
setWeights(float survivalW,
float wealthW,
float curiosityW,
float breedingW,
float influenceW)
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
SURVIVAL
public static final int SURVIVAL
WEALTH
public static final int WEALTH
CURIOSITY
public static final int CURIOSITY
BREEDING
public static final int BREEDING
INFLUENCE
public static final int INFLUENCE
GATHER
public static final int GATHER
MOVE
public static final int MOVE
BREED
public static final int BREED
START_COORDINATING
public static final int START_COORDINATING
END_COORDINATING
public static final int END_COORDINATING
SUBORDINATE
public static final int SUBORDINATE
UNSUBORDINATE
public static final int UNSUBORDINATE
REST
public static final int REST
defaultSurvival
private float defaultSurvival
defaultWealth
private float defaultWealth
defaultCuriosity
private float defaultCuriosity
defaultBreeding
private float defaultBreeding
defaultInfluence
private float defaultInfluence
weight
private float[] weight
estimatedSatis
private float[] estimatedSatis
satis
private float[] satis
agent
private Agent agent
whereToMove
private java.awt.Point whereToMove
Satisfaction
public Satisfaction(Agent a)
setWeights
public void setWeights(float survivalW,
float wealthW,
float curiosityW,
float breedingW,
float influenceW)
getAction
public int getAction()
calcEstimatedSatis
public void calcEstimatedSatis()
baseValuesForField
private float[] baseValuesForField(int x,
int y,
boolean coordinated,
float gatherAmount)
foodBasedSatis
public float[] foodBasedSatis(float food,
float baseValueFood,
boolean coordinating)
- Berechnet aus den übergebenen Werten die Zufriedenheit für
survival und wealth.
- Parameters:
food
- der Nahrungsvorrat des Agenten.baseValueFood
- der Grundwert, berechnet aus der Nahrung in der Umgebung.coordinating
- ist der Agent ein Koordinator.- Returns:
- Array aus zwei float Werten {survival, wealth}.
estimatedSatisMove
public float estimatedSatisMove()
estimatedSatisGather
public float estimatedSatisGather()
estimatedSatisBreed
public float estimatedSatisBreed()
estimatedSatisStartCoordinating
public float estimatedSatisStartCoordinating()
estimatedSatisEndCoordinating
public float estimatedSatisEndCoordinating()
estimatedSatisSubordinate
public float estimatedSatisSubordinate()
estimatedSatisUnsubordinate
public float estimatedSatisUnsubordinate()
estimatedSatisRest
public float estimatedSatisRest()
saturation
public float saturation(float x)
saturation
public float saturation(float x,
float norm)
saturation
public float saturation(float x,
float norm,
float intensity)
combineSatisfaction
public float combineSatisfaction(float survival,
float wealth,
float curiosity,
float breeding,
float influence)
getSatis
public float getSatis(int i)
getEstSatis
public float getEstSatis(int i)
setSatis
public void setSatis(int i,
float value)
getWhereToMove
public java.awt.Point getWhereToMove()