Skip to main content

Neuralnets-based Artificial Intelligence implementation

Project description



Maybe you've heard about the neuronets, or Neural Networks. It is
rather old and mature concept of Artificial Intelligence. It often
shows good results, but we often want **best** ones. So, I developed
new concept -- *Nodes*.
Node is like a node in a graph. It has some input arcs and some output
ones. As neuron has, Node has *weights*: *input* and *output*
ones. Input values are passed thru arcs, multiplied by input weights,
passed to the *calculation function*, multiplied by output weights and
passed to the next Node(s).
Some words about calculation function. It maps N input values to M
output values but *how* it maps, is undefined. You are free from
log-sigmoids and tanhs!
But "free" means "ambiguous". What to do with that freedom? My answer
is: *create subclasses*. See below.


As neurons are combined into neuralnet, and Nodes are combined into
Glob. Glob is somewhat that contains Nodes and knows what to do with
them. In other words, it is oriented (object-oriented :) graph.
Glob has an external interface. Actually, it is special Node
interface. Nodes that support abstract *Globnet input interface*, are
*input Nodes*. They shouldn't have input arcs. Respectively, Nodes
that support abstract output interface, are *output Nodes*. They are
similar to input/output neurons in neuralnet.
Ok, arc is not very simple too. It is called *Synaps* and knows how to
invoke Nodes.


Core of Nodes. Class *Node* provides basic interface (except I/O
interface) for Node. Class *Synaps* is also available.
Example of use (see doc/core for details)::
from nodes.core import*
from nodes.basic import* #Basic concrete classes.
inp=InputMemory([], [])
outp=Outputmemory([], [])
syn.bind(inp, outp)
print outp.get()

This code creates two Nodes: input and output, and directly connects
them. Invoking touch() means running of net. You can find full
documentation of *core* in *doc* directory (currently, without

Provides example basic classes:
- GeneralizedNeuron (neuron with N outputs);
- StandardNeuron;
- DistributorNeuron;
- InputMemory (example input interface class);
- OutputMemory (example output one);
- and so on.

Some words about I/O Globnet interfaces. Following the principles of
duck typing, input interface is method set(value), output one -- is
method get(). When Python3.0 will become standard de-facto all over
the world, I maybe will create ABC classes.

There is no documentation for that module and won't be.

Provides some specific Node classes. See source code to understand.

Provides Globbing. Recent example using Globs:::
from nodes.basic import*
from nodes.globs import*
Main=Glob([('inp', InputMemory), ('outp', OutputMemory)],
[('inp', 'outp', -1, -1)],
['inp'], ['outp'], name='Main')
print Main.calculate([3.1415926])

OK, it is longer, but for bigger example it will be shorter then
direct way.
Unfortunately, There are no currently examples for it.

Interface to Psyco compiler. Just type::
import nodes.psycoptima
to switch it if possible.
Note: if impossible, it raises ImportError.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release. See tutorial on generating distribution archives.

Built Distribution

Nodes-1.0-py2.5.egg (40.3 kB view hashes)

Uploaded 2 5

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page