-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.py
46 lines (37 loc) · 823 Bytes
/
settings.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
38
39
40
41
42
43
44
45
46
import logging
from fallbacks import pygame
# Game properties
COLS = 17 # min 3
ROWS = 17 # min 3
CRATE_DENSITY = 0.75
MAX_AGENTS = 4
# Round properties
MAX_STEPS = 400
# GUI properties
GRID_SIZE = 30
WIDTH = 1000
HEIGHT = 600
GRID_OFFSET = [(HEIGHT - ROWS * GRID_SIZE) // 2] * 2
AGENT_COLORS = ['blue', 'green', 'yellow', 'pink'] * 100
# Game rules
BOMB_POWER = 3
BOMB_TIMER = 4
EXPLOSION_TIMER = 2
# Rules for agents
TIMEOUT = 0.5
REWARD_KILL = 5
REWARD_COIN = 1
# User input
INPUT_MAP = {
pygame.K_UP: 'UP',
pygame.K_DOWN: 'DOWN',
pygame.K_LEFT: 'LEFT',
pygame.K_RIGHT: 'RIGHT',
pygame.K_RETURN: 'WAIT',
pygame.K_SPACE: 'BOMB',
}
# Logging levels
LOG_GAME = logging.ERROR
LOG_AGENT_WRAPPER = logging.ERROR
LOG_AGENT_CODE = logging.ERROR
LOG_MAX_FILE_SIZE = 100 * 1024 * 1024 # 100 MB