-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
46 lines (32 loc) · 874 Bytes
/
Copy pathmain.py
File metadata and controls
46 lines (32 loc) · 874 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
40
41
42
43
44
45
46
import sys, os
sys.path.insert(0, 'evoman')
from environment import Environment
# from demo_controller import player_controller
# from controller import Controller
from test_controller import test_controller
import numpy as np
def init():
"""
Initialise game environment
"""
# create map for outputs
experiment_name = 'testrun'
if not os.path.exists(experiment_name):
os.makedirs(experiment_name)
n_hidden_neurons = 0
# init environment class
# cont = Controller()
env = Environment(experiment_name=experiment_name,
speed='normal')
env.player_controller = test_controller
return env
if __name__ == '__main__':
env = init()
# use first EA
# TODO:
# use second EA
# TODO:
env.play()
yeet = env.player.sensors.get(env)
print(yeet)
print(env.logs)