This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import gym | |
from gym import wrappers | |
env = gym.make('CartPole-v1') | |
env = wrappers.Monitor(env, '/tmp/cartpole-experiment-v1', force=True) | |
for i_episode in range(100): | |
observation = env.reset() | |
while True: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import math | |
from population import Population | |
from cartographer import Cartographer | |
import gym | |
from gym import wrappers | |
# NEAT experiment using the CAMPN encoding | |
# In this experiment node types used are Input, Output, Hadamard and Kronecker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A neural network is trained using NEAT | |
# The idea is from the paper: "Evolving Neural Networks through Augmenting Topologies" | |
# This gist is using MultiNEAT (http://multineat.com/) | |
import logging | |
import numpy as np | |
import pickle | |
import gym |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A neural network is trained using ES-HyperNEAT | |
# The idea is from the paper: "Evolving Neural Networks through Augmenting Topologies" | |
# This gist is using MultiNEAT (http://multineat.com/) | |
import logging | |
import numpy as np | |
import pickle | |
import gym |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A neural network is trained using ES-HyperNEAT | |
# The idea is from the paper: "Evolving Neural Networks through Augmenting Topologies" | |
# This gist is using MultiNEAT (http://multineat.com/) | |
import logging | |
import numpy as np | |
import pickle | |
import gym |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using ES-HyperNEAT to try to solve the Bipedal walker. | |
# This attempt was not successful. Adjustment of hyperparameters is likely needed. | |
# A neural network is trained using NeuroEvolution of Augmenting Topologies | |
# The idea is from the paper: "Evolving Neural Networks through Augmenting Topologies" | |
# This gist is using MultiNEAT (http://multineat.com/) | |
import logging | |
import numpy as np | |
import pickle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Solution organism was found in 78th generation | |
# Total of 200 * 5 * 78 = 78000 trials were used for training | |
from __future__ import print_function | |
import gym | |
import numpy as np | |
import itertools | |
import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#--- parameters for the pole experiment v1 ---# | |
# The `Types` section specifies which classes should be used for various | |
# tasks in the NEAT algorithm. If you use a non-default class here, you | |
# must register it with your Config instance before loading the config file. | |
[Types] | |
stagnation_type = DefaultStagnation | |
reproduction_type = DefaultReproduction | |
[phenotype] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#--- parameters for the pole experiment v1 ---# | |
# Two trials were held for each organism and the average fitness was taken. | |
# The `Types` section specifies which classes should be used for various | |
# tasks in the NEAT algorithm. If you use a non-default class here, you | |
# must register it with your Config instance before loading the config file. | |
[Types] | |
stagnation_type = DefaultStagnation | |
reproduction_type = DefaultReproduction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#--- parameters for the pole experiment ---# | |
# The `Types` section specifies which classes should be used for various | |
# tasks in the NEAT algorithm. If you use a non-default class here, you | |
# must register it with your Config instance before loading the config file. | |
[Types] | |
stagnation_type = DefaultStagnation | |
reproduction_type = DefaultReproduction | |
[phenotype] |