Skip to content

Instantly share code, notes, and snippets.

View AlexandreSi's full-sized avatar

AlexandreS AlexandreSi

View GitHub Profile
@AlexandreSi
AlexandreSi / .Rprofile
Created May 1, 2019 16:26
.Rprofile to enable autocompletion warnings
options(
warnPartialMatchArgs = TRUE,
warnPartialMatchAttr = TRUE,
warnPartialMatchDollar = TRUE,
)
@AlexandreSi
AlexandreSi / index.js
Last active October 12, 2021 21:29
Parameters definition in index.js
// 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
@AlexandreSi
AlexandreSi / QLearning.js
Created April 27, 2018 09:06
connect4ai - QLearning
// @flow
const NeuralNetwork = require('./NeuralNetwork');
exports.trainOnPreviousPlays = (
networkType: string,
myNetwork: any,
myTrainer: any,
boards: Array<any>,
plays: Array<number>,
learningRate: number,