Last active
October 12, 2021 21:29
-
-
Save AlexandreSi/4b117e51f0f9c0cf2ef430f6e85787ed to your computer and use it in GitHub Desktop.
Parameters definition in index.js
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
// type of neural network to train | |
const NETWORK_TYPE = 'CNN'; | |
// number of games to play | |
const LEARN_TIMES = 10000; | |
// learningRate is progressively decreased with the number of games until | |
// the final value LR_INIT/LR_FINAL_FRACTION | |
const LR_INIT = 0.0001; | |
const LR_FINAL_FRACTION = 10; | |
// epsilon is the ratio between exploration and exploitation | |
// it can evolve along the games played | |
const EPSILON_INIT = 0.1; | |
const EPSILON_FINAL = 0.4; | |
// gamma is the fraction attributed to the maximum Q Value of the next state | |
const GAMMA = 0.3; | |
// reward awarded to the final play that led to victory | |
const REWARD = 100; | |
// discount applied to the reward awarded to the previous plays that led to victory | |
const DISCOUNT = 0.8; | |
// reward (or - reward) awarded to prevent the bot to lose | |
const SIDE_REWARD = 75; | |
// network configuration | |
const NETWORK_CONFIG = { | |
CNN: { | |
filters_number: 32, | |
padding: 2, | |
stride: 1, | |
size: 4, | |
layers : [60, 30] | |
}, | |
NN: { | |
layers: [100] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment