<commit_before>;
; behavior-cfg.scm
;
; Behavior Tree configuration parameters.
; Under construction.
;
; This is (meant to be) a verbatim translation of the contents of the
; old `behavior.cfg` file.  However, a more elegant design should now be
; possible, so this is ... mae not he best way to do things.
;

; default_emotion_duration aka current_emotion_duration
; (StateLink (SchemaNode "current_emotion_duration") (TimeNode 1.0)) ; in seconds

; --------------------------------------------------------
; Emotional-state to expression mapping. For a given emotional state
; (for example, happy, bored, excited) this specifies a range of
; expressions to display for that emotional state, as well as the
; intensities and durations.  `emo-set` adds an expression to an
; emotional state, while `emo-map` is used to set parameters.
(define (emo-expr-set emo-state expression)
	(EvaluationLink
		(PredicateNode "Emotion-expression")
		(ListLink (ConceptNode emo-state) (ConceptNode expression))))

(define (emo-expr-map emo-state expression param value)
	(StateLink (ListLink
		(ConceptNode emo-state) (ConceptNode expression) (SchemaNode param))
		(NumberNode value)))

; Shorthand utility, takes probability, intensity min and max, duration min
; and max.
(define (emo-expr-spec emo-state expression
		prob int-min int-max dur-min dur-max)
	(emo-expr-set emo-state expression)
	(emo-expr-map emo-state expression "probability" prob)
	(emo-expr-map emo-state expression "intensity-min" int-min)
	(emo-expr-map emo-state expression "intensity-max" int-max)
	(emo-expr-map emo-state expression "duration-min" dur-min)
	(emo-expr-map emo-state expression "duration-max" dur-max))

; Translation of behavior.cfg line 9 ff
(emo-expr-spec "new-arrival" "surprised"  1.0 0.2 0.4 10 15)

(emo-expr-spec "frustrated" "sad"         0.4 0.6 0.8 5 15)
(emo-expr-spec "frustrated" "confused"    0.4 0.6 0.8 5 15)
(emo-expr-spec "frustrated" "recoil"      0.1 0.1 0.2 5 15)
(emo-expr-spec "frustrated" "surprised"   0.1 0.1 0.2 5 15)

(emo-expr-spec "positive" "happy"         0.4 0.6 0.8 10 15)
(emo-expr-spec "positive" "comprehending" 0.2 0.5 0.8 10 15)
(emo-expr-spec "positive" "engaged"       0.2 0.5 0.8 10 15)

(emo-expr-spec "bored"    "bored"         0.7 0.4 0.7 10 15)
(emo-expr-spec "bored"    "sad"           0.1 0.1 0.3 10 15)
(emo-expr-spec "bored"    "happy"         0.2 0.1 0.3 10 15)

(emo-expr-spec "sleep"    "happy"         1.0  0.0 0.1 5 15)

(emo-expr-spec "wake-up"  "surprised"     0.45 0.2 0.6 5 15)
(emo-expr-spec "wake-up"  "happy"         0.2  0.5 0.7 5 15)
(emo-expr-spec "wake-up"  "irritated"     0.6  0.1 0.4 1  4)


; --------------------------------------------------------
; Emotional-state to gesture mapping. For a given emotional state
; (for example, happy, bored, excited) this specifies a range of
; gestures to display for that emotional state, as well as the<commit_msg>Sync with upstream<commit_after>;
; behavior-cfg.scm
;
; Behavior Tree configuration parameters.
; Under construction.
;
; This is (meant to be) a verbatim translation of the contents of the
; old `behavior.cfg` file.  However, a more elegant design should now be
; possible, so this is ... mae not he best way to do things.
;

; default_emotion_duration aka current_emotion_duration
; (StateLink (SchemaNode "current_emotion_duration") (TimeNode 1.0)) ; in seconds

; --------------------------------------------------------
; Emotional-state to expression mapping. For a given emotional state
; (for example, happy, bored, excited) this specifies a range of
; expressions to display for that emotional state, as well as the
; intensities and durations.  `emo-set` adds an expression to an
; emotional state, while `emo-map` is used to set parameters.
(define (emo-expr-set emo-state expression)
	(EvaluationLink
		(PredicateNode "Emotion-expression")
		(ListLink (ConceptNode emo-state) (ConceptNode expression))))

(define (emo-expr-map emo-state expression param value)
	(StateLink (ListLink
		(ConceptNode emo-state) (ConceptNode expression) (SchemaNode param))
		(NumberNode value)))

; Shorthand utility, takes probability, intensity min and max, duration min
; and max.
(define (emo-expr-spec emo-state expression
		prob int-min int-max dur-min dur-max)
	(emo-expr-set emo-state expression)
	(emo-expr-map emo-state expression "probability" prob)
	(emo-expr-map emo-state expression "intensity-min" int-min)
	(emo-expr-map emo-state expression "intensity-max" int-max)
	(emo-expr-map emo-state expression "duration-min" dur-min)
	(emo-expr-map emo-state expression "duration-max" dur-max))

; Translation of behavior.cfg line 9 ff
(emo-expr-spec "new-arrival" "surprised"  1.0 0.2 0.4 10 15)

(emo-expr-spec "frustrated" "sad"         0.4 0.6 0.8 5 15)
(emo-expr-spec "frustrated" "confused"    0.1 0.4 0.6 5 15)
(emo-expr-spec "frustrated" "recoil"      0.2 0.1 0.2 5 15)
(emo-expr-spec "frustrated" "surprised"   0.2 0.1 0.2 5 15)

(emo-expr-spec "positive" "happy"         0.2 0.6 0.8 10 15)
(emo-expr-spec "positive" "comprehending" 0.3 0.5 0.8 10 15)
(emo-expr-spec "positive" "engaged"       0.4 0.5 0.8 10 15)

(emo-expr-spec "bored"    "bored"         0.7 0.4 0.7 10 15)
(emo-expr-spec "bored"    "sad"           0.1 0.1 0.3 10 15)
(emo-expr-spec "bored"    "happy"         0.2 0.1 0.3 10 15)

(emo-expr-spec "sleep"    "happy"         1.0  0.0 0.1 5 15)

(emo-expr-spec "wake-up"  "surprised"     0.45 0.2 0.6 5 15)
(emo-expr-spec "wake-up"  "happy"         0.2  0.5 0.7 5 15)
(emo-expr-spec "wake-up"  "irritated"     0.6  0.1 0.4 1  4)


; --------------------------------------------------------
; Emotional-state to gesture mapping. For a given emotional state
; (for example, happy, bored, excited) this specifies a range of
; gestures to display for that emotional state, as well as the
{'fraction_non_alphanumeric': 0.15998623774298984, 'fraction_numerical': 0.049888181661792534, 'mean_word_length': 2.8682634730538923, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '312649', 'n_tokens_mistral': 2282, 'n_tokens_neox': 2010, 'n_words': 671}