from GameStructure import GameStructure
from CrossEntropyQBrain import CrossEntropyQBrain


STARTING_ROAD_WIDTH = 5
ENDING_ROAD_WIDTH = 1500
NUM_ADVANCES_LEVEL_COMPLETE = 2000
DISPLAY_RATE = 2.0
RANDOM_OBSTACLE_PROBABILITY = .1
MAX_NUMBER_DISPLAY_ROAD_STATES = 3
MAX_NUMBER_ROAD_STATES = 6
MAX_HISTORY = 50
FAST_MODE = True
SAFE_REWARD = 1
CRASH_REWARD = -1
ADVANCES_LEARNING_INTERVAL = 4
DISCOUNT = 0.9
GAMMA = 0.9
NUMBER_ACTIONS = 3
STEP_SIZE = 0.2
DEEP_Q_TRAINING_INTERVAL = 1000
RANDOM_MOVE_PROBABILITY = .001
NUMBER_ROAD_SECTIONS_IN_Q_VALUES = 3


def main():
    game = GameStructure(STARTING_ROAD_WIDTH, ENDING_ROAD_WIDTH, NUM_ADVANCES_LEVEL_COMPLETE, \
        DISPLAY_RATE, RANDOM_OBSTACLE_PROBABILITY, MAX_NUMBER_DISPLAY_ROAD_STATES, \
        MAX_NUMBER_ROAD_STATES, ADVANCES_LEARNING_INTERVAL, MAX_HISTORY, FAST_MODE)
    
    cross_entropy_q_brain = CrossEntropyQBrain(SAFE_REWARD, CRASH_REWARD, ADVANCES_LEARNING_INTERVAL, DISCOUNT, \
        NUMBER_ACTIONS, STEP_SIZE, RANDOM_MOVE_PROBABILITY, NUMBER_ROAD_SECTIONS_IN_Q_VALUES)
    game.start(cross_entropy_q_brain)


if __name__ == "__main__":
    main()

9e1de3b91da73ce46bfee77fc2ae9b5c59eb9c08
<mask token>


def main():
    game = GameStructure(STARTING_ROAD_WIDTH, ENDING_ROAD_WIDTH,
        NUM_ADVANCES_LEVEL_COMPLETE, DISPLAY_RATE,
        RANDOM_OBSTACLE_PROBABILITY, MAX_NUMBER_DISPLAY_ROAD_STATES,
        MAX_NUMBER_ROAD_STATES, ADVANCES_LEARNING_INTERVAL, MAX_HISTORY,
        FAST_MODE)
    cross_entropy_q_brain = CrossEntropyQBrain(SAFE_REWARD, CRASH_REWARD,
        ADVANCES_LEARNING_INTERVAL, DISCOUNT, NUMBER_ACTIONS, STEP_SIZE,
        RANDOM_MOVE_PROBABILITY, NUMBER_ROAD_SECTIONS_IN_Q_VALUES)
    game.start(cross_entropy_q_brain)


<mask token>

<mask token>


def main():
    game = GameStructure(STARTING_ROAD_WIDTH, ENDING_ROAD_WIDTH,
        NUM_ADVANCES_LEVEL_COMPLETE, DISPLAY_RATE,
        RANDOM_OBSTACLE_PROBABILITY, MAX_NUMBER_DISPLAY_ROAD_STATES,
        MAX_NUMBER_ROAD_STATES, ADVANCES_LEARNING_INTERVAL, MAX_HISTORY,
        FAST_MODE)
    cross_entropy_q_brain = CrossEntropyQBrain(SAFE_REWARD, CRASH_REWARD,
        ADVANCES_LEARNING_INTERVAL, DISCOUNT, NUMBER_ACTIONS, STEP_SIZE,
        RANDOM_MOVE_PROBABILITY, NUMBER_ROAD_SECTIONS_IN_Q_VALUES)
    game.start(cross_entropy_q_brain)


if __name__ == '__main__':
    main()

<mask token>
STARTING_ROAD_WIDTH = 5
ENDING_ROAD_WIDTH = 1500
NUM_ADVANCES_LEVEL_COMPLETE = 2000
DISPLAY_RATE = 2.0
RANDOM_OBSTACLE_PROBABILITY = 0.1
MAX_NUMBER_DISPLAY_ROAD_STATES = 3
MAX_NUMBER_ROAD_STATES = 6
MAX_HISTORY = 50
FAST_MODE = True
SAFE_REWARD = 1
CRASH_REWARD = -1
ADVANCES_LEARNING_INTERVAL = 4
DISCOUNT = 0.9
GAMMA = 0.9
NUMBER_ACTIONS = 3
STEP_SIZE = 0.2
DEEP_Q_TRAINING_INTERVAL = 1000
RANDOM_MOVE_PROBABILITY = 0.001
NUMBER_ROAD_SECTIONS_IN_Q_VALUES = 3


