-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
37 lines (33 loc) · 827 Bytes
/
config.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
import numpy as np
""" GAME OPTIONS """
total_players = 2
epochs = 5
fps = 25
game_length = fps * 20
display_frame = True
use_grid = False
players = [
{
"feedforward": True,
"random": False,
"hidden_size": 50,
},
{
"feedforward": True,
"random": False,
"hidden_size": 50,
}
]
""" END GAME OPTIONS"""
SCREEN_WIDTH, SCREEN_HEIGHT = 1000, 800
wall_offset = 100
wall_width = 20
GAME_WIDTH = SCREEN_WIDTH - (wall_offset + wall_width) * 2
GAME_HEIGHT = SCREEN_HEIGHT - (wall_offset + wall_width) * 2
EXTRA_LAYERS = 1
DATA_PER_PLAYER = 4
collision_types = {'player': 1, 'bullet': 2, 'wall': 3}
actions = {'forward': 0, 'backward': 1, 'rotate_left': 2, 'rotate_right': 3, 'shoot': 4}
debug = True
def normalize_coordinate(value):
return int(np.floor(value / 40))