Package teamwork :: Package examples :: Package Thespian :: Module ChatClasses
[hide private]
[frames] | no frames]

Source Code for Module teamwork.examples.Thespian.ChatClasses

 1  from teamwork.agent.AgentClasses import * 
 2  from teamwork.dynamics.pwlDynamics import * 
 3  
 
 4  from ChatDynamics import * 
 5  
 
 6  
 
 7  classHierarchy['NormAgent'] = {
 
 8      'parent': [],
 
 9      'horizon':1,
 
10      'depth':3,
 
11      'state':{\
 
12               'resp-norm':0.00000000000000001,
 
13               'init-norm':0.00000000000000001,
 
14               'SD':0.00000000000000001,
 
15               'being-enquired':0,
 
16  
 
17               },
 
18   
 
19      'dynamics':DynFun['basicDyn'],
 
20      'goals':[\
 
21      
 
22                  {'entity':    ['self'],
 
23                                    'direction': 'max',
 
24                                    'type':      'state',
 
25                                    'key':   'resp-norm',
 
26                                    'weight':    1000},
 
27                  {'entity':    ['self'],
 
28                                    'direction': 'max',
 
29                                    'type':      'state',
 
30                                    'key':   'init-norm',
 
31                                    'weight':    1},
 
32                  
 
33   
 
34                           ],
 
35  
 
36  
 
37      } 
38  
 
39  classHierarchy['usr'] = {
 
40      'parent': ['NormAgent'],
 
41      'horizon':1,
 
42      'actions': {'type':'XOR',
 
43                   'key':'type',
 
44                    'values':[{'type':'literal','value':'enquiry'},
 
45                      {'type':'literal','value':'pos-inform'},
 
46                      {'type':'literal','value':'neu-inform'},
 
47                      {'type':'literal','value':'neg-inform'},
 
48                      ],
 
49                    'base': {'type':'XOR',
 
50                           'key':'object',
 
51                           'values':[{'type':'literal','value':'cha'},
 
52                                     ],
 
53                           },
 
54                  },
 
55   
 
56      'dynamics':DynFun['basicDyn'],
 
57  
 
58      } 
59  
 
60  
 
61  classHierarchy['cha'] = {
 
62      'parent': ['NormAgent'],
 
63      'horizon':1,
 
64      'actions': {'type':'XOR',
 
65                   'key':'type',
 
66                    'values':[{'type':'literal','value':'enquiry'},
 
67                      {'type':'literal','value':'pos-inform'},
 
68                      {'type':'literal','value':'neu-inform'},
 
69                      {'type':'literal','value':'neg-inform'},
 
70                      ],
 
71                    'base': {'type':'XOR',
 
72                           'key':'object',
 
73                           'values':[{'type':'literal','value':'usr'},
 
74                                     ],
 
75                           },
 
76                  },
 
77   
 
78      'dynamics':DynFun['basicDyn'],
 
79  
 
80      } 
81