Re: Evolve a CPPN using NEAT with SharpNEAT

117 views
Skip to first unread message

Colin Green

unread,
Nov 30, 2013, 7:01:14 PM11/30/13
to shar...@googlegroups.com
Hi,

In the SharpNEAT 2 code base there is a 'Boxes' visual discrimination
task that uses CPPNs and Hyperneat. There are two variants, one with
x,y,z inputs to the CPPN, and another that adds the distance
parameter. If necessary I can give you more specific pointers (not at
my coding machine currently).

Colin.

On 30 November 2013 21:43, Ian Qvist <qvis...@gmail.com> wrote:
> I'm currently building a project that replicates the functionality of the
> paper 'Unshackling Evolution' (Paper here). For the purpose of selecting
> materials at each voxel, they use NEAT to evolve a CPPN for material
> selection. They take in '(x,y,z)' and 'd' as inputs for the CPPN, and use
> the output as the material.
>
> Is there a way to do this with SharpNEAT? I've look at some of the examples,
> and I can't seem to find anything CPPN.
>
> --
> You received this message because you are subscribed to the Google Groups
> "SharpNEAT" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sharpneat+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Ian Qvist

unread,
Nov 30, 2013, 7:47:41 PM11/30/13
to shar...@googlegroups.com
Hi Colin,

Thanks for the quick reply, I really appreciate it.

I am trying to get a feel of how it all works (apologies, I'm very new to ANNs) and I thought HyperNEAT utilized CPPNs, to generate larger neural network topologies with the properties of a CPPN (repetition, symmetry and so on). The reason I'm looking at NEAT and CPPN separately is to get NEAT to generate a CPPN, which I in turn can use to determine the material type at (x,y) in a 2 dimensional grid. Does HyperNEAT have any advantage over NEAT+CPPN in this case?

I thought IBlackBox was the NEAT algorithm, but it is a CPPN generated by NEAT?

Colin Green

unread,
Nov 30, 2013, 8:44:04 PM11/30/13
to shar...@googlegroups.com
On 1 December 2013 00:47, Ian Qvist <qvis...@gmail.com> wrote:
> I thought HyperNEAT utilized CPPNs, to generate larger neural
> network topologies with the properties of a CPPN (repetition, symmetry and
> so on).

Plain NEAT is works by evolving an ANN directly (e.g. mutations that
add nodes, connections, etc. one at a time).

HyperNEAT adds another layer, it evolves an ANN in exactly the same
way but then 'queries' it and uses the answers to those queries to
build another ANN. The first ANN has inputs for coordinates in a 3D
space, so we can input the coordinates and the response is what we
should place there (if anything). For HyperNEAT we pre-define a set of
neurons and their positions in the 3D space, we can then 'ask' the
first ANN "should neuron 1 be connected to neuron 2, etc.".

So the first ANN is called a CPPN (Pattern Producing Network), and the
predefined neurons and their coordinates is called a substrate. So the
CPPN defines how to connect up the neurons in the substrate, and the
substrate can be 2D or 3D (or more if you want to get really
confusing!).

It sounds that what you want is a 2D substrate, and you have a grid
instead of a few neurons scattered throughout the space, correct? So
you want the CPPN to accept (x,y) as input, and to output a value that
indicates a material type, yes?

Whereas the HyperNEAT CPPNs accepts both a source and target position
(x1,y1,x2,y2), because it outputs whether *two* neurons (at the
specified coords) should be connected, and that is in the form of a
connection weight (strength) output. Very low weight == no connection.

The d parameter therefore is specific to hyperneat, because in
addition to the source and target coords as input, we can optionally
add a distance input as well - the distance between (x1,y1) and
(x2,y2), therefore I don't think the d input applies in your case.

This is just some background to establish that we're understanding
each other. We can cover other questions later if necessary.

Colin

Ian Qvist

unread,
Dec 1, 2013, 8:08:31 AM12/1/13
to shar...@googlegroups.com

Hi Colin,

Thanks for clearing up the terminology, it helps a lot!


> "So you want the CPPN to accept (x,y) as input, and to output a value that indicates a material type, yes?"

You are correct. The walker is simply a  X times Y grid of nodes with different materials. Visually it lookslike this. Note that some of the nodes are missing as well. This is indicated by an 'empty' material type.

All the mechanics are currently working, but the material selection is random; I would like to get better clustering and repetition of the material.
I guess HyperNEAT can accomplish that, but it seems like an overkill to me. I guess it depends on how SharpNEAT works.

Ian Qvist

unread,
Dec 2, 2013, 2:34:16 PM12/2/13
to shar...@googlegroups.com
I forgot to put in a question :) Can SharpNEAT be used for the material selection, and if so, how would one accomplish that?
Reply all
Reply to author
Forward
0 new messages