One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| from concurrent.futures import ProcessPoolExecutor, as_completed | |
| import cv2 | |
| import multiprocessing | |
| import os | |
| import sys | |
| def print_progress(iteration, total, prefix='', suffix='', decimals=3, bar_length=100): | |
| """ | |
| Call in a loop to create standard out progress bar |
| # Inspired by https://medium.com/@tuzzer/cart-pole-balancing-with-q-learning-b54c6068d947 | |
| import gym | |
| import numpy as np | |
| import math | |
| from collections import deque | |
| class QCartPoleSolver(): | |
| def __init__(self, buckets=(1, 1, 6, 12,), n_episodes=1000, n_win_ticks=195, min_alpha=0.1, min_epsilon=0.1, gamma=1.0, ada_divisor=25, max_env_steps=None, quiet=False, monitor=False): | |
| self.buckets = buckets # down-scaling feature space to discrete range |