Serializable
, Plugin
public class Emotions extends Object implements Plugin, Serializable
Modifier and Type | Field | Description |
---|---|---|
private float |
busy |
average priority
|
float |
BUSY_EVENT_HIGHER_THRESHOLD |
|
float |
BUSY_EVENT_LOWER_THRESHOLD |
|
int |
CHANGE_STEPS_DEMANDED |
|
double |
CHANGE_THRESHOLD |
|
(package private) boolean |
enabled |
|
private float |
happy |
average desire-value
|
float |
HAPPY_EVENT_HIGHER_THRESHOLD |
|
float |
HAPPY_EVENT_LOWER_THRESHOLD |
|
long |
last_busy_time |
|
long |
last_happy_time |
|
double |
lastbusy |
|
double |
lasthappy |
Constructor | Description |
---|---|
Emotions() |
|
Emotions(float HAPPY_EVENT_LOWER_THRESHOLD,
float HAPPY_EVENT_HIGHER_THRESHOLD,
float BUSY_EVENT_LOWER_THRESHOLD,
float BUSY_EVENT_HIGHER_THRESHOLD,
int CHANGE_STEPS_DEMANDED) |
Modifier and Type | Method | Description |
---|---|---|
void |
adjustBusy(float newValue,
float weight,
DerivationContext nal) |
|
void |
adjustSatisfaction(float newValue,
float weight,
DerivationContext nal) |
|
float |
busy() |
|
double |
getBUSY_EVENT_HIGHER_THRESHOLD() |
|
double |
getBUSY_EVENT_LOWER_THRESHOLD() |
|
double |
getCHANGE_STEPS_DEMANDED() |
|
double |
getHAPPY_EVENT_HIGHER_THRESHOLD() |
|
double |
getHAPPY_EVENT_LOWER_THRESHOLD() |
|
float |
happy() |
|
void |
resetEmotions() |
|
void |
set(float happy,
float busy) |
|
void |
setBUSY_EVENT_HIGHER_THRESHOLD(double val) |
|
void |
setBUSY_EVENT_LOWER_THRESHOLD(double val) |
|
void |
setCHANGE_STEPS_DEMANDED(double val) |
|
boolean |
setEnabled(Nar n,
boolean enabled) |
called when plugin is activated (enabled = true) / deactivated (enabled=false)
|
void |
setHAPPY_EVENT_HIGHER_THRESHOLD(double val) |
|
void |
setHAPPY_EVENT_LOWER_THRESHOLD(double val) |
public volatile float HAPPY_EVENT_HIGHER_THRESHOLD
public volatile float HAPPY_EVENT_LOWER_THRESHOLD
public volatile float BUSY_EVENT_HIGHER_THRESHOLD
public volatile float BUSY_EVENT_LOWER_THRESHOLD
public volatile int CHANGE_STEPS_DEMANDED
public double lasthappy
public long last_happy_time
public long last_busy_time
private float happy
private float busy
public double lastbusy
public final double CHANGE_THRESHOLD
boolean enabled
public Emotions()
public Emotions(float HAPPY_EVENT_LOWER_THRESHOLD, float HAPPY_EVENT_HIGHER_THRESHOLD, float BUSY_EVENT_LOWER_THRESHOLD, float BUSY_EVENT_HIGHER_THRESHOLD, int CHANGE_STEPS_DEMANDED)
public void setHAPPY_EVENT_HIGHER_THRESHOLD(double val)
public double getHAPPY_EVENT_HIGHER_THRESHOLD()
public void setHAPPY_EVENT_LOWER_THRESHOLD(double val)
public double getHAPPY_EVENT_LOWER_THRESHOLD()
public void setBUSY_EVENT_HIGHER_THRESHOLD(double val)
public double getBUSY_EVENT_HIGHER_THRESHOLD()
public void setBUSY_EVENT_LOWER_THRESHOLD(double val)
public double getBUSY_EVENT_LOWER_THRESHOLD()
public void setCHANGE_STEPS_DEMANDED(double val)
public double getCHANGE_STEPS_DEMANDED()
public void resetEmotions()
public void set(float happy, float busy)
public float happy()
public float busy()
public void adjustSatisfaction(float newValue, float weight, DerivationContext nal)
public void adjustBusy(float newValue, float weight, DerivationContext nal)
public boolean setEnabled(Nar n, boolean enabled)
Plugin
setEnabled
in interface Plugin
Copyright © 2020 OpenNARS. All rights reserved.