1 from teamwork.agent.AgentClasses import *
2 from teamwork.dynamics.pwlDynamics import *
3
4 from NormAgentDynamics import *
5
6
7 classHierarchy['NormAgent'] = {
8 'parent': [],
9 'horizon':1,
10 'depth':3,
11 'state':{\
12 'type': 1,
13 'init-norm':0.00000000000000001,
14 'resp-norm':0.00000000000000001,
15 'makeResp-norm':0.0000000000001,
16 'conversation-flow-norm':0.0000000000001,
17 'noRepeat-norm':0.0000000000001,
18
19 'conversation':-1,
20 'wait-for-response':-1,
21 'keep-turn':-1,
22
23 'being-greeted':0.0,
24 'being-byed':0.0,
25 'being-enquired':0.0,
26
27 'greeted':0.0,
28 'byed':0.0,
29
30 'conversation':0.0,
31 'likeTalk':0.00000000000000001,
32
33 },
34
35 'dynamics':DynFun['basicDyn'],
36 'goals':[\
37 {'entity': ['self'],
38 'direction': 'max',
39 'type': 'state',
40 'key': 'init-norm',
41 'weight': .5},
42
43 {'entity': ['self'],
44 'direction': 'max',
45 'type': 'state',
46 'key': 'resp-norm',
47 'weight': 1000},
48
49 {'entity': ['self'],
50 'direction': 'max',
51 'type': 'state',
52 'key': 'makeResp-norm',
53 'weight': .5},
54
55 {'entity': ['self'],
56 'direction': 'max',
57 'type': 'state',
58 'key': 'conversation-flow-norm',
59 'weight': .5},
60
61 {'entity': ['self'],
62 'direction': 'max',
63 'type': 'state',
64 'key': 'noRepeat-norm',
65 'weight': .5},
66
67 {'entity': ['self'],
68 'direction':'max',
69 'type':'state',
70 'key':'likeTalk',
71 'weight':.1},
72
73
74 ],
75
76
77 }
78
79 classHierarchy['usr'] = {
80 'parent': ['NormAgent'],
81 'horizon':1,
82 'actions': {'type':'XOR',
83 'key':'type',
84 'values':[{'type':'literal','value':'greet-init'},
85 {'type':'literal','value':'greet-resp'},
86 {'type':'literal','value':'bye-init'},
87 {'type':'literal','value':'bye-resp'},
88 {'type':'literal','value':'enquiry'},
89 {'type':'literal','value':'inform'},
90 {'type':'literal','value':'wait'}],
91 'base': {'type':'XOR',
92 'key':'object',
93 'values':[{'type':'literal','value':'cha'},
94 ],
95 },
96 },
97
98 'dynamics':DynFun['basicDyn'],
99
100 }
101
102
103 classHierarchy['cha'] = {
104 'parent': ['NormAgent'],
105 'horizon':1,
106 'actions': {'type':'XOR',
107 'key':'type',
108 'values':[{'type':'literal','value':'greet-init'},
109 {'type':'literal','value':'greet-resp'},
110 {'type':'literal','value':'bye-init'},
111 {'type':'literal','value':'bye-resp'},
112 {'type':'literal','value':'enquiry'},
113 {'type':'literal','value':'inform'},
114 {'type':'literal','value':'wait'}],
115 'base': {'type':'XOR',
116 'key':'object',
117 'values':[{'type':'literal','value':'usr'},
118 ],
119 },
120 },
121
122 'dynamics':DynFun['basicDyn'],
123
124 }
125