Skip to content

Commit b0059f0

Browse files
Code formatted with black and autopep8
1 parent a282a3a commit b0059f0

File tree

189 files changed

+12415
-9131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+12415
-9131
lines changed

.pep8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[pycodestyle]
2+
max_line_length = 127

default_config.py

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
1+
from collections import OrderedDict
12
from mdp_playground.config_processor import *
23

34
timesteps_total = 10_000
45
num_seeds = 3
5-
from collections import OrderedDict
6-
var_env_configs = OrderedDict({
7-
'state_space_size': [8],#, 10, 12, 14] # [2**i for i in range(1,6)]
8-
'action_space_size': [8],#2, 4, 8, 16] # [2**i for i in range(1,6)]
9-
'delay': [0] + [2**i for i in range(4)],
10-
'sequence_length': [1, 2, 3, 4],#i for i in range(1,4)]
11-
'reward_density': [0.25], # np.linspace(0.0, 1.0, num=5)
12-
'make_denser': [False],
13-
'terminal_state_density': [0.25], # np.linspace(0.1, 1.0, num=5)
14-
'transition_noise': [0],#, 0.01, 0.02, 0.10, 0.25]
15-
'reward_noise': [0],#, 1, 5, 10, 25] # Std dev. of normal dist.
16-
# 'reward_scale': [10.0],
17-
'dummy_seed': [i for i in range(num_seeds)],
18-
})
196

20-
var_configs = OrderedDict({
21-
"env": var_env_configs
22-
})
7+
var_env_configs = OrderedDict(
8+
{
9+
"state_space_size": [8], # , 10, 12, 14] # [2**i for i in range(1,6)]
10+
"action_space_size": [8], # 2, 4, 8, 16] # [2**i for i in range(1,6)]
11+
"delay": [0] + [2 ** i for i in range(4)],
12+
"sequence_length": [1, 2, 3, 4], # i for i in range(1,4)]
13+
"reward_density": [0.25], # np.linspace(0.0, 1.0, num=5)
14+
"make_denser": [False],
15+
"terminal_state_density": [0.25], # np.linspace(0.1, 1.0, num=5)
16+
"transition_noise": [0], # , 0.01, 0.02, 0.10, 0.25]
17+
"reward_noise": [0], # , 1, 5, 10, 25] # Std dev. of normal dist.
18+
# 'reward_scale': [10.0],
19+
"dummy_seed": [i for i in range(num_seeds)],
20+
}
21+
)
22+
23+
var_configs = OrderedDict({"env": var_env_configs})
2324

2425
env_config = {
2526
"env": "RLToy-v0",
2627
"horizon": 100,
2728
"env_config": {
28-
'seed': 0, #seed
29-
'state_space_type': 'discrete',
30-
'action_space_type': 'discrete',
31-
'generate_random_mdp': True,
32-
'repeats_in_sequences': False,
33-
'reward_scale': 1.0,
34-
'completely_connected': True,
29+
"seed": 0, # seed
30+
"state_space_type": "discrete",
31+
"action_space_type": "discrete",
32+
"generate_random_mdp": True,
33+
"repeats_in_sequences": False,
34+
"reward_scale": 1.0,
35+
"completely_connected": True,
3536
},
3637
}
3738

@@ -49,7 +50,7 @@
4950
"final_prioritized_replay_beta": 1.0,
5051
"hiddens": None,
5152
"learning_starts": 1000,
52-
"lr": 1e-4, # "lr": grid_search([1e-2, 1e-4, 1e-6]),
53+
"lr": 1e-4, # "lr": grid_search([1e-2, 1e-4, 1e-6]),
5354
"n_step": 1,
5455
"noisy": False,
5556
"num_atoms": 1,

docs/conf.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@
1313
import os
1414
import sys
1515

16-
sys.path.insert(0, os.path.abspath('..'))
17-
sys.path.append(os.path.abspath('../mdp_playground'))
16+
sys.path.insert(0, os.path.abspath(".."))
17+
sys.path.append(os.path.abspath("../mdp_playground"))
1818

1919
# -- Project information -----------------------------------------------------
2020

2121
# TODO: read automatically from setup
22-
project = 'MDP Playground'
23-
copyright = '2021, MDP Playground developers'
24-
author = 'MDP Playground developers'
22+
project = "MDP Playground"
23+
copyright = "2021, MDP Playground developers"
24+
author = "MDP Playground developers"
2525

2626
# The full version, including alpha/beta/rc tags
27-
release = '0.0.1'
27+
release = "0.0.1"
2828

2929

3030
# -- General configuration ---------------------------------------------------
@@ -33,11 +33,11 @@
3333
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3434
# ones.
3535
extensions = [
36-
'sphinx.ext.autodoc',
37-
'sphinx.ext.napoleon',
38-
'sphinx.ext.coverage',
36+
"sphinx.ext.autodoc",
37+
"sphinx.ext.napoleon",
38+
"sphinx.ext.coverage",
3939
"sphinx.ext.viewcode",
40-
'sphinx.ext.autosummary',
40+
"sphinx.ext.autosummary",
4141
]
4242

4343
napoleon_google_docstring = False
@@ -50,12 +50,12 @@
5050
autodoc_inherit_docstrings = True # If no docstring, inherit from base class
5151

5252
# Add any paths that contain templates here, relative to this directory.
53-
templates_path = ['_templates']
53+
templates_path = ["_templates"]
5454

5555
# List of patterns, relative to source directory, that match files and
5656
# directories to ignore when looking for source files.
5757
# This pattern also affects html_static_path and html_extra_path.
58-
exclude_patterns = ['_build', '_templates', 'Thumbs.db', '.DS_Store']
58+
exclude_patterns = ["_build", "_templates", "Thumbs.db", ".DS_Store"]
5959

6060

6161
# -- Options for HTML output -------------------------------------------------
@@ -68,4 +68,4 @@
6868
# Add any paths that contain custom static files (such as style sheets) here,
6969
# relative to this directory. They are copied after the builtin static files,
7070
# so a file named "default.css" will overwrite the builtin "default.css".
71-
html_static_path = ['_static']
71+
html_static_path = ["_static"]

0 commit comments

Comments
 (0)