-
Notifications
You must be signed in to change notification settings - Fork 0
/
actor.py
73 lines (60 loc) · 2.3 KB
/
actor.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Adapted from Vibropyke.
# Relicensed GPL in accordance with Vibropyke's original MPL2.0 license.
#
# Copyright (c) 2018, 2019 Slavfox
#
# This file is part of 7 Days to Rigel.
#
# 7 Days to Rigel is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# 7 Days to Rigel is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with 7 Days to Rigel. If not, see <https://www.gnu.org/licenses/>.
from dataclasses import dataclass
# Citations:
# - McCrae, R. and O. John 1992. An introduction to the five-factor
# model and its applications. Journal of personality, 60(2):175–215.
# - Noonan, S. 2015. Side Quest Generation using Interactive Storytelling
# for Open World Role Playing Games. Retrieved from https://scss.tcd.ie/publi-
# cations/theses/diss/2015/TCD-SCSS-DISSERTATION-2015-050.pdf (Accessed
# February 13. 2019)
@dataclass
class Personality:
"""
Model of an Actor's personality, using the Five Factor Model.
"""
__slots__ = ['openness', 'conscientiousness', 'extraversion',
'agreeableness', 'neuroticism']
openness: float
conscientiousness: float
extraversion: float
agreeableness: float
neuroticism: float
# Citations:
# - Bourgais, Mathieu, Taillandier, Patrick, Vercouter, Laurent and Adam, Carole
# (2018) 'Emotion Modeling in Social Simulation: A Survey' Journal of
# Artificial Societies and Social Simulation 21 (2) 5
# <http://jasss.soc.surrey.ac.uk/21/2/5.html>. doi: 10.18564/jasss.3681
@dataclass
class Emotion:
"""
Model of an Actor's emotional state.
"""
__slots__ = ['arousal', 'valence', 'certainty']
arousal: float
valence: float
certainty: float
class Actor:
__slots__ = ['emotion', 'personality', '_goal']
def __init__(self, personality: Personality):
self.emotion = Emotion(0, 0, 0)
self.personality = personality
self._goal = None
def act(self): pass