Which neural network topology is the most efficient to generate randomly shaped letters? I have created some unique shapes, so-called "letters" for a custom alphabet, all of which can fit into 9x9 pixels. Instead of drawing countless more, I try to combine two solutions I saw in a relevant part of Reddit, and decided to let a neural network create some additional examples.

Desconstructing the problem: letters are formed in a graph of 25 nodes (always ordered into a 5x5 square) by spontaneously connecting only the adjacent nodes - no diagonal or non-adjacent edges are present.

For a neural network input, I drew these runes into 9x9 blocks, where each row has 5 "pixels" for each nodes, and 4 more as a place for indicating connection.

Below is the current letter set, with an example of an empty graph and the only example generated by my network in the last line.



I've made a perceptron (tried 1, 2 and even 3 hidden layers) where input layer had 6 neurons, using them as a binary code (zero values mean -1 activation, and one values are the 1 activation), andthe output layer had 81 neurons. (9x9 to plot out the desired shapes)

My aim was to be able to produce additional letters by defining letters as sample and making the network to learn it. Then, I assumed that by activating the network with undefined inputs, I can find new letter shapes.

I used built-in functions froM JavaNNS and backpropagation as learning method.

Which are the parts of my topology, where I could possibly go wrong? What is the most suitable solution for this task?
I think it's unlikely you're going to get good results.  Neural networks typically require a large training set.  With only a few dozen or so examples, I doubt you'll have a large enough training set for this to work well.

So, what could possibly go wrong?  I suspect the most likely outcome is that you'll get useless results.

That said, if you really insist on trying neural networks, you could try using a variational autoencoder.  An autoencoder consists of two halves: the first half maps the input $x$ to a value $z$ in the "latent space", and the second half maps $z$ to an output $x'$.  You train the autoencoder to ensure that (hopefully) $x$ and $x'$ are very similar, for all the instances $x$ in your training set.  The idea is that you make the latent space much smaller than the space of inputs/outputs, and you hope this forces it to generalize.

For instance, the input might be a 40-vector $x \in \mathbb{R}^{40}$, encoded by a one-hot encoding ($x_i=1$ means that you include a black line in the $i$th position; $x_i=-1$ means you don't include it).  The latent space might be $\mathbb{R}^2$ or $\mathbb{R}^3$ or so.  You might include a few layers of a convolutional network to map from $x$ to $z$, and then the inverse architecture to map from $z$ to $x'$.  Then, you could train the network using a standard loss function for variational autoencoders, along with some regularization term.