I hereby claim:
- I am eltrufas on github.
- I am rafaelc (https://keybase.io/rafaelc) on keybase.
- I have a public key ASCDUZGMuDzzc8utjT9tBvmg_7D0MGU0SUixw8jTDYUgnwo
To claim this, I am signing this object:
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
type Individual struct { | |
queens []int |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"os" | |
"strconv" | |
"time" | |
) |
package genetic | |
import "math/rand" | |
// Individual representa las caracteristicas de un individuo de una poblacion | |
type Individual interface { | |
Crossover(Individual) (Individual, Individual) | |
Mutate() Individual | |
Fitness() float32 | |
Copy() Individual |
package genemath | |
import ( | |
"math/rand" | |
"github.com/eltrufas/genetic" | |
) | |
const ( | |
// MINIMIZE means we're maximizing the algo |
var IStates [4][16]int = [4][16]int{ | |
{ | |
0, 0, 0, 0, | |
1, 1, 1, 1, | |
0, 0, 0, 0, | |
0, 0, 0, 0, | |
}, | |
{ | |
0, 0, 1, 0, | |
0, 0, 1, 0, |
I hereby claim:
To claim this, I am signing this object:
(defun randn (s n) | |
"Regresa un numero aleatorio en [s, n)" | |
(+ s (random (- n s)))) | |
(defun mod-exp (base exponent modulus) | |
"Calcula el exponente modular" | |
(cond ((zerop exponent) 1) | |
((evenp exponent) (mod-exp (mod (* base base) modulus) | |
(truncate exponent 2) modulus)) | |
((oddp exponent) (mod (* base (mod-exp base |
import sys | |
lines = list(sys.stdin) | |
ss = [l.split(" ") for l in lines] | |
rects = [] | |
for s in ss: | |
print(s) | |
x, y = s[2][:-1].split(',') |