-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addressing issues 5, 8, (part of 13) - new #17
Merged
Merged
Changes from 14 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
7671be6
new branch-removed class
erskordi cd6e245
use to change config on runtime
erskordi 174db85
added mod
erskordi 0eada33
added mod
erskordi 7e0a4de
added mod
erskordi e257660
included ranked rewards
erskordi 13a9802
addressing ranked rewards
erskordi 6053c83
changed from mod.py
erskordi 22b7f3c
changed from mod.py
erskordi d8dc035
few upgrades added
erskordi 0f37ecc
included initialize.py
erskordi 1a1665a
removed mod
erskordi c7f7f47
removed mod
erskordi c3e61b9
removed mod
erskordi b830454
included _true_reward
erskordi 75525d9
added sys.path
erskordi f30c142
fixed get_reward
erskordi 2ed5ede
fixed path of .out file
erskordi dbbea76
fixing a few remaining issues
pstjohn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,39 @@ | ||
|
||
class AlphaZeroConfig: | ||
|
||
def __init__(self): | ||
|
||
# Molecule | ||
self.max_atoms = 10 # max atoms in molecule | ||
self.min_atoms = 4 # max atoms in molecule | ||
|
||
# MCTS / rollout | ||
self.lru_cache_maxsize = 100000 | ||
self.num_rollouts = 1000 # should we limit, if so how much? | ||
self.num_simulations = 256 # number of simulations used by MCTS per game step | ||
self.root_dirichlet_alpha = 0.0 # 0.3 chess, 0.03 Go, 0.15 shogi | ||
self.root_exploration_fraction = 0.25 | ||
self.pb_c_base = 1 # 19652 in pseudocode | ||
self.pb_c_init = 1.25 | ||
# Molecule | ||
max_atoms = 10 # max atoms in molecule | ||
min_atoms = 4 # max atoms in molecule | ||
|
||
# Network | ||
self.l2_regularization_coef = 1e-4 | ||
self.features = 16 # used by all network layers | ||
self.num_messages = 1 | ||
self.num_heads = 4 # Number of attention heads | ||
self.batch_size = 32 # for gradient updates | ||
self.checkpoint_frequency = 1 # save new model file every N batches | ||
self.batch_update_frequency = 10 # get most recent data every N updates | ||
self.gradient_steps_per_batch = 32 # num step per batch | ||
self.training_iterations = int(1e06) # training iterations for NN | ||
|
||
assert self.features % self.num_heads == 0, \ | ||
"dimension mismatch for attention heads" | ||
# MCTS / rollout | ||
lru_cache_maxsize = 100000 | ||
num_rollouts = 1000 # should we limit, if so how much? | ||
num_simulations = 256 # number of simulations used by MCTS per game step | ||
root_dirichlet_alpha = 0.0 # 0.3 chess, 0.03 Go, 0.15 shogi | ||
root_exploration_fraction = 0.25 | ||
pb_c_base = 1 # 19652 in pseudocode | ||
pb_c_init = 1.25 | ||
|
||
# Buffers | ||
self.ranked_reward_alpha = 0.9 | ||
self.buffer_max_size = 512 | ||
# Network | ||
l2_regularization_coef = 1e-4 | ||
features = 16 # used by all network layers | ||
num_messages = 1 | ||
num_heads = 4 # Number of attention heads | ||
batch_size = 32 # for gradient updates | ||
checkpoint_frequency = 1 # save new model file every N batches | ||
batch_update_frequency = 10 # get most recent data every N updates | ||
gradient_steps_per_batch = 32 # num step per batch | ||
training_iterations = int(1e06) # training iterations for NN | ||
|
||
# Training | ||
self.training_steps = 100 | ||
#assert self.features % self.num_heads == 0, \ | ||
# "dimension mismatch for attention heads" | ||
|
||
# Buffers | ||
ranked_reward_alpha = 0.9 | ||
buffer_max_size = 512 | ||
|
||
# Training | ||
training_steps = 100 | ||
|
||
# DB tables | ||
sql_basename = "Stable" | ||
|
||
# Experiment id | ||
experiment_id = "0001" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import alphazero.config as config | ||
|
||
# DB table names modified by the user according to their wish | ||
config.sql_basename = "StableES" | ||
|
||
# Experiment id | ||
config.experiment_id = "0001" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can directly modify config variables in the run scripts, so
mod.py
is not neededThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok,
mod.py
was moved tostable_radical_optimization
folder and renamed tostable_rad_config.py
. Loadingmod.py
was also removed from all scripts inalphazero
folder