Skip to content
#

heuristics

Here are 228 public repositories matching this topic...

koaning
koaning commented Mar 18, 2018

Suppose that we are working with this bit of code.

from evol import Population, Evolution
from evol.logger import BaseLogger, SummaryLogger
from evol.helpers.pickers import pick_random

def change(gene, size=8):
  return min(BOARD_SIZE, max(1, gene + randint(-1, 1)))

def mutate_coords(chrmsm, p=0.1):
  return [(change(x), change(y)) if random() < p else (x,y) for x,y in chrmsm]

Improve this page

Add a description, image, and links to the heuristics topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the heuristics topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.