def main():
    game = GameStructure(STARTING_ROAD_WIDTH, ENDING_ROAD_WIDTH,
        NUM_ADVANCES_LEVEL_COMPLETE, DISPLAY_RATE,
        RANDOM_OBSTACLE_PROBABILITY, MAX_NUMBER_DISPLAY_ROAD_STATES,
        MAX_NUMBER_ROAD_STATES, ADVANCES_LEARNING_INTERVAL, MAX_HISTORY,
        FAST_MODE)
    cross_entropy_q_brain = CrossEntropyQBrain(SAFE_REWARD, CRASH_REWARD,
        ADVANCES_LEARNING_INTERVAL, DISCOUNT, NUMBER_ACTIONS, STEP_SIZE,
        RANDOM_MOVE_PROBABILITY, NUMBER_ROAD_SECTIONS_IN_Q_VALUES)
    game.start(cross_entropy_q_brain)


if __name__ == '__main__':
    main()

from GameStructure import GameStructure
from CrossEntropyQBrain import CrossEntropyQBrain
STARTING_ROAD_WIDTH = 5
ENDING_ROAD_WIDTH = 1500
NUM_ADVANCES_LEVEL_COMPLETE = 2000
DISPLAY_RATE = 2.0
RANDOM_OBSTACLE_PROBABILITY = 0.1
MAX_NUMBER_DISPLAY_ROAD_STATES = 3
MAX_NUMBER_ROAD_STATES = 6
MAX_HISTORY = 50
FAST_MODE = True
SAFE_REWARD = 1
CRASH_REWARD = -1
ADVANCES_LEARNING_INTERVAL = 4
DISCOUNT = 0.9
GAMMA = 0.9
NUMBER_ACTIONS = 3
STEP_SIZE = 0.2
DEEP_Q_TRAINING_INTERVAL = 1000
RANDOM_MOVE_PROBABILITY = 0.001
NUMBER_ROAD_SECTIONS_IN_Q_VALUES = 3


def main():
    game = GameStructure(STARTING_ROAD_WIDTH, ENDING_ROAD_WIDTH,
        NUM_ADVANCES_LEVEL_COMPLETE, DISPLAY_RATE,
        RANDOM_OBSTACLE_PROBABILITY, MAX_NUMBER_DISPLAY_ROAD_STATES,
        MAX_NUMBER_ROAD_STATES, ADVANCES_LEARNING_INTERVAL, MAX_HISTORY,
        FAST_MODE)
    cross_entropy_q_brain = CrossEntropyQBrain(SAFE_REWARD, CRASH_REWARD,
        ADVANCES_LEARNING_INTERVAL, DISCOUNT, NUMBER_ACTIONS, STEP_SIZE,
        RANDOM_MOVE_PROBABILITY, NUMBER_ROAD_SECTIONS_IN_Q_VALUES)
    game.start(cross_entropy_q_brain)


if __name__ == '__main__':
    main()

from GameStructure import GameStructure
from CrossEntropyQBrain import CrossEntropyQBrain


STARTING_ROAD_WIDTH = 5
ENDING_ROAD_WIDTH = 1500
NUM_ADVANCES_LEVEL_COMPLETE = 2000
DISPLAY_RATE = 2.0
RANDOM_OBSTACLE_PROBABILITY = .1
MAX_NUMBER_DISPLAY_ROAD_STATES = 3
MAX_NUMBER_ROAD_STATES = 6
MAX_HISTORY = 50
FAST_MODE = True
SAFE_REWARD = 1
CRASH_REWARD = -1
ADVANCES_LEARNING_INTERVAL = 4
DISCOUNT = 0.9
GAMMA = 0.9
NUMBER_ACTIONS = 3
STEP_SIZE = 0.2
DEEP_Q_TRAINING_INTERVAL = 1000
RANDOM_MOVE_PROBABILITY = .001
NUMBER_ROAD_SECTIONS_IN_Q_VALUES = 3


def main():
    game = GameStructure(STARTING_ROAD_WIDTH, ENDING_ROAD_WIDTH, NUM_ADVANCES_LEVEL_COMPLETE, \
        DISPLAY_RATE, RANDOM_OBSTACLE_PROBABILITY, MAX_NUMBER_DISPLAY_ROAD_STATES, \
        MAX_NUMBER_ROAD_STATES, ADVANCES_LEARNING_INTERVAL, MAX_HISTORY, FAST_MODE)
    
    cross_entropy_q_brain = CrossEntropyQBrain(SAFE_REWARD, CRASH_REWARD, ADVANCES_LEARNING_INTERVAL, DISCOUNT, \
        NUMBER_ACTIONS, STEP_SIZE, RANDOM_MOVE_PROBABILITY, NUMBER_ROAD_SECTIONS_IN_Q_VALUES)
    game.start(cross_entropy_q_brain)


if __name__ == "__main__":
    main()
