Giter VIP home page Giter VIP logo

neatpy's Introduction

Hi ๐Ÿ‘‹, I'm RedDragonNM

A 17 year old coding away...

neatpy's People

Contributors

reddragonnm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

enacting

neatpy's Issues

Net evaluation order inconsistent with connection order

A connection is considered valid if it is from a node to a node with a higher y.
See line 280 in brain.py in _valid_conn:
node1.y <= node2.y

However in evaluation, the nodes are evaluated in the natural list order which by inspection appear to be in .id order, not .y order.
See line 302 in brain.py in predict
for node in self.nodes:

This needs to read something like
for node in sorted(net.nodes,key=lambda node : node .y):

Without this change, randomly it evaluates nodes which have a value still set to zero because the connection goes forward through the list.
I ran into this because in my code I have a forked version of predict which runs the data through the network as a numpy array for accelerated processing and the uninitialized zero value didn't play well with slicing for the relu zeroing. As is, in your version, the library will look like it is working, but there will be nets which fail the evolution not because of a bad connection, but because the signal reads as zero when it shouldn't. You should be able to prove that this is happening by setting the default value to None on line 297 and then asserting it is not None when iterating input connections on line 314.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.