Skip to content

Instantly share code, notes, and snippets.

View schneiderfelipe's full-sized avatar
🎯
Focusing

Felipe S. S. Schneider schneiderfelipe

🎯
Focusing
View GitHub Profile
@schneiderfelipe
schneiderfelipe / nes.py
Created October 14, 2022 13:15 — forked from karpathy/nes.py
Natural Evolution Strategies (NES) toy example that optimizes a quadratic function
"""
A bare bones examples of optimizing a black-box function (f) using
Natural Evolution Strategies (NES), where the parameter distribution is a
gaussian of fixed standard deviation.
"""
import numpy as np
np.random.seed(0)
# the function we want to optimize
@schneiderfelipe
schneiderfelipe / cs.py
Last active December 4, 2017 20:26 — forked from myano/cs.py
#!/usr/bin/env python
import curses
import curses.textpad
def main_exec(stdscr):
begin_x = 20
begin_y = 7
height = 5