Skip to content

Instantly share code, notes, and snippets.

Luciano Borges borgeslt

Block or report user

Report or block borgeslt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
borgeslt / ArrayShuffleExtension.js
Last active Feb 3, 2020
Shuffling an array in Javascript
View ArrayShuffleExtension.js
Array.prototype.shuffle = function () {
return => {
return {
index: Math.random(),
value: item
.sort((item1, item2) => item1.index - item2.index)
.map(item => item.value)
borgeslt / SimpleDemoGA.js
Last active Jan 22, 2020
A Simple Genetic Algorithms in Javascript
View SimpleDemoGA.js
Based on the Vijini Mallawaarachchi's article in Towards Data Science
"strict mode"
function Individual(numOfGenes) {
const _genes = Array(numOfGenes).fill(0).map(i => Math.floor(Math.random() * 1000 % 2));
let _fitness = 0;
You can’t perform that action at this time.