-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrun_bot_client.py
More file actions
39 lines (25 loc) · 833 Bytes
/
run_bot_client.py
File metadata and controls
39 lines (25 loc) · 833 Bytes
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
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE",
"ActiveTeachingServer.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
import websocket
from bot_client.random_socket import RandomSocket
from bot_client.learner_socket import LearnerSocket
from bot_client.learning_model.exponential_forgetting import ExponentialNDelta
# from bot_client.learning_model.act_r.act_r import ActR
def run_random():
ws = RandomSocket()
ws.run_forever()
def run_exp_decay():
websocket.enableTrace(True)
ws = LearnerSocket(
cognitive_model=ExponentialNDelta,
waiting_time=1,
param=[0.02, 0.44])
ws.run_forever()
def main():
websocket.enableTrace(True)
run_random()
if __name__ == "__main__":
run_exp_decay()