Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Python by eko ( 14 years ago )
import math
import random
import cPickle as pickle
from neat import config, population, chromosome, genome, visualize
from neat.nn import nn_pure as nn
#from neat.nn import nn_cpp as nn # C++ extension

config.load('training_config')

# set node gene type
chromosome.node_gene_type = genome.NodeGene


INPUTS = [[1, 1, 1, 1], [0.5, 0, 0, 1], [1, 1, 1, 1], [0.5, 0, 0, 1], [1, 1, 1, 1], [0.5, 0, 0, 1], [1, 1, 1, 1]]

winner = open('winner_chromosome')

brain = nn.create_ffphenotype(winner)
for i, inputs in enumerate(INPUTS):
    output = brain.sactivate(inputs) 
    print " %1.5f" %(output[0])

file.close()

 

Revise this Paste

Your Name: Code Language: